Agentdocs Mcp

io.github.hoornet由 GitHub 账号 hoornet 发布v0.10.5更新于 Nov 6, 2026

AgentDocs (agentdocs.eu) MCP: read, search, write, comment, share & attach images to Markdown docs.

已验证Streamable HTTP可网页运行效率与工作流知识与记忆

概览

AI 生成的概览

AgentDocs 的 MCP 服务器,让助手在工作区和空间中搜索、读取、编写、评论并分享 Markdown 文档页面。

可以做什么
  • 识别用户与凭据范围,列出可访问的工作区和空间
  • 按关键词搜索工作区,Pro 工作区还可按语义进行自然语言搜索
  • 浏览页面树,读取页面全文 Markdown、版本号、评论和图片
  • 创建、更新、追加、批量创建、从 Markdown 文件夹导入以及删除页面
  • 为页面生成公开魔法链接,并上传图片用于页面嵌入
  • 列出、发表、编辑、标记解决和删除页面上的串式评论
适用场景
当文档存放在 AgentDocs 中,希望助手直接查资料、起草或更新页面、记录运行笔记与日志,或处理评审评论而无需切换工具时适用。
运行要求
可作为托管远程端点(Streamable HTTP)使用,也可通过 npx agentdocs-mcp 在本地运行,需要 Node.js。需要 AgentDocs 账号和 API 令牌,放在 AGENTDOCS_TOKEN(账号级或空间级),或使用 Authorization 请求头;支持 OAuth 的客户端可不带令牌连接。AGENTDOCS_URL 可覆盖 API 基础地址。语义搜索需要 Pro 工作区。
安装前请注意
令牌可访问你的文档:账号级令牌覆盖你拥有的全部内容,空间级令牌则把会话限制在单个空间。写入是真实生效的:更新页面会生成新版本,delete_page 会级联删除子页面且 API 无法撤销,评论也可被编辑或删除。share_page 会让任何持有链接的人无需登录即可阅读该页面。在托管端点上,按本地路径上传图片会被拒绝,应改用 source_url 或 data。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Agentdocs Mcp,将其添加到工作区。
  2. 连接 所需的 凭据。它们会被私密存储,绝不会在公开页面上展示。
  3. 为需要使用其工具的对话启用该服务。

Web executable,通过 Streamable HTTP。 远程服务在工作区中配置后即可从网页运行时运行。

交给智能体安装

把这段提示词粘贴到 Claude Code、Codex、Cursor 等智能体,或 SourceWeft 对话中。智能体会读取该服务器的安装指南,先向你展示发布者、端点和登录方式,经你同意后再把它添加到你的客户端。密钥不会写进任何命令。

阅读 https://sourceweft.com/mcp/io.github.hoornet%2Fagentdocs-mcp/install.md,并按其中说明把这个 MCP 服务器接入我的客户端。修改任何配置之前,先告诉我它的发布者、端点和登录方式,等我确认。不要把 API 密钥写进命令或我会提交的文件;问我密钥应从哪里获取。

查看智能体所依据的安装指南

其他 MCP 客户端

把它添加到你客户端的 mcpServers 配置中。 客户端会在首次连接时完成 OAuth 登录。

{
  "mcpServers": {
    "agentdocs": {
      "type": "http",
      "url": "https://agentdocs.eu/mcp"
    }
  }
}

README

[AgentDocs]

agentdocs-mcp

MCP server for AgentDocs — the collaborative documentation platform where AI agents are first-class citizens.

Gives MCP clients that run a local server (Claude Code, Claude Desktop, Cursor, Windsurf, Zed, …) native tools to read, search, create, update, and share AgentDocs pages.

Claude.ai (web), Claude Desktop and Claude mobile connect with no token at all: add https://agentdocs.eu/mcp as a custom connector (Settings → Connectors → Add custom connector) and leave Advanced settings empty. AgentDocs implements OAuth 2.1 — Claude discovers the flow automatically, your browser opens an AgentDocs consent page, and you're connected after approving. The grant covers your documents only and is revocable any time at agentdocs.eu → Settings → Connected apps. The hosted Skill remains a connector-free fallback, and Claude Desktop can also run the local stdio config further down.

Listed on the official MCP registry as io.github.hoornet/agentdocs-mcp.

Setup

MCP connector clients (Claude.ai / Desktop / mobile) need no token — see the OAuth note above. For the local stdio server and other clients, you need an AgentDocs API token:

  • Account token — agentdocs.eu → Profile → Regenerate API Token (full access to everything you own), or
  • Space token — Space settings → Tokens (editor access to exactly one space; the server auto-detects this and scopes itself to that space — the recommended way to sandbox an agent).

Remote (hosted) — nothing to install

Any client that speaks remote MCP can use the hosted endpoint directly; there's no package to install and nothing to keep updated. Same 19 tools as the stdio server.

https://agentdocs.eu/mcp        (Streamable HTTP)Authorization: Token <your-token>   # or no header at all — OAuth clients authenticate via the built-in flow
bash
# Claude Codeclaude mcp add --transport http agentdocs https://agentdocs.eu/mcp \  --header "Authorization: Token <your-token>"

Claude.ai (web) and Claude Desktop use the same flow as each other: Settings → Connectors → Add custom connector, with an Authorization request header.

That request-header field is an Anthropic beta, enabled per-account. If Advanced settings offers only OAuth Client ID and OAuth Client Secret, your account doesn't have it — and those OAuth fields won't work here, because AgentDocs doesn't implement OAuth yet (planned). The connector will simply report a connection failure.

In that case use the Skill (Skills → Upload Skill): no beta access needed, same REST API, and the reliable path on Claude.ai today.

Bearer <api_token> is accepted here as well as Token <api_token>, because several clients only offer a "Bearer" field. Account tokens and space-scoped tokens both work — a space token confines the session to its own space, exactly as it does over REST.

Claude Code (local stdio)

bash
claude mcp add agentdocs --env AGENTDOCS_TOKEN=<your-token> -- npx -y agentdocs-mcp

Codex CLI

bash
codex mcp add agentdocs --env AGENTDOCS_TOKEN=<your-token> -- npx -y agentdocs-mcp

or in ~/.codex/config.toml:

toml
[mcp_servers.agentdocs]command = "npx"args = ["-y", "agentdocs-mcp"][mcp_servers.agentdocs.env]AGENTDOCS_TOKEN = "<your-token>"

Claude Desktop / Cursor / Windsurf / Gemini CLI / generic MCP config

In claude_desktop_config.json / .cursor/mcp.json / ~/.codeium/windsurf/mcp_config.json / ~/.gemini/settings.json respectively:

json
{  "mcpServers": {    "agentdocs": {      "command": "npx",      "args": ["-y", "agentdocs-mcp"],      "env": { "AGENTDOCS_TOKEN": "<your-token>" }    }  }}

VS Code (Copilot)

Same server block, but .vscode/mcp.json uses a top-level "servers" key:

json
{  "servers": {    "agentdocs": {      "command": "npx",      "args": ["-y", "agentdocs-mcp"],      "env": { "AGENTDOCS_TOKEN": "<your-token>" }    }  }}

Zed

In settings.json:

json
{  "context_servers": {    "agentdocs": {      "command": "npx",      "args": ["-y", "agentdocs-mcp"],      "env": { "AGENTDOCS_TOKEN": "<your-token>" }    }  }}

Opencode

In opencode.json (project root) or ~/.config/opencode/opencode.json:

json
{  "$schema": "https://opencode.ai/config.json",  "mcp": {    "agentdocs": {      "type": "local",      "command": ["npx", "-y", "agentdocs-mcp"],      "environment": { "AGENTDOCS_TOKEN": "<your-token>" }    }  }}

pi / oh-my-pi

Base pi ships without MCP support — use the Skill or the plain REST API there. The oh-my-pi (omp) fork does support MCP and inherits servers from configs already on disk (.claude, .cursor, .codex, .vscode, …) — add the standard mcpServers block above to one of those (e.g. .cursor/mcp.json) and restart omp.

Windows

Many MCP clients can't spawn npx directly on Windows (spawn npx ENOENT). Wrap the command in cmd /c:

json
"command": "cmd","args": ["/c", "npx", "-y", "agentdocs-mcp"]

Catalog-based MCP gateways (e.g. the Docker MCP gateway) only run servers from their curated catalog and can't launch arbitrary npx servers — agentdocs-mcp isn't listed there yet. Use the hosted remote endpoint instead: https://agentdocs.eu/mcp (Streamable HTTP, same 19 tools, nothing to install) — see Remote above. Failing that, the REST API has full parity.

Configuration

Env varDefaultPurpose
AGENTDOCS_TOKENcontents of ~/.config/agentdocs/tokenAPI token (account or space-scoped)
AGENTDOCS_URLhttps://agentdocs.euOverride the API base URL. Advanced — only set this if you've been given a different endpoint

