← Back to directory
A

AFFiNE MCP Server

Community
Connect AFFiNE workspaces to search and edit documents, manage databases, and build canvases.
Category
Collaboration #5 of 83
Stars
★ 340 Very popular
Transport
stdio (local process) · Streamable HTTP
Runtime
Node.js 20.18.1+ · Docker
Credentials
API key / credential required
License
MIT
Last commit
62FMRS · C

The README describes an MCP server for AFFiNE workspaces, with a local stdio CLI and remote Streamable HTTP deployment options. It documents document, database, canvas, workspace organization, and collaboration capabilities, along with account permissions, tool profiles, and deployment security considerations. The manifest was not provided, so no canonical tool identifiers are listed.

Strongest · Documentation 15/20 Weakest · Reliability 10/20

Reliability
10/20
Security and permissions
12/20
Maintenance
11/20
Documentation
15/20
Setup experience
14/20
Why each score
Reliability 10/20
The README describes stdio and HTTP transports, connection checks, diagnostics, and coordinated writes, and lists CI and test commands, so the basic path appears plausible. The manifest, CI workflow, and test files are not provided, so the initialization handshake, correspondence between declared tools and behavior, and failure handling cannot be verified. Under the static calibration, the score stays at or below 12.
Security and permissions 12/20
The README says credentials can be stored in a mode-600 config file, cookies can be passed via stdin, HTTP bearer authentication is supported, OAuth writes can be restricted, and deployments should use a least-privilege account. It also discloses a version limitation around deletion. Editing and deletion tools have side effects, but the evidence does not show that they require confirmation; implementation and data-flow details are also absent, so permission boundaries remain incomplete. No red-line evidence is shown.
Maintenance 11/20
The supplied material identifies an MIT license, version, CI badge, release link, and security reporting channel; repository metadata says the project is not archived and has no open issues. Commit history, release history, dependency updates, and maintainer response evidence are missing, so sustained maintenance cannot be established.
Documentation 15/20
The README provides linked guides, client configuration examples, tool categories, configuration options, response-size controls, concurrent-write guidance, compatibility limits, and troubleshooting entry points. Exact parameters depend on the unavailable tool reference, and cost details and implementation evidence for security behavior are absent, so full marks are not justified.
Setup experience 14/20
The setup path is clear: a stated minimum Node.js version, global install, login, client registration, and status checks. It also includes Codex and Claude examples plus Docker/HTTP and self-hosted options. The server manifest is unavailable, and the static material contains no verifiable execution evidence, so the score remains at or below 15.

Static review · not runReviewed 2026-12-04

Read the FMRS scoring method →

Fit and risk

What it can accessUses the networkChanges third-party account dataConnects to a database

Best for

  • Users who want to work with AFFiNE Cloud or self-hosted workspace content through an MCP client.
  • Individuals or teams that want to control available operations with tool profiles.

Not for

  • Users who need access to AFFiNE workspaces stored only in the browser.
  • Deployments that cannot grant the configured account the necessary workspace permissions or protect a remote HTTP endpoint.

Required permissions

  • The server uses the configured AFFiNE account's workspace permissions; required access depends on the requested operation.
  • AFFiNE Cloud login can use a browser session cookie; self-hosted instances support email and password or a session cookie.
  • For unattended deployments, the README recommends a dedicated AFFiNE account with least privilege.

Risks and side effects

  • When write tools are enabled, a client can modify workspace content within the configured account's permissions.
  • Hosted HTTP endpoints should use HTTPS and authentication; passwords and session cookies should not be committed to source control.
  • Some AFFiNE versions may retain a document body after acknowledging delete_doc; verify contentAbsenceVerified for permanent deletion.
  • Selecting protocol 2 rejects MCP writes before they run.

Setup

Before you start

Runtime:Node.js 20.18.1+ · Docker

