Cover image
Try Now
2025-03-17

🔍 FASTMCP-Dokumentation Suchmaschine, die einen einheitlichen Zugriff auf mehrere Framework-Dokumente (Next.js, Rückenwind, Framer Motion usw.) mit intelligenter Name Auflösung und asynchronisierter Verarbeitung ermöglicht.

3 years

Works with Finder

1

Github Watches

1

Github Forks

5

Github Stars

MCP Documentation Search Server

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.

🌟 Features

  • 📚 Multi-Library Support: Search documentation across multiple libraries:

  • 🔍 Intelligent Search

    • Smart name resolution for library variations
    • DuckDuckGo-powered search for accurate results
    • Site-specific search targeting
  • ⚡ Performance Features

    • Asynchronous processing
    • Efficient web request handling
    • Parallel content fetching
  • 🛡️ Robust Error Handling

    • Network timeout management
    • Invalid input validation
    • HTTP error handling
    • Request failure recovery

📋 Requirements

  • Python 3.8+
  • pip or uv package manager
  • Virtual environment (recommended)

🚀 Quick Start

  1. Clone the Repository
git clone <repository-url>
cd mcp-server
  1. Set Up Virtual Environment
python -m venv .venv
# On Windows:
.venv\Scripts\activate
# On Unix or MacOS:
source .venv/bin/activate
  1. Install Dependencies
pip install -r requirements.txt
  1. Run the Server
python main.py

💻 Usage

Basic Usage

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"
)

Library Name Variations

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")

🧪 Testing

The project includes a comprehensive test suite to ensure reliability and correctness. Tests are organized into three main categories:

Test Structure

  • Unit Tests: Test individual components in isolation

    • test_utils.py: Tests for library name normalization and URL retrieval
    • test_services.py: Tests for web search and content fetching services
  • Integration Tests: Test how components work together

    • test_main.py: Tests for the main API function get_docs

Running Tests

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

Test Coverage

The tests cover:

  • ✅ Library name normalization and validation
  • ✅ URL retrieval for different libraries
  • ✅ Web search functionality
  • ✅ Content fetching and error handling
  • ✅ Documentation search integration
  • ✅ API input validation and error handling
  • ✅ Alias resolution for different library name formats

Asynchronous Testing

The project uses a custom run_async helper function to test asynchronous code in a synchronous test environment. This approach allows for testing async functions without requiring complex test setup.

🏗️ Project Structure

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

🔧 Configuration

Supported Libraries

To add a new library:

  1. Add the documentation URL in config.py:
DOCS_URLS = {
    "new-library": "https://docs.new-library.com",
    # ... existing entries
}
  1. Add common aliases:
LIBRARY_ALIASES = {
    "new-lib": "new-library",
    # ... existing entries
}

HTTP Settings

Modify in config.py:

HTTP_TIMEOUT = 30.0        # Timeout in seconds
MAX_SEARCH_RESULTS = 2     # Number of search results to fetch

🤝 Contributing

We welcome contributions! Here's how you can help:

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests for new functionality
  5. Ensure all tests pass
  6. Submit a pull request

Adding New Libraries

  1. Update DOCS_URLS in config.py
  2. Add relevant aliases in LIBRARY_ALIASES
  3. Test the integration
  4. Update documentation
  5. Submit a pull request

🐛 Troubleshooting

Common issues and solutions:

  • TimeoutError: Increase HTTP_TIMEOUT in config.py
  • No Results: Try different search terms or verify the library name
  • HTTP Errors: Check your internet connection and the documentation URL

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

🙏 Acknowledgments

  • FastMCP for the core functionality
  • DuckDuckGo for search capabilities
  • pytest for testing framework
  • All supported documentation providers

相关推荐

  • NiKole Maxwell
  • I craft unique cereal names, stories, and ridiculously cute Cereal Baby images.

  • Joshua Armstrong
  • Confidential guide on numerology and astrology, based of GG33 Public information

  • https://suefel.com
  • Latest advice and best practices for custom GPT development.

  • Emmet Halm
  • Converts Figma frames into front-end code for various mobile frameworks.

  • Callycode Limited
  • A geek-themed horoscope generator blending Bitcoin prices, tech jargon, and astrological whimsy.

  • Khalid kalib
  • Write professional emails

  • Elijah Ng Shi Yi
  • Advanced software engineer GPT that excels through nailing the basics.

  • INFOLAB OPERATIONS 2
  • A medical specialist offering assistance grounded in clinical guidelines. Disclaimer: This is intended for research and is NOT safe for clinical use!

  • Yasir Eryilmaz
  • AI scriptwriting assistant for short, engaging video content.

  • apappascs
  • Entdecken Sie die umfassendste und aktuellste Sammlung von MCP-Servern auf dem Markt. Dieses Repository dient als zentraler Hub und bietet einen umfangreichen Katalog von Open-Source- und Proprietary MCP-Servern mit Funktionen, Dokumentationslinks und Mitwirkenden.

  • OffchainLabs
  • GO -Umsetzung des Ethereum -Beweises des Anteils

  • huahuayu
  • Ein einheitliches API-Gateway zur Integration mehrerer Ethercan-ähnlicher Blockchain-Explorer-APIs mit Modellkontextprotokoll (MCP) für AI-Assistenten.

  • deemkeen
  • Steuern Sie Ihren MBOT2 mit einer Power Combo: MQTT+MCP+LLM

  • zhaoyunxing92
  • 本项目是一个钉钉 MCP (Message Connector Protocol )服务 , 提供了与钉钉企业应用交互的 api 接口。项目基于 Go 语言开发 , 支持员工信息查询和消息发送等功能。

  • pontusab
  • Die Cursor & Windsurf -Community finden Regeln und MCPs

    Reviews

    5 (1)
    Avatar
    user_xbLFNa6r
    2025-04-15

    I've been using MCP Server for Job Searching by happyhackerbird and it has significantly improved my job hunting process. The server provides a seamless and efficient experience, helping me track and apply for jobs effortlessly. Highly recommended for anyone serious about finding their next opportunity.