Anytype (self-hosted HTTP)

io.github.ohneben由 GitHub 账号 ohneben 发布v1.0.6更新于 Oct 24, 2026

Self-hosted Anytype MCP server: the full Anytype API as an always-on Docker + HTTP endpoint.

已验证STDIO仅桌面效率与工作流知识与记忆

概览

AI 生成的概览

自托管的 Anytype MCP 服务器,通过 Docker 和 HTTP 暴露本地 Anytype 桌面 API,让助手搜索和编辑你的知识库。

可以做什么
搜索并读取 Anytype 空间中的对象、笔记和任务,包括通过 get-object 获取完整 Markdown 正文。创建和更新对象、任务与空间,并添加清单等内容。删除对象,工具按只读、写入和破坏性操作分组提示。一次调用即可获取所有空间、类型和属性定义的概览。默认返回精简后的 API 响应以节省上下文。
适用场景
当你希望在同一台机器上为多个 MCP 客户端提供常驻的 Anytype 连接,而不是每个客户端各自启动 stdio 子进程时使用。适合让助手在本地 Anytype 知识库中搜索、创建或整理笔记和任务。
运行要求
需安装并运行 Anytype 桌面应用,其本地 API 可访问(默认 127.0.0.1:31009),并需要 Docker。需在桌面应用中创建 Anytype API 密钥并设为 ANYTYPE_API_KEY。可选配置包括 ANYTYPE_API_BASE_URL、ANYTYPE_API_HOST_HEADER、ANYTYPE_VERSION、ANYTYPE_MCP_SLIM_RESPONSES、PORT 和 MCP_SHARED_TOKEN。仅支持 stdio 的客户端需要 mcp-remote 桥接。
安装前请注意
HTTP 端点默认无认证;在 localhost 之外暴露前应设置 MCP_SHARED_TOKEN。ANYTYPE_API_KEY 中的 API 密钥可访问你的 Anytype 数据,切勿提交到仓库。工具可创建、修改和删除对象与空间,破坏性调用会作用于真实数据。数据仅在容器与桌面应用之间本地传输。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Anytype (self-hosted HTTP),将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

ohneben Anytype MCP

[Buy Me A Coffee]

[CI] [MCP Registry] [License: MIT] [Anytype-MCP MCP server]

Talk to your Anytype knowledge base in plain language from AI assistants like Claude, Cursor, and any other MCP client.

This is a self-hosted fork of the official anyproto/anytype-mcp that adds a Docker container and a Streamable-HTTP transport, so the server can run quietly in the background and be reached by any MCP client over HTTP. (The original speaks stdio only.)

Why this one?

The official Anytype MCP server is great, but it runs as a stdio subprocess that each client has to launch on demand. This project keeps 100% of its capabilities and adds a production-style deployment: one always-on server, in Docker, that any number of MCP clients can reach over HTTP.

CapabilityThis projectOfficial anyproto/anytype-mcpOther community servers*
Full Anytype API coverage (dynamic OpenAPI → MCP tools)✅✅✅
stdio transport✅✅✅
Streamable-HTTP transport (native, or via mcp-remote)✅❌❌
Always-on background service✅❌❌
One server → many clients at once✅❌❌
Docker + docker-compose✅❌❌
Health-check endpoint + auto-restart✅❌❌
Optional bearer-token auth on the endpoint✅❌❌
🟢 / 🟡 / 🔴 read-only / write / destructive tool hints✅➖➖
Automated test suite (Vitest)✅✅➖
LicenseMITMITvaries

*Community servers such as Qwinty/anytype-mcp (JS), wethegreenpeople/anytype-mcp (Python) and anytype-mcp-plus — most are stdio-only and launched via npx. "➖" = not documented / varies. Snapshot from July 2026; check each project for its latest.

In short: if you just want to try Anytype from your AI client, the official server is perfect. If you want it running in the background, always ready, and shared across every MCP client on your machine, use this one.

What you can do

Once it's connected, ask your assistant things like:

  • "Search my Anytype for notes about the Q3 launch."
  • "Create a task 'Write the report', due in 3 days."
  • "Make a new space called 'Travel' and add a packing checklist."

Tools are generated automatically from your running Anytype app and grouped into 🟢 read-only, 🟡 write, and 🔴 delete.

