affine-mcp-server-integration

Connect AI assistants to AFFiNE workspaces, documents, and databases via MCP.

7|2|Updated May 16, 2026
One-click install
npx skills add https://github.com/reason-machines/mcp-skills --skill affine-mcp-server-integration-reason-machines
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: affine-mcp-server-integration
Source: https://github.com/reason-machines/mcp-skills/tree/main/skills/affine-mcp-server-integration
Command: npx skills add https://github.com/reason-machines/mcp-skills --skill affine-mcp-server-integration-reason-machines

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires affine-mcp-server.

What problem does it solve? AI assistants cannot natively read or modify AFFiNE workspaces, forcing users to manually copy content between their knowledge base and their AI tools. This Skill bridges that gap by exposing AFFiNE documents, databases, collections, and comments as MCP tools. ## Core Features & Use Cases - Document Management: Search, read, create, update, and delete AFFiNE documents programmatically, including template-based creation and block-level mutations. - Database Operations: Create databases, define columns, and manage rows inside AFFiNE docs, including semantic composition from high-level intent. - Flexible Deployment: Run locally over stdio or remotely over HTTP with bearer authentication, Docker support, and tool-profile restrictions for security. - Use Case: Ask your AI assistant to create a project workspace in AFFiNE, generate a task-tracking database with priority columns, and populate it with initial tasks in one conversation. ## Quick Start Install the server with npm i -g affine-mcp-server, run affine-mcp login to store your AFFiNE credentials, then add the generated MCP configuration snippet to your Claude or Cursor client.

Frequently Asked Questions about affine-mcp-server-integration

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I connect Claude to my AFFiNE workspace?▼

Install affine-mcp-server globally via npm, run affine-mcp login to store credentials, then add the generated MCP server snippet to your Claude Code or Claude Desktop configuration file. The server exposes AFFiNE documents and databases as MCP tools.

How to create AFFiNE documents with an AI assistant?▼

Use the create_doc tool with a workspace ID, title, and initial text content. You can also use create_doc_from_template to instantiate existing templates, or compose_semantic_page to build structured documents from a high-level intent description.

Does the AFFiNE MCP server work with self-hosted instances?▼

Yes, self-hosted AFFiNE is supported by setting AFFINE_BASE_URL to your instance URL. Authentication can use email and password, a session cookie, or a personal access token depending on your deployment.

Can I restrict which AFFiNE tools the AI can use?▼

Yes, set AFFINE_TOOL_PROFILE to read_only, core, authoring, or full to limit capabilities. You can also disable entire tool groups with AFFINE_DISABLED_GROUPS or specific tools with AFFINE_DISABLED_TOOLS.

Why does AFFiNE MCP authentication fail?▼

Authentication failures usually come from an expired or incorrect API token, or using email/password against AFFiNE Cloud, which requires a token. Run affine-mcp doctor to diagnose configuration and connectivity issues.

Can I deploy the AFFiNE MCP server remotely over HTTP?▼

Yes, set MCP_TRANSPORT=http and run the Docker image with a bearer token via AFFINE_MCP_HTTP_TOKEN. Clients then connect to the HTTP endpoint, and health checks are available at /healthz and /readyz.