MCP Docs Server
README.md
# MCP Docs Server
A small Python project that exposes a FastMCP tool for fetching documentation from supported libraries and returning clean, readable text. The project includes a sample client that connects to the server, calls the tool, and uses Groq to answer the user's question using the retrieved documentation as context.
## What this project does
- Runs an MCP server with the `get_docs` tool
- Searches the web through the Serper API
- Fetches documentation pages and strips HTML into readable text
- Supports these libraries:
- `langchain`
- `llama-index`
- `openai`
- `uv`
- Provides a sample client for interacting with the server
## Project structure
- `mcp_server.py` — MCP server and documentation-fetching tool
- `client.py` — example client that connects to the MCP server
- `utils.py` — HTML cleanup and LLM response helpers
- `pyproject.toml` — Python dependencies and project metadata
- `.env` — local environment variables for API keys
- `README.md` — project documentation
## Requirements
- Python 3.13+
- `uv` package manager
## Setup
1. Install dependencies:
```bash
uv sync
```
2. Create a `.env` file in the project root and add your API keys:
```env
SERPER_API_KEY=your_serper_api_key_here
GROQ_API_KEY=your_groq_api_key_here
```
3. Run the MCP server:
```bash
uv run mcp_server.py
```
4. Run the example client:
```bash
uv run client.py
```
## Example usage
The client currently asks:
- `How to use publish a package with uv on gitlab?`
- Library: `uv`
The server will search documentation for the selected library, collect sources, and return the extracted content for the client to use as context.
## Notes
- The `.env` file is meant for local development only and should not be committed to GitHub.
- The project uses the `FastMCP` library, `httpx`, `python-dotenv`, `trafilatura`, and `groq`.
TDQS
D1.8/5.0
Scored across 1 tool
Disambiguation5/5
With only one tool, there is no possibility of ambiguity or overlapping purposes. The single tool is trivially distinct.
Naming Consistency5/5
The only tool name 'get_docs' follows a clear verb_noun convention. Consistency is trivially maintained with a single tool.
Tool Count3/5
A single tool feels thin for a documentation server, but it is at the low end of borderline. The count is not egregious but likely insufficient for a full-featured docs experience.
Completeness2/5
The tool name suggests retrieving documentation, but there is no listing, searching, or other navigation capability. This creates significant gaps for a docs server, and the lack of a description makes the surface even more unclear.
Maintenance
ActivityMaintained
ResponsivenessNo issues