The server is tuned to keep your assistant fast and frugal with tool calls:

  • API-get-overview — a synthesized tool that returns all spaces with their types (or, given a space_id, that space's types and property definitions) in a single call, instead of a list-spaces → list-types → list-properties cascade.
  • Slim responses — API payloads are compacted before they reach the assistant: empty property values, object discriminators, and nulls are dropped, and the type embedded in each search/list result is reduced to its identifiers. This typically shrinks list/search responses by well over half, which means less context burned per call and fewer follow-up calls. Set ANYTYPE_MCP_SLIM_RESPONSES=false to get raw API payloads instead.
  • Routing hints — tool descriptions tell the assistant which tool is cheapest for a job (e.g. search instead of paginating lists, and that only get-object returns the full markdown body).

How it works

Claude / Cursor / …  ──MCP──►  this server  ──HTTP──►  Anytype desktop app (local API)

The server only talks to the local API of the Anytype desktop app on your own machine. Your data stays on your computer.

Requirements

  • The Anytype desktop app, installed and running (it serves a local API at 127.0.0.1:31009).
  • Docker (Docker Desktop on macOS/Windows) for the setup below.

Quick start (Docker)

1. Add your API key. Copy the example config and paste in a key:

bash
cp .env.example .env# open .env and set ANYTYPE_API_KEY=...   (see "Get an API key" below)

2. Start the server:

bash
docker compose up -d --build

3. Confirm it's running:

bash
curl -s http://localhost:8769/healthz     # → {"status":"ok"}

4. Connect your MCP client. Add an anytype entry under mcpServers, then fully quit and reopen the app. Pick the form that matches your client:

Claude Code (or any client that speaks Streamable-HTTP natively) — connect directly, no helper process:

json
"anytype": {  "type": "http",  "url": "http://localhost:8769/mcp"}

Claude Desktop (its config is stdio-only) needs the mcp-remote bridge. Install it once, then launch it via node rather than npx:

bash
npm i -g mcp-remote
json
"anytype": {  "command": "/opt/homebrew/bin/node",  "args": [    "/opt/homebrew/lib/node_modules/mcp-remote/dist/proxy.js",    "http://localhost:8769/mcp",    "--allow-http"  ]}

Why not npx -y mcp-remote …? npx re-resolves the package through the npm cache on every launch. When a client cold-starts several MCP servers at once they contend on that cache, and some launchers can wedge inside npx for minutes — which the client reports as a connection timeout. Installing mcp-remote once and launching it with node removes that step. Use absolute paths (GUI apps don't inherit your shell PATH, and mcp-remote's own #!/usr/bin/env node shebang can't find node otherwise). The paths above are Apple-Silicon Homebrew defaults; adjust with which node and npm root -g if yours differ.

That's it — ask your assistant to search or create something in Anytype.

Get an API key

In the Anytype desktop app: Settings → API Keys → Create new. Copy the key into .env as ANYTYPE_API_KEY=. Your key stays in .env, which git ignores, so it is never committed.

Configuration

Everything is set in .env (copied from .env.example):

VariableDefaultWhat it does
ANYTYPE_API_KEY—Your Anytype API key. Required.
ANYTYPE_VERSION2025-11-08Anytype API version header.
ANYTYPE_API_BASE_URLhttp://host.docker.internal:31009Where the Anytype app's API is reachable from the container.
ANYTYPE_API_HOST_HEADER(auto)Host header sent to the Anytype API. Auto-set to localhost:<port> when the base URL uses a container host alias, because Anytype rejects any other Host with 403 request origin is not allowed.
PORT8769Host port for the MCP endpoint.
MCP_SHARED_TOKEN(empty)Optional bearer token to protect the endpoint. Empty = open, for localhost only.
ANYTYPE_MCP_SLIM_RESPONSEStrueCompact API responses before sending them to the assistant. Set to false for raw payloads.

After changing .env, reload with docker compose up -d --force-recreate.

For logs, restart, key rotation, and verification commands, see DOCKER.md.

Run from source (stdio, no Docker)

Prefer the classic stdio mode? Build it locally:

bash
npm installnpm run build

Then register it with your client using a stdio command and your key in OPENAPI_MCP_HEADERS — see the upstream README for the exact stdio configuration.

Security

  • Your API key lives only in .env, which is git-ignored. Never commit real keys.
  • The HTTP endpoint is unauthenticated by default (fine on localhost). To expose it beyond your machine, set MCP_SHARED_TOKEN and send it as a Bearer header or ?token=….

MCP Registry

This server publishes to the official MCP Registry under the name io.github.ohneben/anytype-mcp. To look up the current listing:

bash
curl "https://registry.modelcontextprotocol.io/v0/servers?search=io.github.ohneben/anytype-mcp"

Its listing is described by server.json and is republished automatically on every v*.*.* tag by .github/workflows/publish-mcp.yml, which waits for the matching GHCR image and authenticates with GitHub OIDC (no secret needed). The registry proves the image is ours via the io.modelcontextprotocol.server.name label in the Dockerfile, so the GHCR package must stay Public.

Releasing

The git tag is the version. Pushing v1.2.3 is the whole release: the tag is stamped into package.json before the image is built and into server.json before the listing is published, so the version the server reports to MCP clients, the image tag, and the registry entry cannot disagree. Nothing needs to be bumped by hand first, and the versions committed here are only the defaults used by local builds.

Credits & license

Built on the official Anytype MCP server by Any Association. Licensed under the MIT License.

来源:README.md,提交 7e1c132

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v1.0.6最新Sep 16, 2026

评分

已满足适用检查项的 50%

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

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分