/ Каталог / Песочница / affine-mcp-server
● Сообщество DAWNCR0W ⚡ Сразу

affine-mcp-server

автор DAWNCR0W · DAWNCR0W/affine-mcp-server

Connect Claude to your AFFiNE workspaces — 87 tools across docs, databases, comments, blobs, users — with API token, cookie, or email/password auth.

affine-mcp-server exposes 87 tools covering the AFFiNE graph: workspaces, organizations, documents, databases, comments, history, users/tokens, and blob storage. Works against AFFiNE Cloud (with API token) or self-hosted (also supports email/password).

Зачем использовать

Ключевые функции

Живое демо

Как выглядит на практике

affine.replay ▶ готово
0/0

Установка

Выберите клиент

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

Откройте Claude Desktop → Settings → Developer → Edit Config. Перезапустите после сохранения.

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

Cursor использует ту же схему mcpServers, что и Claude Desktop. Конфиг проекта приоритетнее глобального.

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

Щёлкните значок MCP Servers на боковой панели Cline, затем "Edit Configuration".

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

Тот же формат, что и Claude Desktop. Перезапустите Windsurf для применения.

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

Continue использует массив объектов серверов, а не map.

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

Добавьте в context_servers. Zed перезагружается автоматически.

claude mcp add affine -- npx -y affine-mcp-server

Однострочная команда. Проверить: claude mcp list. Удалить: claude mcp remove.

Сценарии использования

Реальные сценарии: affine-mcp-server

Capture quick notes into AFFiNE from Claude

👤 AFFiNE users using it as their main notes tool ⏱ ~5 min beginner

Когда использовать: You're in a conversation and want to capture the takeaway into AFFiNE without context-switching.

Предварительные требования
  • AFFiNE API token — AFFiNE Cloud: Settings > Integrations > MCP Server
Поток
  1. Find the workspace
    List my AFFiNE workspaces. I want to write into 'Personal'.✓ Скопировано
    → Workspace list
  2. Create a doc
    Create a new doc titled '2026-04-14 meeting notes' with content [paste]. Put it under /Meetings.✓ Скопировано
    → Doc created + URL

Итог: Notes in AFFiNE without leaving chat.

Подводные камни
  • Email/password auth blocked on Cloud by Cloudflare — Use API token on Cloud; email/password only on self-hosted

Add a row to an AFFiNE database from external signal

👤 Knowledge workers using AFFiNE databases as lightweight CRM / tracker ⏱ ~10 min intermediate

Когда использовать: You want each newsletter subscriber from an email to land in your 'Contacts' AFFiNE DB.

Поток
  1. List DBs
    Show me databases in my 'Work' workspace.✓ Скопировано
    → DB list
  2. Add row
    To database 'Contacts', add a row: name='Jane Doe', email='[email protected]', source='Newsletter', date=today.✓ Скопировано
    → Row added with UUID

Итог: AFFiNE as a lightweight CRM driven by LLM.

Подводные камни
  • Field types must match the DB schema — Get schema first via describe-database-like tool

Search across AFFiNE workspaces and summarize findings

👤 AFFiNE power users with many docs ⏱ ~10 min beginner

Когда использовать: You remember writing about X somewhere but can't remember where.

Поток
  1. Search
    Search across my workspaces for 'series A process'. List top 10 docs with snippet.✓ Скопировано
    → Doc hits with highlights
  2. Summarize
    Load the top 3 docs and summarize the key points + any contradictions.✓ Скопировано
    → Cross-doc summary

Итог: Institutional knowledge surfaced from your own notes.

Комбинации

Сочетайте с другими MCP — эффект x10

Capture content into AFFiNE

Summarize this video and save to my 'Talks Notes' DB in AFFiNE.✓ Скопировано

Инструменты

Что предоставляет этот MCP

ИнструментВходные данныеКогда вызыватьСтоимость
list_workspaces Navigate your AFFiNE graph 1 API call
search_documents workspace_id, query, limit? Find docs by text 1 API call
create_document workspace_id, title, content, parent_id? Add a new doc 1 API call
update_document doc_id, content | title Edit existing docs 1 API call
add_database_row database_id, fields: obj Structured data entry 1 API call

Стоимость и лимиты

Во что обходится

Квота API
AFFiNE plan limits
Токенов на вызов
Doc contents vary widely — trim by section where possible
Деньги
Free on AFFiNE self-hosted; Cloud has paid tiers
Совет
Prefer search_documents over listing + filtering in code.

Безопасность

Права, секреты, радиус поражения

Минимальные скоупы: Workspace-scoped API token where possible
Хранение учётных данных: AFFINE_API_TOKEN env var; never commit
Исходящий трафик: Your AFFiNE data to LLM provider
Никогда не давайте: Cookie auth on a shared machine — cookies are user-session-equivalent

Устранение неполадок

Частые ошибки и исправления

401 / token invalid

Regenerate at Settings > Integrations > MCP Server. Paste fresh token into env.

Cannot find workspace

Server-backed vs local-only confusion. Only server-backed workspaces are accessible.

Проверить: Open AFFiNE UI; is the workspace cloud-synced?
DB row rejected — field type mismatch

Get schema first, match types. Dates often need ISO-8601 strings.

Альтернативы

affine-mcp-server в сравнении

АльтернативаКогда использоватьКомпромисс
Notion MCPYou use Notion instead of AFFiNEDifferent product; more mature ecosystem
Obsidian MCPYou're all-in on Obsidian markdown filesLocal-first; different philosophy

Ещё

Ресурсы

📖 Читать официальный README на GitHub

🐙 Открытые задачи

🔍 Все 400+ MCP-серверов и Skills