
Anytype Mcp
io.github.anyproto由 GitHub 帳號 anyproto 發布v1.0.7更新於 Oct 27, 2026
Official MCP server for Anytype API - your encrypted, local and collaborative wiki.
概覽
Anytype 官方 MCP 伺服器,把 Anytype API 轉換成工具,讓助理在知識庫中搜尋、建立與編輯空間、物件、屬性及類型。
- 可以做什麼
- 全域與空間內搜尋,並列出空間及成員
- 建立、讀取、更新與刪除物件,管理清單與集合
- 處理屬性、標籤、類型與範本,並支援結構探索
- 建立聊天、列出聊天訊息,並將檔案下載到本機暫存路徑
- 檢視目前憑證的權限,並支援試執行、分頁與以 etag 為基礎的衝突檢查
- 適用情境
- 適合把筆記、任務或專案資料放在 Anytype,並希望助理以對話方式查詢與修改該知識庫的情境,例如依描述建立空間、任務或集合。
- 執行需求
- 透過 npx 或全域 npm 安裝在本機執行,需要 Node.js 以及正在執行並開放本機 API 的 Anytype 應用程式(預設 OPENAPI_MCP_HEADERS 環境變數中以 JSON 提供 Anytype API 金鑰,可選用 ANYTYPE_API_BASE_URL 指定自訂位址。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Anytype Mcp,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
Anytype MCP Server
[NPM version] [Add anytype MCP server to Cursor] [Add MCP Server anytype to LM Studio] [Add to Kiro]
The Anytype MCP Server is a Model Context Protocol (MCP) server enabling AI assistants to seamlessly interact with Anytype's API through natural language.
It bridges the gap between AI and Anytype's powerful features by converting Anytype's OpenAPI specification into MCP tools, allowing you to manage your knowledge base through conversation.
Features
- Global & Space Search
- Spaces & Members
- Objects & Lists
- Properties & Tags
- Types & Templates
Quick Start
1. Get Your API Key
- Open Anytype
- Go to App Settings
- Navigate to API Keys section
- Click on
Create newbutton
Alternative: Get API key via CLI
You can also get your API key using the command line:
2. Configure Your MCP Client
Claude Desktop, Cursor, Windsurf, Raycast, etc.
Add the following configuration to your MCP client settings after replacing <YOUR_API_KEY> with your actual API key:
Tip: After creating an API key in Anytype, you can copy that ready-to-use configuration snippet with your API key already filled in from the API Keys section.
Claude Code (CLI)
Run this command to add the Anytype MCP server after replacing <YOUR_API_KEY> with your actual API key:
Alternative: Global Installation
If you prefer to install the package globally:
- Install the package:
- Update your MCP client configuration to use the global installation:
Custom API Base URL
By default, the server connects to http://127.0.0.1:31009. For anytype-cli (port 31012) or other custom base URLs, set ANYTYPE_API_BASE_URL:
Example Configuration
MCP Client (Claude Desktop, Cursor, etc.):
Claude Code (CLI):
Example Interactions
Here are some examples of how you can interact with your Anytype:
- "Create a new space called 'Project Ideas' with description 'A space for storing project ideas'"
- "Add a new object of type 'Task' with title 'Research AI trends' to the 'Project Ideas' space"
- "Create a second one with title 'Dive deep into LLMs' with due date in 3 days and assign it to me"
- "Now create a collection with the title "Tasks for this week" and add the two tasks to that list. Set due date of the first one to 10 days from now"
Tool behavior and API versions
The server loads one OpenAPI document at startup. With the standard configuration it tries /v2/docs/openapi.json first. If that endpoint returns 404 or 410, it falls back to /docs/openapi.json on the same server, where older apps serve v1. This selects v2 whenever available while supporting apps that only have the legacy API:
To explicitly use the legacy v1 API, select its versioned spec:
The versioned /v2/docs/openapi.json URL also remains available for explicitly selecting v2.
Explicit spec URLs and local files are used exactly as supplied, without fallback. Authentication failures, server errors, connection failures, and malformed JSON also fail startup instead of selecting another API. The wrapper uses the routes declared in the selected document without rewriting their version prefixes.
Discovery runs once per MCP process. Tool calls reuse the parsed specification and HTTP client without fetching OpenAPI again. Restart the MCP server after updating Anytype to discover a newly available API version; no persistent spec cache is used.
Tool descriptions contain operation guidance; API errors are returned when calls fail, with isError: true, HTTP status when available, and the API's code, message, issues, and hints.
The server names its own operations by OpenAPI operationId in the prose it serves. In the MCP tool listing and in the field descriptions of a get_schema or get_op_schema response, those names are re-spelled as this wrapper's tool names (list_properties becomes API-list-properties). A repair hint is different: the server spells each operation it names as a REST route and lists it as a typed see_also reference, so the wrapper replaces that route text with the tool name and arguments, and annotates the reference with tool and args. Literal values are never rewritten: enum and example values, op names, endpoint strings and output schemas keep the server's spelling, and so do the OpenAI and Anthropic tool exports, which name tools by operationId.
Successful v1 object creation, updates, deletion, and chat creation return a compact object receipt with its ID, space ID, name, archive state, and type identity when available. The wrapper omits echoed markdown, snippets, property values, icons, and full type definitions. It preserves warnings, generated IDs, and etag/retry metadata. Read the object to retrieve its content when needed. v2 already returns compact create/edit receipts, which are passed through unchanged apart from their warnings, whose hints are re-spelled and whose references gain tool and args; reads, searches, and errors also keep their full API responses.
The shared tool policy controls inputs and request routing:
AuthorizationandAnytype-Versioncome fromOPENAPI_MCP_HEADERS.expected_etagmaps toIf-Match. Use the etag from a previous read to prevent overwriting a changed object. The wrapper does not retry a failed precondition or remove it. Response etags are returned in a separaterequest_metadatatext block when available.request_keymaps toIdempotency-Keyon endpoints that declare that header. Omit it for a new write; the wrapper generates a unique key and returns it inrequest_metadataor an error'srequest_key. Reuse it only to retry the same write. Separate calls get different generated keys, even with identical documents. There are no automatic retries. A globalIdempotency-KeyinOPENAPI_MCP_HEADERSis rejected.- Existing callers can still use the exact legacy
If-MatchandIdempotency-Keyargument names. They are not advertised alongside the new names. Conflicting alias values are rejected. - Pagination, field selection,
dry_run,create_missing_options, and schema discovery remain available. - Pairing and API-key management are excluded. v2
auth_whoamiremains available for inspecting the current credential's permissions; its response does not contain the bearer token. - Event-stream tools are excluded because they do not produce a bounded tool result. Use message-listing tools to retrieve chat messages.
- File downloads are supported through a binary adapter. The tool streams bytes to a private temporary directory and returns
path,filename,media_type, andsize. The path is local to the machine/container running MCP. Successful files remain there until removed or cleaned up by the operating system; interrupted downloads are removed. Range and cache headers are not model inputs.
Known inputs with HTTP meanings are matched by parameter location, so a document's own fields are preserved. Open-ended JSON documents use the body argument. Objects with declared fields use flat arguments. The existing omission of flattened filters fields and the FilterExpression schema fallback remain separate limitations; this cleanup does not restore filter-schema support.
Duplicate final tool names fail startup with both routes identified. Select separate v1/v2 specs instead of merging operations with overlapping names.
Set ANYTYPE_MCP_DEBUG=1 for concise operation names, response status, and timing on stderr. Arguments, authorization headers, payloads, and entire operation tables are not logged.
Measuring tool definitions
The default command compares fixed v1 and v2 fixtures. It reports tool count, serialized characters, and UTF-8 bytes, not model-specific token counts.
Development
Installation from Source
- Clone the repository:
- Install dependencies (requires Bun):
- Build the project:
- Link the package globally (optional):
Contribution
Thank you for your desire to develop Anytype together!
❤️ This project and everyone involved in it is governed by the Code of Conduct.
🧑💻 Check out our contributing guide to learn about asking questions, creating issues, or submitting pull requests.
🫢 For security findings, please email [email protected] and refer to our security guide for more information.
🤝 Follow us on Github and join the Contributors Community.
Made by Any — a Swiss association 🇨🇭
Licensed under MIT.
來源:README.md,提交 0134fe8
工具
0版本歷史
1- v1.0.7最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分