https://github.com/jongan69/expo-react-native-fastmcp
A Fastmcp Server for Expo React Native Documentation
https://github.com/jongan69/expo-react-native-fastmcp
documentation expo llm-inference mcp-server react-native
Last synced: 4 months ago
JSON representation
A Fastmcp Server for Expo React Native Documentation
- Host: GitHub
- URL: https://github.com/jongan69/expo-react-native-fastmcp
- Owner: jongan69
- Created: 2025-05-11T17:51:57.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-08-26T01:57:29.000Z (10 months ago)
- Last Synced: 2025-12-19T23:45:20.357Z (6 months ago)
- Topics: documentation, expo, llm-inference, mcp-server, react-native
- Language: Python
- Homepage:
- Size: 2.85 MB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Security: docs/security.md
- Support: docs/support.md
Awesome Lists containing this project
README
[](https://mseep.ai/app/38b46a0b-bfca-4283-b568-e22c2c8b8152)
# 📚 Expo React Native Markdown Documentation Server (MCP)
A fast, extensible, and intelligent documentation server for Markdown files using React Native Expo Documentation, powered by the MCP framework.
---
## 🚀 Features
- **Automatic Markdown Discovery:** Scans the `docs/` directory for all Markdown files and registers them as searchable resources.
- **Metadata Extraction:** Reads YAML frontmatter for tags and versioning, and tracks last modified dates.
- **Powerful Search Tools:**
- **Keyword Search:** Find documentation by exact keyword matches, with ranked results and context snippets.
- **Fuzzy Search:** Typo-tolerant search using rapidfuzz for partial matches.
- **Advanced Search:** Filter by keyword, tag, and/or last modified date.
- **Resource API:** Exposes documentation as resources with rich metadata for integration with other tools.
- **Logging:** All queries are logged for analytics and debugging.
- **Simple API:** Exposes all search and retrieval tools via MCP's tool interface.
---
## 🏗️ Project Structure
```
.
├── server.py # Main server code (this file)
├── docs/ # Place your Markdown documentation here
│ └── *.md
├── sitemap_scrape.py # Scrapes Expo and React Native Sitemaps for Documentation URLS and saves to sitemaps_urls.json
├── scrape_markdown.py # Scrapes sitemaps_urls.json URLs and saves the data as *.md files in /docs
└── README.md
```
---
## 🛠️ Usage
### 1. Add Your Documentation
Place your Markdown files in the `docs/` directory or use `sitemap_scrape.py` and `scrape_markdown.py` to generate *.md files from a sitemap url.
Optionally, add YAML frontmatter for tags and versioning:
```markdown
---
tags: [api, quickstart]
version: 1.2.0
---
# My API Documentation
Welcome to the docs!
```
### 2. Start the Server
Note: use `source .venv/bin/activate` to activate the python enviornment
```bash
uv run mcp dev server.py
```
The server runs using MCP's `stdio` transport by default.
---
## 🔍 API Overview
All tools are exposed via the MCP tool interface:
### `search_docs(keyword: str)`
- **Description:** Search for a keyword in all docs. Returns ranked filenames with context snippets.
- **Returns:**
- `filename`
- `matches` (count)
- `snippet`
- `last_modified`
- `tags`
- `version`
---
### `fuzzy_search_docs(keyword: str, threshold: int = 70)`
- **Description:** Typo-tolerant search using rapidfuzz. Returns ranked results with context.
- **Returns:**
- `filename`
- `score`
- `snippet`
- `last_modified`
- `tags`
- `version`
---
### `advanced_search(keyword: str = "", tag: str = "", after: str = "")`
- **Description:** Search by keyword, tag, or last modified date (ISO format).
- **Returns:**
- `filename`
- `matches`
- `snippet`
- `last_modified`
- `tags`
- `version`
---
### `get_doc_content(filename: str)`
- **Description:** Retrieve the full content of a documentation file by name.
---
## 📝 Example Query
```python
from mcp.client import MCPClient
client = MCPClient("http://localhost:YOUR_PORT")
results = client.search_docs("installation")
print(results)
```
---
## 🍾 Adding to Cursor
Use the `mcp.json` file structure for using the MCP server in Cursor
## 🧩 Extending
- Add new Markdown files to `docs/` — they are auto-discovered.
- Add new search tools or resource types by extending `server.py`.
---
## 🛡️ Logging
All queries are logged to `mcp_server_queries.log` for traceability and analytics.
---
## 🧑💻 Requirements
- Python 3.8+
- [mcp](https://github.com/multiprocessio/mcp)
- [PyYAML](https://pyyaml.org/)
- [rapidfuzz](https://github.com/maxbachmann/RapidFuzz)
Install dependencies:
```bash
pip install mcp pyyaml rapidfuzz
```
---
## 🤝 Contributing
Pull requests and issues are welcome!
Feel free to suggest features or improvements.
---
## 📄 License
MIT License
---
## ✨ Credits
Built with [MCP](https://github.com/multiprocessio/mcp) and ❤️ by yours truly.