Skip to main content
Glama
cartek99

MCP AI Docs

by cartek99

MCP AI Docs

An MCP (Model Context Protocol) server that provides indexed, searchable access to Anthropic Claude and Google Gemini documentation.

Features

  • Full-text search across both documentation sources with fuzzy matching

  • Playwright-powered crawling for JavaScript-rendered pages (Anthropic)

  • TTL-based caching with memory and file layers

  • 4 MCP tools: search_docs, fetch_page, list_sections, refresh_index

Related MCP server: Whoosh RAG MCP

Installation

npm install
npx playwright install chromium
npm run build

Usage with Claude Desktop

Add to your Claude Desktop config (~/.config/claude-desktop/claude_desktop_config.json):

{
  "mcpServers": {
    "ai-docs": {
      "command": "node",
      "args": ["/path/to/mcp-ai-docs/dist/index.js"]
    }
  }
}

MCP Tools

search_docs

Search across all indexed documentation.

{
  "query": "streaming",
  "platform": "all",
  "limit": 10,
  "fuzzy": true
}

fetch_page

Fetch full content of a specific documentation page.

{
  "url": "https://ai.google.dev/gemini-api/docs/function-calling",
  "format": "markdown"
}

list_sections

List available documentation sections by platform.

{
  "platform": "all"
}

refresh_index

Rebuild the documentation index.

{
  "platform": "all",
  "force": false
}

Documentation Sources

Platform

Pages

Method

Speed

Anthropic

532

Playwright (JS-rendered)

~2.5s/page

Gemini

70

HTTP (server-rendered)

~0.6s/page

Project Structure

src/
├── index.ts              # Entry point
├── server.ts             # MCP server setup
├── config.ts             # Configuration
├── cache/                # TTL caching (memory + file)
├── crawlers/             # Sitemap parsing, page fetching
├── indexer/              # MiniSearch wrapper
├── tools/                # MCP tool implementations
└── utils/                # HTML parsing, rate limiting

License

MIT

Available Tools

4 tools
fetch_pageA

Fetch the full content of a specific documentation page from Anthropic or Gemini docs. Returns content in the requested format.

ParametersJSON Schema
NameRequiredDescriptionDefault
urlYesFull URL of the documentation page to fetch
formatNoOutput format for the contentmarkdown

TDQS

A4/5.0
Behavior4/5

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

With no annotations provided, the description carries the burden of behavioral disclosure. It clearly indicates a safe read-only operation ('Fetch') and describes the return behavior ('Returns content in the requested format'). It could mention limitations or error behavior, but the core behavior is transparent.

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?

The description is two concise sentences with no filler. It front-loads the core action and resource, then adds the return-format detail, making it easy to parse quickly.

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

Completeness4/5

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

The tool is simple, the schema covers all parameters, and there is no output schema. The description adequately explains what is returned and the source scope. A brief note on error cases or output structure would increase completeness, but the current level is sufficient for this low-complexity tool.

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

Parameters3/5

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

Schema description coverage is 100%, so the baseline is 3. The description adds modest value by emphasizing 'full content' and 'requested format', but it does not provide meaningfully more detail than the schema already gives for the url and format parameters.

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

Purpose5/5

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

The description clearly states the action (fetch) and resource (full content of a specific documentation page), which distinguishes it from siblings like search_docs and list_sections. The phrase 'specific documentation page' makes the tool's scope immediately evident.

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

Usage Guidelines3/5

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

The usage context is implied: use this tool when you have the URL of a specific page and want its full content. However, it does not explicitly mention alternatives or state when to use search_docs or list_sections instead.

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

list_sectionsA

List available documentation sections organized by platform. Shows section names, page counts, and subsections.

ParametersJSON Schema
NameRequiredDescriptionDefault
platformNoFilter by documentation platformall

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It reveals the output content (section names, page counts, subsections) and the read-only 'List/Shows' nature of the operation, but does not disclose anything about default behavior when platform is omitted, error conditions, or ordering/organization details.

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 tight sentences with zero filler. The core purpose is front-loaded, and the second sentence lists the returned fields. Every word earns its place.

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

Completeness4/5

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

For a simple 1-optional-parameter, no-output-schema tool, the description covers the essentials: what is listed and what is returned. It is slightly incomplete in not stating the default scope (all platforms) explicitly in prose, though the schema's default covers that gap.

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

Parameters3/5

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

Schema description coverage is 100%, with the platform parameter fully documented via enum and 'Filter by documentation platform'. The description's 'organized by platform' phrase adds mild semantic context linking the parameter to output organization, but nothing beyond what the schema already conveys. A baseline 3 is appropriate.

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?

States a specific verb ('List') and resource ('available documentation sections'), with a scope qualifier ('organized by platform') and the concrete output contents. It is distinguishable from siblings like search_docs and fetch_page by the listing behavior, though it does not explicitly name a sibling to differentiate itself from.

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

Usage Guidelines3/5

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

Usage is implied rather than stated: an agent can infer this is the browse/explore tool to call before searching or fetching specific pages. However, there is no explicit guidance on when to choose list_sections over search_docs, nor any exclusions or prerequisites.

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

refresh_indexA

Refresh the documentation search index by re-crawling documentation sites. Use force=true to bypass cache.

ParametersJSON Schema
NameRequiredDescriptionDefault
forceNoForce refresh even if cache is fresh
platformNoWhich platform to refreshall

TDQS

A3.7/5.0
Behavior3/5

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

With no annotations, the description carries the full behavioral disclosure burden. It reveals the main mutation (re-crawling sites to refresh the index) and the cache-bypassing effect of 'force=true', which is valuable. However, it does not disclose potential side effects, expected duration, permission requirements, or what happens to the index during a refresh, leaving important behavioral context absent.

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?

The description consists of two concise sentences, with the primary action front-loaded in the first sentence and a conditional usage tip in the second. It contains no filler or redundant content. Every sentence contributes directly to understanding the tool.

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?

For a simple optional-parameter tool, the description provides the core operation and the cache-bypass behavior, and the schema fills in parameter details. However, since there is no output schema and no annotations, the description omits what the tool returns, whether special permissions are needed, and any caveats about long-running re-crawls. This leaves a moderate gap in operational context for an agent.

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

Parameters3/5

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

The input schema already documents both parameters completely, including defaults and the platform enum, so schema coverage is 100%. The description's 'force=true to bypass cache' simply restates the schema's 'Force refresh even if cache is fresh' without adding new meaning. A baseline of 3 is appropriate when the schema handles parameter documentation.

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

Purpose5/5

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

The description states a specific verb ('Refresh'), a clear resource ('documentation search index'), and the method ('by re-crawling documentation sites'). This clearly differentiates it from read-only siblings like search_docs, fetch_page, and list_sections. There is no ambiguity about the tool's core function.

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

Usage Guidelines3/5

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

The description implies the tool is used when the search index is stale and needs rebuilding, but it does not explicitly state when to use it versus alternatives or mention any exclusions. It also offers no guidance on choosing the 'platform' parameter values, aside from what the schema already provides. The 'force=true' advice is parameter-level rather than tool-level usage guidance.

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

search_docsA

Search across Anthropic Claude and Google Gemini documentation with fuzzy matching. Returns ranked results with snippets.

ParametersJSON Schema
NameRequiredDescriptionDefault
fuzzyNoEnable fuzzy matching (true/false or threshold 0-1)
limitNoMaximum number of results to return
queryYesSearch query string
platformNoFilter by documentation platformall

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 behavioral burden and does add useful details: fuzzy matching, ranking, and snippet-style results. However, it does not disclose whether the operation is read-only, whether external calls are made, or any limitations such as index freshness, which would be more important for a non-obvious 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?

The description is two concise sentences with no wasted words. The core purpose is front-loaded, and the result format is mentioned in the second sentence, making it efficient and easy to parse.

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

Completeness4/5

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

For a search tool with well-documented parameters, the description covers the essential invocation requirements and return style. There is no output schema, so the mention of 'ranked results with snippets' helps fill that gap, though explicit guidance about when to use it over siblings is missing.

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

Parameters3/5

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

The schema has 100% parameter description coverage, so the baseline is 3. The description mentions fuzzy matching, which loosely maps to the fuzzy parameter, but it does not add significant meaning beyond what the schema already documents.

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

Purpose5/5

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

The description clearly states a specific action ('search'), a specific resource ('Anthropic Claude and Google Gemini documentation'), and adds distinctive behavior ('fuzzy matching', 'ranked results with snippets'). This sufficiently distinguishes it from sibling tools like fetch_page and list_sections.

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

Usage Guidelines3/5

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

The usage context is implied by the verb 'search' and the presence of sibling tools, but the description does not explicitly state when to use this tool versus alternatives or mention any exclusions. An agent must infer that search_docs is the right choice for finding information rather than fetching or listing.

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

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 4 tool updatesv1.0.0
    • First observedfetch_page
    • First observedlist_sections
    • First observedrefresh_index
    • First observedsearch_docs

TDQS

A4.1/5.0

Scored across 4 tools

Disambiguation5/5

Each tool serves a clearly distinct purpose: searching, fetching, browsing structure, and maintaining the index. There is no overlap or ambiguity between the tools.

Naming Consistency5/5

All tools follow a consistent verb_noun snake_case pattern: search_docs, fetch_page, list_sections, refresh_index. The naming style is uniform and predictable.

Tool Count5/5

Four tools is a well-scoped set for a documentation assistant. Each tool covers a necessary function without redundancy or bloat.

Completeness5/5

The tool set covers the full documentation workflow: discover sections, search for relevant content, retrieve full pages, and refresh the index. There are no obvious dead ends or missing core operations for its stated purpose.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers