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 分