/ 目录 / 演练场 / anytype-mcp
● 社区 anyproto ⚡ 即开即用

anytype-mcp

作者 anyproto · anyproto/anytype-mcp

官方 Anytype MCP — 从任何 AI 助手搜索和管理你的加密本地 wiki(对象、列表、类型、属性)。

anytype-mcp(anyproto)是 Anytype 团队发布的官方服务。通过你在应用设置中生成的 bearer token 与本地 Anytype API(默认 127.0.0.1:31009)通信。适合那些隐私意识强、想要 agent 可控知识库的用户。

为什么要用

核心特性

实时演示

实际使用效果

anytype.replay ▶ 就绪
0/0

安装

选择你的客户端

~/Library/Application Support/Claude/claude_desktop_config.json  · Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "anytype": {
      "command": "npx",
      "args": [
        "-y",
        "anytype-mcp"
      ],
      "_inferred": true
    }
  }
}

打开 Claude Desktop → Settings → Developer → Edit Config。保存后重启应用。

~/.cursor/mcp.json · .cursor/mcp.json
{
  "mcpServers": {
    "anytype": {
      "command": "npx",
      "args": [
        "-y",
        "anytype-mcp"
      ],
      "_inferred": true
    }
  }
}

Cursor 使用与 Claude Desktop 相同的 mcpServers 格式。项目级配置优先于全局。

VS Code → Cline → MCP Servers → Edit
{
  "mcpServers": {
    "anytype": {
      "command": "npx",
      "args": [
        "-y",
        "anytype-mcp"
      ],
      "_inferred": true
    }
  }
}

点击 Cline 侧栏中的 MCP Servers 图标,然后选 "Edit Configuration"。

~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "anytype": {
      "command": "npx",
      "args": [
        "-y",
        "anytype-mcp"
      ],
      "_inferred": true
    }
  }
}

格式与 Claude Desktop 相同。重启 Windsurf 生效。

~/.continue/config.json
{
  "mcpServers": [
    {
      "name": "anytype",
      "command": "npx",
      "args": [
        "-y",
        "anytype-mcp"
      ]
    }
  ]
}

Continue 使用服务器对象数组,而非映射。

~/.config/zed/settings.json
{
  "context_servers": {
    "anytype": {
      "command": {
        "path": "npx",
        "args": [
          "-y",
          "anytype-mcp"
        ]
      }
    }
  }
}

加入 context_servers。Zed 保存后热重载。

claude mcp add anytype -- npx -y anytype-mcp

一行命令搞定。用 claude mcp list 验证,claude mcp remove 卸载。

使用场景

实战用法: anytype-mcp

将 agent 研究成果捕获到 Anytype 对象

👤 研究人员、PKM 爱好者 ⏱ ~15 min beginner

何时使用: 你想要 Claude 会话中的要点直接进入你的 wiki,而不是丢失在另一个聊天记录中。

前置条件
  • Anytype 桌面版运行中 — anytype.io
  • API 密钥 — Anytype → 应用设置 → API 密钥 → 新建
步骤
  1. 定义目标类型
    在我的 Anytype 空间 'Research' 中,确保存在类型 'Paper Note',包含属性 [title, summary, source, tags]。✓ 已复制
    → 类型已创建或已存在
  2. 从聊天内容创建对象
    对于我在上一轮引用的每篇论文,创建一个包含摘要和标签的 'Paper Note' 对象。✓ 已复制
    → 已创建 N 个对象

结果: 会话知识被持久化,你之后可以找到它。

注意事项
  • Bearer token 在日志中泄露 — 使用环境变量,永远不要硬编码;如果泄露则重新生成
搭配使用: zotero

将 Anytype 收件箱空间处理为有类型的笔记

👤 PKM 维护者 ⏱ ~25 min intermediate

何时使用: 你的 'Inbox' 空间堆积了内容;你想让 AI 对其进行分类并按照适当的类型归档。

步骤
  1. 列出收件箱项目
    搜索空间 'Inbox' 中没有类型或类型为 'Note' 的对象。返回标题和摘要。✓ 已复制
    → 原始收件箱列表
  2. 分类并重新类型化
    对每个项目,提议合适的类型(Idea、Task、Reference、Person)并将其移到正确的空间。应用标签。✓ 已复制
    → 收件箱内容流向结构化的空间

结果: 一个持续处理的 PKM,无需手动分类。

使用 Anytype MCP 询问你自己的 wiki

👤 任何有多年笔记的人 ⏱ ~10 min beginner

何时使用: 你记得写过相关内容但找不到了。

步骤
  1. 全局搜索
    搜索我所有 Anytype 空间中提及 'retrieval augmentation' 的笔记。返回前 10 个及其摘要。✓ 已复制
    → 跨空间排序的搜索结果
  2. 综合
    总结过去的我对这个主题的看法,并链接回相关对象。✓ 已复制
    → 个人知识回顾及引用

结果: 你不再丢失自己的想法。

组合

与其他 MCP 搭配,撬动十倍杠杆

anytype + zotero

论文 PDF 保存在 Zotero 中;阅读笔记和综合分析保存在 Anytype 中

对于 Zotero 中标记为 'to-read' 的论文,创建相应的 Anytype Paper Notes,以摘要作为初始内容。✓ 已复制
anytype + firecrawl

爬取 → 总结 → 保存到 Anytype

爬取过去一个月的 anthropic.com/news,总结每篇文章,并为每篇创建一个 Anytype 对象。✓ 已复制

工具

此 MCP 暴露的能力

工具输入参数何时调用成本
global_search query: str, limit? 跨空间查询 0
space_search space, query 范围搜索 0
create_object space, type, properties 添加新笔记/记录 0
update_object object_id, properties 编辑现有内容 0
list_types space? 发现模式 0
list_members space 多用户空间 0

成本与限制

运行它的成本

API 配额
无 — 本地 Anytype
每次调用 Token 数
如果有大笔记,完整对象读取可能很大
费用
免费
提示
创建前优先使用 list_types/list_properties;避免 agent 生成的类型导致的模式漂移

安全

权限、密钥、影响范围

凭据存储: Anytype 的 Bearer token 存储在环境变量中;在应用设置中轮换
数据出站: 默认仅限 127.0.0.1:31009;Anytype 本身进行端到端加密同步

故障排查

常见错误与修复

连接被拒绝

Anytype 桌面版必须运行中;确认应用设置中 API 已启用且端口 31009 未被阻止

验证: curl http://127.0.0.1:31009/health
401 Unauthorized

Token 已撤销或不正确;在应用设置 → API 密钥中重新生成

对象创建在错误的空间中

始终显式传递 space;没有 'default space' 安全保护

替代方案

anytype-mcp 对比其他方案

替代方案何时用它替代权衡
Notion MCP你使用 Notion;协作优先、云优先非本地优先;仅限云托管
Obsidian MCP你偏好 Markdown vault 模型不同的数据模型(文件而非对象)

更多

资源

📖 阅读 GitHub 上的官方 README

🐙 查看未解决的 issue

🔍 浏览全部 400+ MCP 服务器和 Skills