Skip to main content
Glama

MCP Documentation Search Server

An MCP (Model Context Protocol) server that lets AI clients like Claude Desktop search live documentation for popular developer libraries and return clean, source-cited summaries — powered by a lightweight RAG (Retrieval-Augmented Generation) pipeline.

Ask a question like "How do I use ChromaDB with LangChain?" and the tool searches the official docs, scrapes and cleans the relevant pages, and returns grounded, sourced text — all callable directly from an MCP-compatible AI client.


How it works

User query
   │
   ▼
Serper API (site-scoped web search)
   │
   ▼
httpx (async fetch of result pages, run concurrently)
   │
   ▼
trafilatura (clean HTML → readable text)
   │
   ▼
Groq LLM (optional: context-grounded summarization)
   │
   ▼
Source-cited response

The server exposes a single MCP tool, get_docs(query, library), registered via FastMCP and served over stdio transport — the standard way MCP hosts (like Claude Desktop) communicate with local tool servers.


Related MCP server: ContextEngine MCP Server

Features

  • 🔌 MCP-compliant server — discoverable and callable by any MCP client (tested with Claude Desktop)

  • 🔍 Scoped documentation search across LangChain, LlamaIndex, OpenAI, and uv docs via the Serper API

  • Concurrent async fetching — all result pages are fetched in parallel with asyncio.gather + httpx

  • 🧹 Clean text extraction from raw HTML using trafilatura

  • 🧠 LLM-grounded summarization via Groq, with enforced source citation

  • 🛡️ Resilient to failures — a single broken/slow URL won't crash the whole request

  • 🖥️ Includes a standalone MCP client (client.py) for testing outside of Claude Desktop


Tech Stack

Category

Tools

Language

Python 3.13+

Protocol

Model Context Protocol (MCP) via fastmcp

Async

asyncio, httpx

Search

Serper API

Content extraction

trafilatura

LLM

Groq (openai/gpt-oss-20b)

Package management

uv


Project Structure

web-scraper-using-mcp/
├── main.py            # MCP server — exposes the get_docs tool
├── client.py           # Standalone MCP client for local testing
├── utils.py            # HTML cleaning + LLM helper functions
├── pyproject.toml       # Project metadata & dependencies (uv)
├── uv.lock              # Locked dependency versions
├── .env.example         # Template for required API keys
└── src/                 # Package scaffolding (uv init)

Setup

1. Clone the repo

git clone https://github.com/<your-username>/<repo-name>.git
cd <repo-name>

2. Install dependencies

uv sync

3. Configure environment variables

cp .env.example .env

Then open .env and add your keys:

SERPER_API_KEY=your_serper_api_key_here
GROQ_API_KEY=your_groq_api_key_here

4. Run the server

uv run main.py

You should see FastMCP start up and log Starting MCP server 'docs' with transport 'stdio'.


Usage

Option A: Test with the included client

uv run client.py

This spins up the server, lists available tools, calls get_docs, and prints an LLM-generated, source-cited answer.

Option B: Connect to Claude Desktop

Add the server to your claude_desktop_config.json:

{
  "mcpServers": {
    "web-scraper": {
      "command": "uv",
      "args": ["run", "--directory", "/absolute/path/to/project", "main.py"],
      "env": {
        "SERPER_API_KEY": "your_serper_api_key_here",
        "GROQ_API_KEY": "your_groq_api_key_here"
      }
    }
  }
}

Restart Claude Desktop, then ask something like "Use the docs tool to look up how ChromaDB works with LangChain." Claude will discover and call the get_docs tool directly.


Demo

Server running locally:

Server running

Claude Desktop discovering and requesting to call the tool:

Claude tool call


Supported Libraries

Library

Docs source

langchain

docs.langchain.com

llama-index

docs.llamaindex.ai

openai

platform.openai.com/docs

uv

docs.astral.sh/uv


Known Limitations

  • Retrieval is search-based (Serper), not embedding/vector-based — no vector database is used

  • Limited to two search results per query

  • Only supports the four libraries listed above

  • No caching — repeated identical queries re-fetch and re-scrape


Roadmap

  • Add a vector store (e.g. Chroma) for cached, embedding-based retrieval

  • Support additional libraries and configurable result counts

  • Add a CLI interface to client.py for arbitrary queries

  • Add automated tests


Author

Built by Samrudhi as a hands-on project exploring the Model Context Protocol, agentic tool-calling, and LLM-grounded retrieval.

Available Tools

1 tool
get_docsA

Search the latest docs for a given query and library. Supports langchain, openai, llama-index and uv.

ParametersJSON Schema
NameRequiredDescriptionDefault
queryYesThe query to search for (e.g. "Publish a package with UV")
libraryYesThe library to search in (e.g. "uv")

TDQS

A3.8/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the burden of behavioral disclosure. 'Search' reasonably signals a read-only operation and 'latest docs' signals freshness, but it doesn't state what is returned, whether network access is required, or failure behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two compact sentences: the first states the action and parameters, the second provides the scope. There is no filler or redundant restatement of parameter names.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool is simple and fully parameterized, but with no output schema the description still omits the return format and any caveats about the search. It is adequate for invoking the tool, but not fully self-sufficient.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema already documents both parameters with examples, so the baseline is 3. The description adds the supported-library list (langchain, openai, llama-index, uv), which constrains the 'library' parameter beyond what the schema provides.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a clear verb ('Search'), resource ('latest docs'), and the two inputs (query, library), and names the supported libraries. It is unambiguous, though there are no sibling tools to differentiate from and it doesn't describe the result shape.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The explicit 'Supports langchain, openai, llama-index and uv' tells the agent which libraries are valid, making applicability clear. It stops short of 5 because there is no explicit when-not-to-use or alternative routing, though no siblings exist.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

TDQS

A3.9/5.0
Disambiguation5/5

Only a single tool exists, so there is no possibility of confusing it with others. The tool's purpose is clearly defined: searching docs.

Naming Consistency5/5

With a single tool, naming consistency is trivially maintained. The name 'get_docs' follows a clear verb_noun pattern and accurately reflects its function.

Tool Count3/5

A single tool for a docs server feels somewhat thin. While searching is the core need, the surface area is minimal and offers no other useful operations like listing libraries or fetching specific doc pages.

Completeness4/5

The tool covers the main search use case for the supported libraries, but lacks any auxiliary operations such as retrieving a known doc directly or discovering available libraries. Minor gaps exist but agents can likely work around them.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Smchavan491/web-scraper-using-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server