Updating

The setup commands above are unpinned (npx -y agentdocs-mcp), so they always resolve the latest published version. To pick up a new release, just restart your MCP client — the client only re-launches the server process on restart. The server prints its version on startup (stderr): agentdocs-mcp vX.Y.Z: connected ….

If npx serves a stale cached copy, force a refresh:

bash
npx -y agentdocs-mcp@latest    # or: npm cache clean --force

Tools

ToolDescription
whoamiIdentify the user and credential scope
list_workspacesList accessible workspaces ¹
list_spacesList spaces in a workspace ¹
list_pagesPage tree of a space (without content)
search_docsFull-text (keyword) search across a workspace ¹
semantic_searchNatural-language search ranked by meaning — Pro workspaces ¹
get_pageRead a page (full Markdown + version); optional include_comments / include_children / include_images (returns embedded images as viewable image blocks)
create_pageCreate a Markdown page (nestable)
update_pageUpdate title/content, with optional optimistic version check
append_to_pageAppend Markdown — ideal for logs and session reports
import_markdownImport a folder of Markdown files; paths become the page hierarchy. Idempotent — re-import reuses by source path (no duplicates); parent_page anchor + overwrite_existing re-sync
delete_pageDelete a page (cascades to children)
bulk_create_pagesCreate up to 500 pages atomically with explicit structure
share_pageCreate a public magic link (web + raw-Markdown URLs)
list_commentsList a page's threaded comments (ids, authors, parents)
add_commentPost a comment / threaded reply (with @mentions)
update_commentEdit a comment or mark its thread resolved (author/admin)
delete_commentDelete a comment (author/admin)
upload_imageAttach a PNG/JPEG/GIF/WebP to a space and get Markdown to embed it — from path ², source_url, or base64 data

¹ Hidden when running with a space-scoped token.

² path reads a file from the machine this server runs on, so it works on the stdio server only. The hosted agentdocs.eu/mcp endpoint refuses it — there, the "machine" is AgentDocs' production server, and honouring a caller-supplied path would be arbitrary file read. Use source_url or data there.

Pages, spaces, and workspaces are addressable by UUID or human-readable slug path — get_page accepts "my-workspace/my-space/my-page", create_page accepts "my-workspace/my-space", etc. (Slug paths require an account token.)

Notes

  • Every page update creates a version on the server; old versions stay restorable from the AgentDocs UI.
  • The hosted instance may take ~15 s to respond to the first request after being idle (database cold start) — the server absorbs this with a 35 s timeout and one retry.
  • Free-tier API limits surface as clear messages with an upgrade link.

Development

bash
npm installnpm run build
# End-to-end smoke tests (hit a real AgentDocs instance with YOUR data):SMOKE_TESTBED_SPACE="workspace-slug/scratch-space-slug" \SMOKE_KNOWN_PAGE="workspace-slug/space-slug/page-slug" \node test/smoke.mjs                       # account token: all tools
AGENTDOCS_TOKEN=<space-token> node test/smoke-space-token.mjs   # space-token mode

The testbed space is written to (pages created and deleted) — use a scratch space.

Security

See SECURITY.md. Report vulnerabilities privately to [email protected].

License

MIT

来源:README.md,提交 7a7004a

工具

19

whoami

Who am I

Identify the authenticated AgentDocs user and credential scope. Call this first: a space-scoped credential is locked to a single space, which becomes the default for page tools.

无需输入参数。

list_workspaces

List workspaces

List all AgentDocs workspaces the user can access. Workspaces contain spaces; spaces contain pages.

无需输入参数。

list_spaces

List spaces

List the spaces in a workspace.

输入参数workspace必填

search_docs

Search docs

Full-text (keyword) search across all pages in a workspace. Matches in the returned content_preview are delimited with << >> markers. For natural-language questions, prefer semantic_search.

输入参数query必填workspace必填

list_pages

List pages

List the pages in a space as a tree (content omitted — use get_page to read a page). Pages with a discussion carry comment_count / unresolved_comment_count / last_comment_at — comments do NOT bump a page's updated_at, so check last_comment_at to spot new replies. With a space-scoped token, omit "space" to use the token's space.

输入参数space

get_page

Get page

Read a page including its full Markdown content and current version number. The page carries comment_count / unresolved_comment_count / last_comment_at — if comment_count > 0 there is a discussion; set include_comments to read it. include_children returns the page's child pages (titles + slugs, no content) — useful for 'folder' pages whose own content is empty but which organise sub-pages. include_images returns any images embedded in the page as viewable image blocks, so you can actually SEE a screenshot the page references instead of only its URL.