AFFINE_PASSWORD optionalsecret Password used to sign in to a self-hosted AFFiNE instance.
AFFINE_MCP_HTTP_TOKEN optionalsecret MCP HTTP bearer token; use a strong, unique secret for deployment.
Other optional settings (9)
AFFINE_ALLOW_INSECURE_HTTP optional Set to true for a trusted self-hosted plain HTTP endpoint, for both login and the server.
MCP_TRANSPORT optional Selects the transport; the Docker HTTP example sets it to http.
AFFINE_BASE_URL optional The URL of a self-hosted AFFiNE instance.
AFFINE_EMAIL optional Email address used to sign in to a self-hosted AFFiNE instance.
AFFINE_MCP_AUTH_MODE optional Sets MCP HTTP authentication mode; the example uses bearer.
AFFINE_TOOL_PROFILE optional Selects the tools exposed to the client, such as full, authoring, core, read_only, or compact.
AFFINE_DISABLED_GROUPS optional Further limits the available operation groups.
AFFINE_DISABLED_TOOLS optional Further limits the available individual tools.
AFFINE_OAUTH_ALLOW_SERVICE_WRITES optional Set to true to allow service writes with a write-capable profile in OAuth mode.

The local CLI requires Node.js 20.18.1 or newer. Install affine-mcp-server and run affine-mcp login, then register the server with your client. Claude Code can use the shown command configuration; for Codex CLI, run codex mcp add affine -- affine-mcp. For HTTP deployments, configure the server address and authentication, and protect the remote endpoint.

.mcp.json
{
  "mcpServers": {
    "affine": {
      "command": "affine-mcp"
    }
  }
}

Shown for Claude Code. Other clients may use a different file or key (VS Code uses "servers") — the configurator below converts it.

.vscode/mcp.json
{
  "servers": {
    "affine": {
      "command": "affine-mcp"
    }
  }
}

Goes in your project's .vscode/mcp.json (VS Code uses a "servers" key).

~/.codex/config.toml
[mcp_servers.affine]
command = "affine-mcp"

Append to ~/.codex/config.toml (OpenAI Codex CLI uses TOML).

Terminal
claude mcp add affine -- affine-mcp

Run it in a terminal; replace any <…> placeholders with your own values first.

Check that it works

Run affine-mcp status and affine-mcp doctor to check the connection, then ask your client to list accessible AFFiNE workspaces. You can also confirm that AFFiNE tools appear in the client's tool list.

Troubleshooting

  1. Run affine-mcp status and affine-mcp doctor to check connection and setup.
  2. Verify the AFFiNE URL, workspace selection, and login credentials or session cookie.
  3. GUI clients need both affine-mcp and node available on PATH.
  4. Check client registration, HTTP authentication, and deployment health endpoints /healthz and /readyz.

Things to try

Once connected, you can ask your AI assistant things like:

  • List the AFFiNE workspaces I can access.
  • Search for and read the Decisions section in my project notes.
  • Create a canvas called Release plan and connect Draft, Review, and Ship in that order.
  • Check the workspace notifications and comments.

Use cases

Search, read, edit, tag, move, publish, and export AFFiNE documents.
Query and edit database rows, and adjust columns, options, and view settings.
Create and arrange frames, notes, shapes, and connectors on edgeless canvases.
Browse workspace content, manage collections and custom properties, and work with comments and notifications.

Supported clients

Claude Code
Claude DesktopPartial support
Codex
CursorPartial support

Listed from the project's documentation, not tested by this site.

Overview

AFFiNE MCP Server connects MCP-capable AI clients to AFFiNE Cloud or self-hosted AFFiNE instances over stdio or Streamable HTTP. It supports operations for documents, databases, canvases, workspace organization, and collaboration. Available operations depend on the configured tool profile and account permissions.

Similar servers

Source revision 0a131544357d Data synced 2026-12-05 Read the FMRS scoring method Markdown

Maintainer badge: embed FMRS score

Paste this Markdown into your repository README to display a live score badge:

README.md
[![FollowMCP](https://followmcp.com/badges/affine-mcp-server.svg)](https://followmcp.com/en/servers/affine-mcp-server)