# AFFiNE MCP Server

> Connect AFFiNE workspaces to search and edit documents, manage databases, and build canvases.

- **URL**: https://followmcp.com/en/servers/affine-mcp-server
- **Category**: Collaboration
- **Origin**: Community
- **Stars**: 340
- **FMRS Score**: 62/100 (Grade C)
- **Source**: https://github.com/DAWNCR0W/affine-mcp-server
- **Transports**: stdio (local process), Streamable HTTP
- **Runtimes**: Node.js 20.18.1+, Docker
- **Auth**: API key / credential required

## 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.

## 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
- 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.

## Client config (JSON)
```json
{
  "mcpServers": {
    "affine": {
      "command": "affine-mcp"
    }
  }
}
```