输入参数page必填include_imagesinclude_childreninclude_comments

create_page

Create page

Create a Markdown page in a space. The slug is derived from the title unless given. With a space-scoped token, omit "space" to use the token's space.

输入参数slugspacetitle必填content必填parent_page_id

update_page

Update page

Update a page's title and/or content. Every update creates a new version (old versions stay restorable). Pass expected_version to fail instead of overwriting concurrent edits.

输入参数page必填titlecontentexpected_version

append_to_page

Append to page

Append Markdown to the end of an existing page (read-modify-write; creates a new version). Ideal for logs, reports, and running notes.

输入参数page必填content必填separator

delete_page

Delete page

Permanently delete a page. WARNING: deletion cascades to all child pages. There is no undo via the API.

输入参数page必填

import_markdown

Import a markdown folder

Import a folder of Markdown files and let the folder structure become the page hierarchy. Each file is { path, content } where path is a relative file path like "guides/setup.md". Folders become parent pages; an index.md or README.md inside a folder supplies that folder page's content; titles come from the first # H1, falling back to the file name. Ideal for an Obsidian vault, a Notion markdown export, or a repo's docs/ folder. Up to 500 files per call. IDEMPOTENT: pages are matched by source path, so re-running an import — or chunking a large vault across several calls — reuses existing pages instead of creating duplicates (response reports created/reused/updated counts). By default existing pages keep their content; set overwrite_existing to re-sync content from the files. Use parent_page to nest the whole import under an existing page. Use bulk_create_pages instead when you want to specify the page tree explicitly. With a space-scoped token, omit "space" to use the token's space.

输入参数files必填spaceparent_pageoverwrite_existing

bulk_create_pages

Bulk create pages

Create up to 500 pages in one atomic call (all succeed or all fail) with an explicitly specified structure (titles, slugs, parent_page_id). To import a folder of Markdown files and derive the hierarchy from file paths, use import_markdown instead. With a space-scoped token, omit "space" to use the token's space.

输入参数pages必填space

share_page

Share page

Create a public magic link for a page — anyone with the link can read it without logging in. Returns a web URL and a raw-Markdown URL (the raw one is ideal for other agents).

输入参数page必填expires_in_days

list_comments

List comments

List the threaded comments on a page, returning each comment's id, content, author and parent. Use this to find a comment's id before update_comment / delete_comment. (get_page with include_comments returns the same thread alongside the page content.)

输入参数page必填

add_comment

Add comment

Post a comment on a page. Set parent_comment_id to reply within an existing thread. The returned 'mentions' array echoes @name tokens parsed from the body — it is informational only; posting a comment does NOT currently notify the mentioned user.

输入参数page必填content必填parent_comment_id

update_comment

Update comment

Edit a comment's body and/or mark its thread resolved. Only the comment's author (or an admin) may update it. Provide at least one of content / resolved.

输入参数comment必填contentresolved

delete_comment

Delete comment

Permanently delete a comment. Only the comment's author (or an admin) may delete it. There is no undo via the API.

输入参数comment必填

upload_image

Upload image

Attach an image to a space and get back the Markdown to embed it in a page. Use this to put screenshots and diagrams into the pages you write, so whoever reads the page later — human or agent — can see what you saw. ACCEPTS: PNG, JPEG, GIF, WebP. Max 5 MB. SVG is rejected (script-injection vector). The format is detected from the file's own bytes, not its name. HOW TO SUPPLY THE IMAGE — give exactly one of: • path — absolute path to an image file on this machine. Prefer this: the bytes never pass through the conversation. • data — base64 of the file's bytes (a "data:image/png;base64,..." URI is also accepted). • source_url — a public http(s) URL; the server fetches it. If you can only SEE an image (e.g. a screenshot another tool returned), you cannot re-encode it from what you see — you need the file. Save it to disk, then pass its "path". Counts against the workspace's image storage quota (Free 50 MB, Pro 5 GB).

输入参数datapathspacealt_textfilenamesource_url

版本历史

3
  1. v0.10.5最新Nov 5, 2026
  2. v0.10.4Oct 9, 2026
  3. v0.10.1Sep 16, 2026

评分

已满足适用检查项的 100%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通必需25 分
  • 已声明认证方式必需10 分
  • 已列出工具15 分
  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分