DA

dawncr0w/affine-mcp-server

效率工作流

本页由 AI 翻译,技术细节请以原文为准。 查看原文

316 stars 85 forks 质量 88 趋势 40MIT

dawncr0w/affine-mcp-server 是从 https://github.com/dawncr0w/affine-mcp-server. 导入的 MCP 服务器候选

概览

dawncr0w/affine-mcp-server 是从 https://github.com/dawncr0w/affine-mcp-server. 导入的 MCP 服务器候选

概述(AI 翻译)

一款用于 AFFiNE 的模型上下文协议(MCP)服务器。它通过 stdio(默认)或 HTTP(/mcp)向 AI 助手开放 AFFiNE 工作区和文档,并支持 AFFiNE 云和自托管部署。

目录

  • 概述
  • 选择你的道路
  • 快速入门
  • 兼容性矩阵
  • 刀具表面
  • 文档地图
  • 验证您的设置
  • 安全性与范围
  • 发展
  • 发行说明
  • 许可证
  • 支持

概述

AFFiNE MCP 服务器设计用于三种常见场景:

  • 运行本地的 Stdio MCP 服务器,支持 Claude Code、Codex CLI、Cursor 或 Claude Desktop
  • 为托管或浏览器连接的客户端暴露远程HTTP MCP端点
  • 通过稳定的MCP工具表面自动化AFFiNE工作区、文档、数据库、组织和注释工作流程

亮点:

  • 支持 AFFiNE 云和自托管的 AFFiNE 实例
  • 支持stdio和HTTP传输
  • 通过一个共享MCP服务器协调每个工作区的并发写入;可选文档修订拒绝陈旧编辑
  • 支持会话 Cookie 和电子邮件/密码认证,以及兼容旧部署的承载令牌

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

AFFiNE MCP Server

A Model Context Protocol (MCP) server for AFFiNE. It exposes AFFiNE workspaces and documents to AI assistants over stdio (default) or HTTP (/mcp) and supports both AFFiNE Cloud and self-hosted deployments.

Table of Contents

Overview

AFFiNE MCP Server is designed for three common scenarios:

  • Run a local stdio MCP server for Claude Code, Codex CLI, Cursor, or Claude Desktop
  • Expose a remote HTTP MCP endpoint for hosted or browser-connected clients
  • Automate AFFiNE workspace, document, database, organization, and comment workflows through a stable MCP tool surface

Highlights:

  • Supports AFFiNE Cloud and self-hosted AFFiNE instances
  • Supports stdio and HTTP transports
  • Coordinates concurrent writes per workspace through one shared MCP server; optional document revisions reject stale edits
  • Supports session-cookie and email/password authentication, plus compatible bearer tokens for older deployments
  • Exposes 107 canonical MCP tools backed by AFFiNE GraphQL and WebSocket APIs
  • Reads native database created-by (user ID) and created-time (timestamp) columns from row metadata; missing or invalid metadata returns null without backfilling it
  • Sets and clears native AFFiNE Journal dates with set_doc_journal
  • Includes semantic page composition, native template instantiation, database intent composition, capability and fidelity reporting, and workspace blueprint helpers
  • Includes Docker images, health probes, and end-to-end test coverage

Scope boundaries:

  • This server can access only server-backed AFFiNE workspaces
  • Browser-local workspaces stored only in local storage are not available through AFFiNE server APIs
在 GitHub 查看完整 README

安装

npx -y -p affine-mcp-server affine-mcp -- --version
新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "affine": { "type": "http", "url": "http://localhost:3000/mcp", "headers": { "Authorization": "Bearer your-strong-secret" } } } }