Sphinx Docs MCP Server provides a seamless interface for AI agents to access documentation from any Sphinx-based repository. Clone, build, and search your docs with advanced indexing capabilities, while integrating OpenAI embeddings for improved query responses. A powerful tool for enhancing accessibility to project documentation.
The Sphinx Docs MCP Server enables interaction with documentation from any repository utilizing Sphinx via an MCP standard input/output server. This innovative solution provides several capabilities, enhancing the accessibility of documentation for developers and users alike.
search_docs(query): Executes an FTS5 search or hybrid search combining FTS5 with vector rank and Reciprocal Rank Fusion (RRF).read_doc_page(filepath): Accesses a complete documentation page returned from the search results.read_source_code(module_path): Retrieves a source file from the designated repository.Users can access essential resources provided by the service:
mcp://sphinx-docsmcp://sphinx-docs/indexmcp://sphinx-docs/statusmcp://sphinx-docs/configThe resource namespace can be modified through the MCP_RESOURCE_NAMESPACE setting in the .env file.
To utilize this project, ensure the following prerequisites are met:
make, pandoc, LaTeX)OPENAI_API_KEY) is required.The server supports two main search modes:
Users can easily configure the server by adjusting the values in the .env file:
REPO_URL for the repository clone URL.REPO_INSTALL_COMMAND and DOCS_BUILD_COMMAND to manage dependencies and documentation builds respectively.This project also supports a Docker workflow for those preferring containerized environments:
cp .env.example .env
# Edit .env as needed
docker compose build
docker compose run --rm --no-deps -T sphinx-mcp
Specific configurations for various IDEs are provided to facilitate smooth development environments, whether using Docker or local Python setups.
For any issues, detailed troubleshooting steps are provided to ensure successful setup and operation, addressing common errors that users may encounter.
No comments yet.
Sign in to be the first to comment.