Back to MCP directory
publicPublicdnsLocal runtime

Anytype MCP

Anytype MCP服务器是一个基于Anytype API的模型上下文协议服务,允许AI助手和其他MCP客户端与Anytype数据进行交互,包括查询、创建、删除空间和对象等功能。

article

README

🚀 任何类型 MCP 服务器

这是一个提供对 Anytype API 访问的 MCP(模型上下文协议)服务器,允许 AI 助手和其他 MCP 客户端与您的 Anytype 数据进行交互,为您的数据使用带来更多便利。

基于 Anytype API 定义 v0.46+ (2025-03-17)。
请确保您的 Anytype 桌面版本与此兼容。

smithery badge

🚀 快速开始

在使用本 MCP 服务器前,请确保满足以下先决条件:

  • Node.js 18 或更高版本
  • 正在本地运行的 Anytype 桌面应用程序
  • Anytype 账户

✨ 主要特性

  • 获取空间列表(get_spaces
  • 在指定空间内搜索/获取对象(get_objectssearch_space)或全局搜索(global_search
  • 获取对象的详细内容(get_object_content,支持检索全文)
  • 创建和删除空间(create_space)和对象(create_objectdelete_object
  • 将对象导出为 Markdown 格式(export_object
  • 管理列表视图和列表中的对象(get_list_viewsget_list_view_objectsadd_objects_to_listremove_object_from_list
  • 获取空间成员(get_space_members
  • 获取类型和模板(get_typesget_type_detailsget_templatesget_template_details

📦 安装指南

手动安装

  1. 克隆此仓库:
git clone https://github.com/Qwinty/anytype-mcp.git
cd anytype-mcp
  1. 安装依赖项:
npm install
  1. 构建项目(将 TypeScript 编译为 JavaScript 到 build/ 目录):
npm run build
  1. 获取一个 App Key:在配置服务器之前,您需要从 Anytype 获取一个 App Key。请参阅下面的“获取 App Key”部分。
  2. 将 MCP 服务器添加到您的 MCP 配置文件中

获取 App Key

运行 npm run get-key 脚本来获取一个新的 App Key,并将其更新到您的 MCP 配置中,然后重启您的 MCP 客户端。

📚 详细文档

Anytype API 不响应

确保 Anytype 桌面应用程序正在运行。MCP 服务器连接到本地 Anytype API 的地址为 http://localhost:31009/v1

认证问题

如果您遇到认证错误:

  1. 运行 npm run get-key 来获取一个新的 App Key
  2. 更新您的 MCP 配置文件中的新密钥
  3. 重启您的 MCP 客户端

本地 API 端口

默认情况下,服务器连接到 Anytype API 的地址为 http://localhost:31009/v1。如果您的 Anytype 安装使用了不同的端口,则需要修改 src/index.ts 中的 apiBaseUrl 变量并重新构建(运行 npm run build)。通过环境变量配置此属性是未来潜在的功能改进。

📄 许可证

MIT

help

Runtime guide

cloud

Hosted runtime

Hosted servers run from a provider-managed environment. You usually connect the MCP client to the hosted endpoint or follow the provider's authorization flow, without keeping a local process alive

  1. Open provider connection page
  2. Authorize or copy endpoint
  3. Connect from your MCP client
terminal

Local runtime / other methods

Local servers run on your own machine or infrastructure. You normally copy the server_config into your MCP client, install the required package, and provide env variables from env_schema when needed

  1. Copy server_config
  2. Install required package
  3. Fill env variables and restart client