Skip to main content
Glama
Ask the Docs MCP Server

Ask the Docs MCP Server

by joshbarros
README.md
# Ask the Docs — MCP server

Expose a production RAG system as a **Model Context Protocol (MCP) server** — usable from any MCP client (Claude Desktop, Cursor, Claude Code, …).

![license](https://img.shields.io/badge/license-MIT-blue)
![python](https://img.shields.io/badge/python-3.11%2B-blue)
![mcp](https://img.shields.io/badge/protocol-MCP-orange)

## What it is

Three tools over a small corpus of AI-engineering docs:

| Tool | What it does |
|------|--------------|
| `search_docs(query, k)` | BM25 retrieval over the corpus |
| `ask(question)` | Grounded answer with inline citations (`[rag:1]`) via OpenRouter |
| `list_sources()` | Indexed sources + chunk count |

No API key? `ask` falls back to the top retrieved chunk — the server never dead-ends.

## Use it

```bash
uv run app/server.py                      # stdio (Claude Desktop / Claude Code)
uv run mcp run app/server.py              # same, via the MCP CLI
```

**Claude Desktop** (`claude_desktop_config.json`):
```json
{
  "mcpServers": {
    "ask-the-docs": {
      "command": "uv",
      "args": ["run", "app/server.py"]
    }
  }
}
```

**Claude Code / Cursor**: add the same command as an MCP server.

## Why this matters

MCP is how tools get exposed to agents in 2026. A recruiter sees this and knows you can
build agent integrations, not just call a chat API. It pairs with [ask-the-docs](https://github.com/joshbarros/ask-the-docs) (the RAG) and [operator](https://github.com/joshbarros/operator) (the harness).

TDQS

A3.5/5.0

Scored across 3 tools

Disambiguation4/5

search_docs and ask both accept a query, but the descriptions clearly separate raw chunk retrieval from a synthesized cited answer, so an agent can choose correctly. list_sources is clearly distinct. Minor overlap remains because both query-consuming tools operate on the same corpus.

Naming Consistency4/5

search_docs and list_sources follow a clean verb_noun pattern, while 'ask' is a bare verb that breaks the pattern. Still readable and unambiguous, just a minor deviation.

Tool Count4/5

Three tools is a tight, well-scoped surface for a documentation Q&A server; each tool maps to a distinct retrieval need. It sits at the low end of the range and could feel thin without at least one document-inspection tool.

Completeness3/5

Core retrieval and answering are covered, but there is no way to fetch a full document or a specific chunk, and no source-filtering parameter to scope search or ask to a particular indexed source. list_sources hints at per-source capability that the other tools cannot exploit.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues