A powerful documentation search server built with FastMCP, enabling AI systems to intelligently search across multiple popular framework and library documentations. This tool ensures that AI models can quickly access and retrieve relevant information from various documentation sources using a unified interface.
shell
git clone <repository-url>
cd mcp-server
shell
python -m venv .venv
# On Windows:
.venv\Scripts\activate
# On Unix or MacOS:
source .venv/bin/activate
shell
pip install -r requirements.txt
shell
python main.py
from main import get_docs
# Search Framer Motion documentation
result = await get_docs(
query="how to animate on scroll",
library="framer-motion"
)
# Search Next.js documentation
result = await get_docs(
query="how to use app router",
library="next"
)
The system intelligently handles various library name formats:
# All these calls will work the same way
await get_docs(query="animations", library="framer")
await get_docs(query="animations", library="framermotion")
await get_docs(query="animations", library="framer-motion")
await get_docs(query="animations", library="motion")
test_utils.py
: Tests for library name normalization and URL retrievaltest_services.py
: Tests for web search and content fetching servicestest_main.py
: Tests for the main API function get_docs
To run all tests:
python -m pytest
To run specific test modules:
python -m pytest tests/test_utils.py
python -m pytest tests/test_services.py
python -m pytest tests/test_main.py
To run tests with verbose output:
python -m pytest -v
The tests cover:
The project uses a custom run_async
helper function to test asynchronous code in a synchronous test environment.
mcp-server/
โโโ main.py # Entry point and FastMCP tool definition
โโโ config.py # Configuration settings and constants
โโโ services.py # Web search and content fetching services
โโโ utils.py # Utility functions for library name handling
โโโ tests/ # Test suite
โ โโโ test_utils.py # Tests for utility functions
โ โโโ test_services.py # Tests for web services
โ โโโ test_main.py # Tests for main API
โ โโโ conftest.py # Pytest configuration
โโโ requirements.txt # Project dependencies
โโโ README.md # Documentation
To add a new library:
config.py
:python
DOCS_URLS = {
"new-library": "https://docs.new-library.com",
# ... existing entries
}
python
LIBRARY_ALIASES = {
"new-lib": "new-library",
# ... existing entries
}
Modify in config.py
:
HTTP_TIMEOUT = 30.0 # Timeout in seconds
MAX_SEARCH_RESULTS = 2 # Number of search results to fetch
We welcome contributions! Here's how you can help:
DOCS_URLS
in config.py
LIBRARY_ALIASES
Common issues and solutions:
HTTP_TIMEOUT
in config.py
This project is licensed under the MIT License - see the LICENSE file for details.
๐ FastMCP-powered documentation search engine that provides unified access to multiple framework docs (Next.js, Tailwind, Framer Motion, etc.) with intelligent name resolution and async processing.
duckduckgo
developer-tools
documentation-tools
documentation-search
python-async
fastmcp
No releases published
No packages published