基本能力
产品定位
Anytype MCP Server 是一个中间件服务,旨在通过 MCP 协议为 AI 助手和其他客户端提供对 Anytype 数据的访问和操作能力。
核心功能
- 获取空间列表 (
get_spaces
) - 在空间内或全局搜索/获取对象 (
get_objects
,search_space
,global_search
) - 获取详细对象内容 (
get_object_content
,支持检索完整文本) - 创建和删除空间 (
create_space
) 和对象 (create_object
,delete_object
) - 将对象导出为 markdown (
export_object
) - 管理列表视图和列表中的对象 (
get_list_views
,get_list_view_objects
,add_objects_to_list
,remove_object_from_list
) - 获取空间成员 (
get_space_members
) - 获取类型和模板 (
get_types
,get_type_details
,get_templates
,get_template_details
)
适用场景
- AI 助手需要访问和操作用户的 Anytype 数据
- 开发者需要构建与 Anytype 集成的应用
- 自动化工作流需要与 Anytype 数据进行交互
工具列表
get_spaces
: 获取用户的所有空间列表get_objects
: 获取特定空间中的对象search_space
: 在特定空间内搜索对象global_search
: 全局搜索对象get_object_content
: 获取对象的详细内容create_space
: 创建新空间create_object
: 创建新对象delete_object
: 删除对象export_object
: 将对象导出为 markdownget_list_views
: 获取列表视图get_list_view_objects
: 获取列表视图中的对象add_objects_to_list
: 向列表中添加对象remove_object_from_list
: 从列表中移除对象get_space_members
: 获取空间成员get_types
: 获取类型get_type_details
: 获取类型详情get_templates
: 获取模板get_template_details
: 获取模板详情
常见问题解答
- Anytype API 无响应
- 确保 Anytype 桌面应用程序正在运行
- 认证问题
- 运行
npm run get-key
获取新的应用密钥 - 更新 MCP 配置中的密钥
- 重启 MCP 客户端
- 本地 API 端口
- 默认端口为 31009,如果使用不同端口,需要修改
src/index.ts
中的apiBaseUrl
使用教程
使用依赖
- Node.js 18 或更高版本
- 本地运行的 Anytype 桌面应用程序
- Anytype 账户
安装教程
- 克隆仓库:
cli
git clone https://github.com/yourusername/anytype-mcp-server.git
cd anytype-mcp-server - 安装依赖:
node
npm install - 构建项目:
node
npm run build - 获取应用密钥:
node
npm run get-key
调试方式
- 手动启动服务器:
node
npm start - 检查日志输出是否有错误信息
- 确保 Anytype 桌面应用程序正在运行