/ Verzeichnis / Playground / affine-mcp-server
● Community DAWNCR0W ⚡ Sofort

affine-mcp-server

von 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).

Warum nutzen

Hauptfunktionen

Live-Demo

In der Praxis

affine.replay ▶ bereit
0/0

Installieren

Wählen Sie Ihren Client

~/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
    }
  }
}

Öffne Claude Desktop → Settings → Developer → Edit Config. Nach dem Speichern neu starten.

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

Cursor nutzt das gleiche mcpServers-Schema wie Claude Desktop. Projektkonfiguration schlägt die globale.

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

Klicken Sie auf das MCP-Servers-Symbol in der Cline-Seitenleiste, dann "Edit Configuration".

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

Gleiche Struktur wie Claude Desktop. Windsurf neu starten zum Übernehmen.

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

Continue nutzt ein Array von Serverobjekten statt einer Map.

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

In context_servers hinzufügen. Zed lädt beim Speichern neu.

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

Einzeiler. Prüfen mit claude mcp list. Entfernen mit claude mcp remove.

Anwendungsfälle

Praxisnahe Nutzung: affine-mcp-server

Capture quick notes into AFFiNE from Claude

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

Wann einsetzen: You're in a conversation and want to capture the takeaway into AFFiNE without context-switching.

Voraussetzungen
  • AFFiNE API token — AFFiNE Cloud: Settings > Integrations > MCP Server
Ablauf
  1. Find the workspace
    List my AFFiNE workspaces. I want to write into 'Personal'.✓ Kopiert
    → Workspace list
  2. Create a doc
    Create a new doc titled '2026-04-14 meeting notes' with content [paste]. Put it under /Meetings.✓ Kopiert
    → Doc created + URL

Ergebnis: Notes in AFFiNE without leaving chat.

Fallstricke
  • 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

Wann einsetzen: You want each newsletter subscriber from an email to land in your 'Contacts' AFFiNE DB.

Ablauf
  1. List DBs
    Show me databases in my 'Work' workspace.✓ Kopiert
    → DB list
  2. Add row
    To database 'Contacts', add a row: name='Jane Doe', email='[email protected]', source='Newsletter', date=today.✓ Kopiert
    → Row added with UUID

Ergebnis: AFFiNE as a lightweight CRM driven by LLM.

Fallstricke
  • 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

Wann einsetzen: You remember writing about X somewhere but can't remember where.

Ablauf
  1. Search
    Search across my workspaces for 'series A process'. List top 10 docs with snippet.✓ Kopiert
    → Doc hits with highlights
  2. Summarize
    Load the top 3 docs and summarize the key points + any contradictions.✓ Kopiert
    → Cross-doc summary

Ergebnis: Institutional knowledge surfaced from your own notes.

Kombinationen

Mit anderen MCPs für 10-fache Wirkung

Capture content into AFFiNE

Summarize this video and save to my 'Talks Notes' DB in AFFiNE.✓ Kopiert

Werkzeuge

Was dieses MCP bereitstellt

WerkzeugEingabenWann aufrufenKosten
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

Kosten & Limits

Was der Betrieb kostet

API-Kontingent
AFFiNE plan limits
Tokens pro Aufruf
Doc contents vary widely — trim by section where possible
Kosten in €
Free on AFFiNE self-hosted; Cloud has paid tiers
Tipp
Prefer search_documents over listing + filtering in code.

Sicherheit

Rechte, Secrets, Reichweite

Minimale Scopes: Workspace-scoped API token where possible
Credential-Speicherung: AFFINE_API_TOKEN env var; never commit
Datenabfluss: Your AFFiNE data to LLM provider
Niemals gewähren: Cookie auth on a shared machine — cookies are user-session-equivalent

Fehlerbehebung

Häufige Fehler und Lösungen

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.

Prüfen: 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.

Alternativen

affine-mcp-server vs. andere

AlternativeWann stattdessenKompromiss
Notion MCPYou use Notion instead of AFFiNEDifferent product; more mature ecosystem
Obsidian MCPYou're all-in on Obsidian markdown filesLocal-first; different philosophy

Mehr

Ressourcen

📖 Offizielle README auf GitHub lesen

🐙 Offene Issues ansehen

🔍 Alle 400+ MCP-Server und Skills durchsuchen