{"id":30868245,"url":"https://github.com/PicardRaphael/mcp-server-documentation","last_synced_at":"2025-09-07T22:12:34.164Z","repository":{"id":282865211,"uuid":"949884090","full_name":"PicardRaphael/mcp-server-documentation","owner":"PicardRaphael","description":"🔍 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.","archived":false,"fork":false,"pushed_at":"2025-03-17T10:19:49.000Z","size":26,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-17T11:31:03.341Z","etag":null,"topics":["developer-tools","documentation-search","documentation-tools","duckduckgo","fastmcp","python-async"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PicardRaphael.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-03-17T09:44:55.000Z","updated_at":"2025-03-17T10:19:53.000Z","dependencies_parsed_at":"2025-03-17T11:41:17.318Z","dependency_job_id":null,"html_url":"https://github.com/PicardRaphael/mcp-server-documentation","commit_stats":null,"previous_names":["picardraphael/mcp-server-documentation"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/PicardRaphael/mcp-server-documentation","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PicardRaphael%2Fmcp-server-documentation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PicardRaphael%2Fmcp-server-documentation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PicardRaphael%2Fmcp-server-documentation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PicardRaphael%2Fmcp-server-documentation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PicardRaphael","download_url":"https://codeload.github.com/PicardRaphael/mcp-server-documentation/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PicardRaphael%2Fmcp-server-documentation/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274102545,"owners_count":25222615,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-07T02:00:09.463Z","response_time":67,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["developer-tools","documentation-search","documentation-tools","duckduckgo","fastmcp","python-async"],"created_at":"2025-09-07T22:03:45.295Z","updated_at":"2025-09-07T22:12:34.080Z","avatar_url":"https://github.com/PicardRaphael.png","language":"Python","readme":"# MCP Documentation Search Server\n\nA 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.\n\n## 🌟 Features\n\n- **📚 Multi-Library Support**: Search documentation across multiple libraries:\n\n  - [LangChain](https://js.langchain.com/docs) - JavaScript/TypeScript LangChain documentation\n  - [LangGraph](https://langchain-ai.github.io/langgraphjs) - LangGraph.js documentation\n  - [Next.js](https://nextjs.org/docs) - Next.js framework documentation\n  - [Tailwind CSS](https://tailwindcss.com/docs) - Utility-first CSS framework\n  - [FastMCP](https://docs.fastmcp.com) - FastMCP documentation\n  - [Framer Motion](https://motion.dev/docs/) - Animation library for React\n\n- **🔍 Intelligent Search**\n\n  - Smart name resolution for library variations\n  - DuckDuckGo-powered search for accurate results\n  - Site-specific search targeting\n\n- **⚡ Performance Features**\n\n  - Asynchronous processing\n  - Efficient web request handling\n  - Parallel content fetching\n\n- **🛡️ Robust Error Handling**\n  - Network timeout management\n  - Invalid input validation\n  - HTTP error handling\n  - Request failure recovery\n\n## 📋 Requirements\n\n- Python 3.8+\n- pip or uv package manager\n- Virtual environment (recommended)\n\n## 🚀 Quick Start\n\n1. **Clone the Repository**\n\n```bash\ngit clone \u003crepository-url\u003e\ncd mcp-server\n```\n\n2. **Set Up Virtual Environment**\n\n```bash\npython -m venv .venv\n# On Windows:\n.venv\\Scripts\\activate\n# On Unix or MacOS:\nsource .venv/bin/activate\n```\n\n3. **Install Dependencies**\n\n```bash\npip install -r requirements.txt\n```\n\n4. **Run the Server**\n\n```bash\npython main.py\n```\n\n## 💻 Usage\n\n### Basic Usage\n\n```python\nfrom main import get_docs\n\n# Search Framer Motion documentation\nresult = await get_docs(\n    query=\"how to animate on scroll\",\n    library=\"framer-motion\"\n)\n\n# Search Next.js documentation\nresult = await get_docs(\n    query=\"how to use app router\",\n    library=\"next\"\n)\n```\n\n### Library Name Variations\n\nThe system intelligently handles various library name formats:\n\n```python\n# All these calls will work the same way\nawait get_docs(query=\"animations\", library=\"framer\")\nawait get_docs(query=\"animations\", library=\"framermotion\")\nawait get_docs(query=\"animations\", library=\"framer-motion\")\nawait get_docs(query=\"animations\", library=\"motion\")\n```\n\n## 🧪 Testing\n\nThe project includes a comprehensive test suite to ensure reliability and correctness. Tests are organized into three main categories:\n\n### Test Structure\n\n- **Unit Tests**: Test individual components in isolation\n\n  - `test_utils.py`: Tests for library name normalization and URL retrieval\n  - `test_services.py`: Tests for web search and content fetching services\n\n- **Integration Tests**: Test how components work together\n  - `test_main.py`: Tests for the main API function `get_docs`\n\n### Running Tests\n\nTo run all tests:\n\n```bash\npython -m pytest\n```\n\nTo run specific test modules:\n\n```bash\npython -m pytest tests/test_utils.py\npython -m pytest tests/test_services.py\npython -m pytest tests/test_main.py\n```\n\nTo run tests with verbose output:\n\n```bash\npython -m pytest -v\n```\n\n### Test Coverage\n\nThe tests cover:\n\n- ✅ Library name normalization and validation\n- ✅ URL retrieval for different libraries\n- ✅ Web search functionality\n- ✅ Content fetching and error handling\n- ✅ Documentation search integration\n- ✅ API input validation and error handling\n- ✅ Alias resolution for different library name formats\n\n### Asynchronous Testing\n\nThe 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.\n\n## 🏗️ Project Structure\n\n```\nmcp-server/\n├── main.py          # Entry point and FastMCP tool definition\n├── config.py        # Configuration settings and constants\n├── services.py      # Web search and content fetching services\n├── utils.py         # Utility functions for library name handling\n├── tests/           # Test suite\n│   ├── test_utils.py    # Tests for utility functions\n│   ├── test_services.py # Tests for web services\n│   ├── test_main.py     # Tests for main API\n│   └── conftest.py      # Pytest configuration\n├── requirements.txt # Project dependencies\n└── README.md        # Documentation\n```\n\n## 🔧 Configuration\n\n### Supported Libraries\n\nTo add a new library:\n\n1. Add the documentation URL in `config.py`:\n\n```python\nDOCS_URLS = {\n    \"new-library\": \"https://docs.new-library.com\",\n    # ... existing entries\n}\n```\n\n2. Add common aliases:\n\n```python\nLIBRARY_ALIASES = {\n    \"new-lib\": \"new-library\",\n    # ... existing entries\n}\n```\n\n### HTTP Settings\n\nModify in `config.py`:\n\n```python\nHTTP_TIMEOUT = 30.0        # Timeout in seconds\nMAX_SEARCH_RESULTS = 2     # Number of search results to fetch\n```\n\n## 🤝 Contributing\n\nWe welcome contributions! Here's how you can help:\n\n1. Fork the repository\n2. Create a feature branch\n3. Make your changes\n4. Add tests for new functionality\n5. Ensure all tests pass\n6. Submit a pull request\n\n### Adding New Libraries\n\n1. Update `DOCS_URLS` in `config.py`\n2. Add relevant aliases in `LIBRARY_ALIASES`\n3. Test the integration\n4. Update documentation\n5. Submit a pull request\n\n## 🐛 Troubleshooting\n\nCommon issues and solutions:\n\n- **TimeoutError**: Increase `HTTP_TIMEOUT` in `config.py`\n- **No Results**: Try different search terms or verify the library name\n- **HTTP Errors**: Check your internet connection and the documentation URL\n\n## 📄 License\n\nThis project is licensed under the MIT License - see the LICENSE file for details.\n\n## 🙏 Acknowledgments\n\n- [FastMCP](https://fastmcp.com) for the core functionality\n- [DuckDuckGo](https://duckduckgo.com) for search capabilities\n- [pytest](https://docs.pytest.org/) for testing framework\n- All supported documentation providers\n","funding_links":[],"categories":["🤖 AI/ML"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FPicardRaphael%2Fmcp-server-documentation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FPicardRaphael%2Fmcp-server-documentation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FPicardRaphael%2Fmcp-server-documentation/lists"}