Appflowy MCP
About
MCP for self-hosted Appflowy Cloud instance with HTTP interface, prepared in Docker
Details
- Author
- careemer
- Categories
- Productivity, Other, Infrastructure
Jump to
Setup
Install Appflowy MCP in your MCP client (Claude Desktop, Cursor, Windsurf, and others).
Repository: https://github.com/careemer/appflowy-mcp
Follow the installation instructions in the repository README, then restart your MCP client.
π³m2n2/appflowy-mcp:lateston Docker Hub
Aself-hosted, token-scopedModel Context Protocolserver forAppFlowy. It gives AI agents (Claude, or any MCP client) tools to read and edit your AppFlowy workspaces β list workspaces, walk the page tree, create/update/read pages, and edit individual blocks in place β whilebounding each client to exactly the pages you allowvia per-token tree-shaped scopes.
- πToken-scoped access.The server logs into AppFlowy once as a service account. Clients never see those credentials β they present an opaque token, and each token is restricted to a set of workspaces / page subtrees.
- π³Tree-shaped scopes.Grant a whole workspace, a top-level page and everything under it, or a page four levels deep and its descendants. Mix and match several grants per token.
- π³Runs anywhere.Streamable-HTTP transport, small multi-arch image (m2n2/appflowy-mcp, amd64 + arm64) on Docker Hub, ready for Docker Compose, Kubernetes, or a Helm chart.
- βοΈReal editing.Append blocks, insert blocks at any position, edit block text (rich formatting preserved), and delete blocks β via the same Yjs/CRDT path the official web client uses.
βββββββββββββββ token: scopes ββββββββββββββββ MCP client β Authorization: Bearer <token> βββββββββββΆ β appflowy-mcp β (Claude) βββββββββββββββ β enforces β β scope, then β β acts as the β service account (email+password / JWT) ββββββββ service acct β ββββββββ¬ββββββββ βΌ AppFlowy Cloud REST
- Backend auth (one service account).APPFLOWY_BASE_URL+APPFLOWY_EMAIL/APPFLOWY_PASSWORD(or a pre-mintedAPPFLOWY_ACCESS_TOKEN). The server logs in once and refreshes automatically on expiry.
- Client auth (many tokens).Each MCP client presents a token. The token decideswhatit can touch β the backend credentials are never exposed.
Thelastid is the root of the allowed subtree; earlier ids only help locate it (AppFlowy view ids are globally unique, so intermediate ids are optional). A token may listseveralscopes to grant multiple disjoint subtrees at once.
Enforcement is by ancestry: for any page a tool touches, the server walks up the folder tree; if it reaches one of the token's allowed roots, the call proceeds, otherwise it's rejected.Get workspace listandGet workspace folderare pruned to what the token may see.
Everything is configurable byenvironment variables(ideal for Docker / Helm) and/or aYAML/JSON file. Env wins over the file.
JSON blob (best as a single Helm/Docker secret):
APPFLOWY_MCP_TOKENS='[ {"token":"sk-full", "name":"full", "scopes":[]}, {"token":"sk-teamws", "name":"team", "scopes":["WORKSPACE_ID"]}, {"token":"sk-project", "name":"project", "scopes":["WORKSPACE_ID/ROOT_VIEW_ID", "WORKSPACE_ID/A/B/DEEP_VIEW_ID"]} ]'
APPFLOWY_MCP_TOKEN_0=sk-full APPFLOWY_MCP_TOKEN_0_NAME=full APPFLOWY_MCP_TOKEN_0_SCOPES= # empty => all workspaces APPFLOWY_MCP_TOKEN_1=sk-project APPFLOWY_MCP_TOKEN_1_NAME=project APPFLOWY_MCP_TOKEN_1_SCOPES=WORKSPACE_ID/ROOT_VIEW_ID,WORKSPACE_ID/A/B/DEEP_VIEW_ID
appflowy: base_url: https://appflowy.example.com email: service@example.com password: ${APPFLOWY_PASSWORD} # plain string; env is not interpolated β set real value server: host: 0.0.0.0 port: 8000 path: /mcp require_auth: true tokens: - token: sk-full name: full scopes: [] # all workspaces - token: sk-project name: project scopes: - WORKSPACE_ID/ROOT_VIEW_ID # a page + its whole subtree - WORKSPACE_ID/A/B/DEEP_VIEW_ID # a deep page + its subtree
Seeconfig.example.yamland.env.example.
docker run --rm -p 8000:8000 \ -e APPFLOWY_BASE_URL=https://appflowy.example.com \ -e APPFLOWY_EMAIL=service@example.com \ -e APPFLOWY_PASSWORD=secret \ -e APPFLOWY_MCP_TOKENS='[{"token":"sk-full","scopes":[]}]' \ m2n2/appflowy-mcp:latest
cp .env.example .env # fill in values docker compose up -d
helm install appflowy-mcp ./deploy/helm \ --set appflowy.baseUrl=https://appflowy.example.com \ --set appflowy.email=service@example.com \ --set appflowy.password=secret \ --set-json 'tokens=[{"token":"sk-full","scopes":[]}]'
The server speaksstreamable HTTPathttp://HOST:PORT/mcp. Point your MCP client at it and send the token as a bearer header. For Claude Code:
{ "mcpServers": { "appflowy": { "type": "http", "url": "https://appflowy-mcp.example.com/mcp", "headers": { "Authorization": "Bearer sk-full" } } } }
Health check:GET /healthzβ{"status":"ok"}.
- Block-editing tools requirepycrdt(bundled). They mirror the web client's CRDTweb-update; there is no official per-block REST endpoint.
- Insert blockwithblock_type="image"embeds a public image URL by reference (nothing is uploaded); remove it withDelete blocklike any block.
- Database row cells are keyed by fieldname or id; values follow the field type (string for text/URL, number for Number, bool for Checkbox, ISO-8601 or unix seconds for DateTime, option name(s) for select).Create database rowgoes through the REST endpoint;Update database rowandDelete database rowact on an existing row by its id through the CRDTweb-updatepath (mirroring the web client), since REST exposes no route to edit or delete a row by UUID.
- Scope checks rely on the workspace folder tree, cached forAPPFLOWY_MCP_FOLDER_CACHE_TTLseconds. Newly created pages invalidate the cache for their workspace.
- Open mode (APPFLOWY_MCP_REQUIRE_AUTH=falsewith no tokens) grants full access to anyone who can reach the port β only use on a trusted network.
uv sync # install runtime + dev dependencies uv run pytest # run the test suite with the 100% coverage gate uv run ruff check # lint
The suite enforces100% line and branch coverage(--cov-fail-under=100inpyproject.toml). CI runs it as thetestjob in.github/workflows/docker.yml; the Docker image buildneeds: test, so a failing test or a coverage drop blocks the image from ever being built. SeeAGENTS.mdfor the testing definition of done.
This project began as a self-hosting-focused rework ofLucasXu0/appflowy_mcp.
Automated document processing and extraction
Convert files (DOCX, XLSX, PPTX, images), HTML, and Markdown to pixel-perfect PDFs β npx stdio or hosted Streamable HTTP, free API key in one click.
Connect with 10,000+ tools across HRIS, ATS, CRM, Accounting, Calendar, Meeting, Ticketing, and more categories.
Official Notion MCP server for searching, reading, creating, and updating Notion pages, databases, and workspace content from AI agents.
Collaborative word processor you can use with your agent
Connect any AI assistant to Syncro: manage tickets, invoices, customers, assets, and more.
Multi-device file sync, dev-doc CRUD, task management, and session handoffs for AI agents - MCP + OpenAPI dual surface.
Access and manage your library on Apple Books.
Interact with Apple Notes using natural language on macOS.
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.




