MCP Docs Assistant

MCP Docs Assistant

An MCP server that retrieves documentation from official sources (LangChain, LlamaIndex, OpenAI, uv) using Serper API, extracts page content, and provides context for LLM-based answers.

Category
Visit Server

README

MCP Docs Assistant

A Python MCP project that exposes documentation retrieval as a tool and demonstrates how an agentic LLM client can use that tool to answer developer questions with fetched source context.

The main workflow runs an MCP server over stdio, searches supported official documentation sites through Serper, extracts readable page content, and passes the retrieved context to a Groq-hosted LLM for a grounded response. The repository also includes a small context-sharing MCP server example for storing and retrieving agent context in memory.

Key Features

  • MCP stdio server with a get_docs tool for documentation lookup.
  • Search constrained to supported official docs: LangChain, LlamaIndex, OpenAI, and uv.
  • Async HTTP fetching with httpx and cleaned page extraction via trafilatura.
  • Example MCP client that discovers tools, calls the server, and sends retrieved context to Groq.
  • Simple agentic workflow pattern: discover a tool, retrieve external context, then generate a grounded answer.
  • Separate context-sharing server example with tools for share_context, retrieve_context, and list_all_context.

Tech Stack

  • Python
  • MCP / FastMCP
  • httpx
  • python-dotenv
  • Serper API
  • Groq API
  • trafilatura

Project Structure

.
|-- mcp_server.py                    # Main docs-retrieval MCP server
|-- client.py                        # Example MCP client and LLM response flow
|-- utils.py                         # HTML cleanup and Groq completion helper
|-- mcp-context-sharing/
|   `-- src/server/main.py           # In-memory context-sharing MCP server example
|-- requirements.txt                 # Python dependency snapshot
|-- .env.example                     # Required environment variables
`-- pyproject.toml                   # Placeholder project metadata

Setup

Create and activate a virtual environment:

python -m venv .venv
.venv\Scripts\activate

Install dependencies:

pip install -r requirements.txt
pip install fastmcp groq trafilatura

Create a local environment file:

copy .env.example .env

Then add API keys:

SERPER_API_KEY=your_serper_api_key
GROQ_API_KEY=your_groq_api_key

Run Locally

Run the example client, which starts mcp_server.py over stdio, lists available tools, calls get_docs, and asks Groq to answer from the returned context:

python client.py

Run the docs server directly:

python mcp_server.py

Run the context-sharing server example:

python mcp-context-sharing/src/server/main.py

Usage Flow

  1. client.py starts the MCP server with stdio transport.
  2. The client initializes an MCP session and lists available tools.
  3. It calls get_docs with a developer query and supported library name.
  4. mcp_server.py searches the relevant official docs domain through Serper.
  5. Matching pages are fetched, cleaned, labeled with source URLs, and returned.
  6. The client sends the retrieved context to Groq and prints the answer.

Supported library values:

langchain
llama-index
openai
uv

Testing and Build

No automated test suite or build pipeline is currently defined. For a smoke test, configure the environment variables and run:

python client.py

Deployment Notes

The current implementation is designed for local MCP stdio execution. It does not include a hosted API service, persistent storage layer, or production deployment configuration.

Future Scope

  • Add tests around tool behavior, error handling, and response shaping.
  • Move supported docs sources into configuration.
  • Add caching or persistence for fetched documentation.
  • Package the server with complete dependency metadata in pyproject.toml.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured