Agent Docs

io.github.KonstantinStarovoytov由 GitHub 帳號 KonstantinStarovoytov 發布v0.1.1更新於 Oct 26, 2026

Search the official docs of Claude Code, Cursor, OpenAI Codex and MCP, refreshed daily.

已驗證Streamable HTTP可網頁執行知識與記憶開發者工具

概覽

AI 產生的概覽

遠端 MCP 伺服器,讓助理檢索並閱讀 Claude Code、Cursor、OpenAI Codex 與 MCP 的最新官方文件,索引每日更新。

可以做什麼
  • 檢索 Claude Code、Cursor、Codex 與 MCP 的官方文件,可限定單一產品,回傳每個頁面的最佳段落及頁面簡介與相關度分數
  • 讀取頁面的簡介與大綱,或讀取指定標題的整節內容,長節可用位移量繼續讀取
適用情境
適合助理回答關於 Claude Code、Cursor、Codex 或 MCP 的安裝、設定與管理問題,這些產品變化快於模型訓練資料。不適用於其他產品或一般程式設計問題。
執行需求
透過 streamable HTTP 連線的遠端 MCP 端點,無需本機安裝。每次工具呼叫需提供兩種標頭之一:X-Cohere-Api-Key(自己的 Cohere 金鑰)或 Authorization(擁有者簽發的 Bearer 權杖)。連線與列出工具無需金鑰。免費託管方案在閒置 15 分鐘後,首次請求約需一分鐘。
安裝前請注意
呼叫工具需要金鑰標頭:自己的 Cohere API 金鑰(為該次請求的重新排序付費)或擁有者簽發的 Bearer 權杖。有速率限制(每 IP 每分鐘 30 次),檢索會被 Langfuse 追蹤。伺服器只讀取文件,不會寫入或修改你的資料。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Agent Docs,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Web executable,透過 Streamable HTTP。 遠端服務在工作區中設定後即可從網頁執行環境執行。

交給代理程式安裝

把這段提示詞貼上到 Claude Code、Codex、Cursor 等代理程式,或 SourceWeft 對話中。代理程式會讀取該伺服器的安裝指南,先向你展示發布者、端點和登入方式,經你同意後再把它新增到你的客戶端。金鑰不會寫進任何命令。

閱讀 https://sourceweft.com/mcp/io.github.KonstantinStarovoytov%2Fagent-docs/install.md,並按其中說明把這個 MCP 伺服器接入我的客戶端。修改任何設定之前,先告訴我它的發布者、端點和登入方式,等我確認。不要把 API 金鑰寫進命令或我會提交的檔案;問我金鑰應從哪裡取得。

檢視代理程式所依據的安裝指南

其他 MCP 客戶端

把它新增到你客戶端的 mcpServers 設定中。

{
  "mcpServers": {
    "agent-docs": {
      "type": "http",
      "url": "https://agent-docs-mcp.onrender.com/mcp/"
    }
  }
}

README

Agent Docs

An MCP server that gives AI agents the current official documentation of Claude Code, Cursor, Codex and MCP.

These tools change faster than a model's training data. Agent Docs keeps about 600 pages of their official docs in a search index, refreshes it every day, and gives your agent two tools: one finds the right passage, the other reads a whole section. The agent answers from the real docs and can link to them.

It runs as a remote MCP server (and over REST). You can try it with a free Cohere key.

[Query flow: an agent asks how to create a skill; search_docs finds the page, read_section returns the section, Langfuse measures every step]

Step through it at your own pace (arrow keys work), or open the stills:

The 15 steps as still images [Step 1: The question] [Step 2: The agent plans the call] [Step 3: search_docs goes out] [Step 4: Hybrid search over chunks] [Step 5: Rank fusion] [Step 6: Rerank] [Step 7: One chunk per page] [Step 8: What the agent receives] [Step 9: read_section maps the page] [Step 10: read_section returns the section] [Step 11: A cited answer] [Step 12: Search is traced] [Step 13: Evals: code and an LLM judge] [Step 14: The regression gate] [Step 15: Refreshed every day]

Source and how to rebuild: docs/flow/

How it was built and what was measured: ARCHITECTURE.md.


Connect

Add the server to any MCP client (Claude Code, Cursor, OpenWebUI and others):

json
{  "mcpServers": {    "agent-docs": {      "url": "https://agent-docs-mcp.onrender.com/mcp/",      "headers": { "X-Cohere-Api-Key": "<your Cohere key>" }    }  }}

Calling a tool needs one of two headers:

  • Your own Cohere key: X-Cohere-Api-Key: <key>. A free trial key is at dashboard.cohere.com. The key pays for reranking that one request; it is never stored or logged. Limit: 30 requests a minute per IP.
  • A token from the owner: Authorization: Bearer <API_TOKEN>. For a guest token, open an issue titled "Guest token request".

The server is on a free plan: after 15 idle minutes, the first request takes about a minute.

ToolWhat it returns
search_docs(query, limit=8, product=None, response_format="concise")The best passage from each matching page, ranked, with the page's one-line description and a relevance score. Ask about one topic per call. product: claude-code, cursor, codex, mcp
read_section(url, heading=None, offset=0, outline_depth=2)Without a heading: the page's description and outline (outline_depth=3 adds subsections). With a heading: the whole section, up to 8,000 characters per call (next_offset gives the rest)

Over REST:

bash
curl -X POST https://agent-docs-mcp.onrender.com/ask \  -H "Authorization: Bearer $API_TOKEN" -H 'content-type: application/json' \  -d '{"question": "How do I add an MCP server in Claude Code?"}'

With your own key, replace the Authorization line with -H "X-Cohere-Api-Key: $COHERE_API_KEY".

EndpointPurpose
GET /healthLiveness, no token
POST /askA written answer with citations
POST /searchPassages with page descriptions (search_docs)
POST /pagesPage cards: description and outline
POST /sectionOne section of a page (read_section)
POST /mcp/MCP (streamable HTTP)
GET /docsInteractive API docs (use Authorize with the token)

Locally, without a server (stdio, no token):

json
{ "mcpServers": { "agent-docs": { "command": "uv",  "args": ["run", "--directory", "/path/to/agent-docs", "rag-mcp"] } } }

For MCP directories: connecting and listing the tools need no key (30 requests a minute per IP); only tools/call does. The server keeps no session, so GET /mcp answers 405; send everything with POST. Listed in the official MCP Registry as io.github.KonstantinStarovoytov/agent-docs (server.json).

What it covers

ProductSource
Claude Code (incl. Agent SDK, plugins)code.claude.com/docs/llms.txt
Cursorcursor.com/llms.txt
Codexdevelopers.openai.com/codex/llms.txt
MCP (latest spec, registry, extensions)modelcontextprotocol.io/llms.txt

How it works

Your agent calls search_docs, then read_section when a passage is not enough. No language model runs on the server for this: the agent reads the passages and writes the answer itself.

search_docs works in four steps:

  1. It searches by meaning (embeddings) and by exact words (BM25) at the same time, so both "connect a tool server" and claude mcp add find the right page.
  2. It merges the two result lists by rank. Ties are kept in a fixed order, so the same question always gets the same results.
  3. A reranker (Cohere) reads the top 20 together with the question and scores how well each one matches.
  4. It keeps the best passage of each page and adds the page's one-line description and the headings of its other matching sections.

read_section reads from a stored copy of the page; no model is called. Searches are traced in Langfuse.

The REST endpoint /ask is for clients that are not agents. It also translates Russian and Polish questions into English, says "the documentation does not cover this" when even the best candidate scores below 0.55, picks 8 chunks (at most 2 from one section), and has gpt-6-luna write an answer that cites them.

Updated every day

[Daily reindex, drawn as the ledger of the run of 14 Oct 2026: read llms.txt, fetch, compare fingerprints, then new, changed and gone pages, checks and reports]

Step through it at your own pace, or open the stills:

The 12 steps as still images [Reindex step 1: Every day at 06:00 UTC] [Reindex step 2: Read each llms.txt] [Reindex step 3: Fetch every page] [Reindex step 4: Compare fingerprints] [Reindex step 5: Unchanged pages] [Reindex step 6: New pages: the page gate] [Reindex step 7: Changed pages] [Reindex step 8: Gone pages: the removal guard] [Reindex step 9: Smoke check] [Reindex step 10: Change report] [Reindex step 11: Review issue] [Reindex step 12: Failure issue]

Every day at 06:00 UTC a GitHub Actions job reads each vendor's list of pages (llms.txt) and updates the index:

  • Changed pages are embedded again; unchanged ones are skipped.
  • New pages are checked first. A suspicious one waits in a GitHub issue until the owner ticks Index or Decline.
  • Pages that disappear from the list are deleted, unless too many disappear at once.
  • A short report of what changed in the products goes to reports/docs-changes/.

Measured results

Each change was measured on labelled questions before it was kept. All experiments, including the ones that did not work: ARCHITECTURE.md.

ChangeMeasured effect
8 chunks instead of 5 for /askMulti-part questions fully covered: 25% → 75%
English copy of non-English questionsHit@5: 0.958 → 1.000
10 candidates for the reranker, not 20Fully covered: 75% vs 50% (the extra candidates pushed out the second topic)
gpt-6-luna instead of gpt-5.6-lunaFaithfulness: 0.975 → 0.994
Ties in a fixed orderThe same question gets the same results (it did not before)
One passage per page in search_docsDistinct pages in the top 5: 3.1 → 5.0; page hit@5: 0.936 → 0.979
Headings of a page's other matching sections (other_sections)Labelled section visible: 0.667 → 0.867; with real agents, the same correctness and fewer failed section reads (11 → 1)

When an answer misses part of a question, the search has usually found the right text. It gets lost later, when the candidates are cut down to what the model sees.


Where it runs

PartServicePlan
API + MCP serverRender, service agent-docs at agent-docs-mcp.onrender.comFree web service
Vector indexQdrant CloudFree 1 GB cluster
Traces, eval datasets, promptsLangfuse CloudFree Hobby
Daily re-index, CIGitHub ActionsFree
Embeddings, answersOpenAI (text-embedding-3-small, gpt-6-luna)Pay per use
RerankCohere (rerank-v4.0-fast)Trial key + fallback key

Deploys run only after CI passes. The whole service is defined in render.yaml.

Deploy your own: Render → New → Blueprint → this repo. Fill the secrets it asks for (OPENAI_API_KEY, COHERE_API_KEY, optional COHERE_API_KEY_FALLBACK, QDRANT_URL, QDRANT_API_KEY, LANGFUSE_PUBLIC_KEY, LANGFUSE_SECRET_KEY); API_TOKEN is generated for you. If you change the host name, update API_ALLOWED_HOSTS (the MCP transport rejects unknown hosts). Revoke a guest by clearing API_GUEST_TOKEN.

Cost

WhatCost
Hosting, database, tracing, CI$0 / month (free tiers)
One answer (/ask)≈ $0.0007 (OpenAI; rerank on the free trial)
One search (search_docs)≈ $0 (one embedding + one rerank)
Daily re-index, nothing changed$0
Daily re-index, a few pages changed< $0.01 (embeddings + one short LLM check per new page)
Full rebuild of the index≈ $0.10–0.30 one-off (embeddings ≈ $0.07 + one short LLM check per page)

Limits of the free setup: Cohere trial allows 1,000 reranks/month per key (two keys) and 10/minute; the API is capped at 60 paid requests/minute.


Develop

bash
uv sync --locked                      # Python 3.14cp .env.example .env                  # OpenAI, Cohere, Qdrant, Langfuse keysdocker compose up -d                  # local Qdrant + API on :8080uv run python -m src.ask "How do skills work?"uv run pytest -q && uv run ruff check src evals tests && uv run ruff format --check src evals tests && uv run mypy

Re-index locally: uv run python -m src.reindex --dry-run --out /tmp/r (no writes) — or run the Reindex workflow in GitHub Actions.

FolderContents
src/ingestion/Page selection, chunking, junk gate, change report
src/rag/Search, rerank, context selection, generation
src/service/REST API and MCP server (one shared handler)
src/prompts/Prompts, versioned in Langfuse
evals/The eval gate: datasets, runners, scorers (guide)
reports/Experiment results and daily change reports (index)
docs/Diagrams, the animation, findings, publishing notes
data/manifests/What each index holds, page by page
scripts/Diagram rendering, Langfuse CLI with the project's keys

Diagrams: edit docs/diagrams/*.mmd, then uv run python scripts/render_diagrams.py. Animations: edit docs/flow/flows/ask.js (a question) or docs/flow/flows/reindex.js (the daily reindex), then docs/flow/render.sh.

License

MIT

來源:README.md,提交 c9c90a2

工具

2

search_docs

Search official agent docs

Search the official documentation of Claude Code, Cursor, OpenAI Codex and MCP. Use it before answering any question about using, configuring or administering these products. Not for other products or general programming. If the answer could differ between products and the user hasn't said which one, ask. Returns one passage per page, with the page's one-line description and a relevance score; under ~0.5 means the docs probably don't cover it. One topic per call: split multi-part questions. Need more than the passage? Call read_section(url), or read_section(url, heading) for one of the passage's other_sections.

輸入參數limitquery必填productresponse_format

read_section

Read a section of an agent doc page

Read a page found by search_docs. Without a heading: the page's description and outline (top-level sections with subsection counts). With a heading: that section's full text, including its subsections; continue long sections with next_offset. outline_depth=3 also lists subsections; use it only on long pages to find one specific subsection.

輸入參數url必填offsetheadingoutline_depth

版本歷史

2
  1. v0.1.1最新Oct 15, 2026
  2. v0.1.0Oct 14, 2026

評分

已滿足適用檢查項的 100%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通必需25 分
  • 已宣告認證方式必需10 分
  • 已列出工具必需15 分
  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分