Skip to main content
Glama

AFFiNE MCP Server

by DAWNCR0W

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
MCP_WS_PORTNoHost port to expose for WebSocket transport7821
AFFINE_EMAILNoEmail for authentication (self-hosted)
AFFINE_COOKIENoSession cookie string (e.g., affine_session=<...>; affine_user_id=<...>)
MCP_TRANSPORTNoTransport mode: 'stdio' for stdio mode, or 'ws' for WebSocketws
AFFINE_BASE_URLNoBase URL of your AFFiNE server, e.g. http://affine.local:3010
AFFINE_PASSWORDNoPassword for authentication (self-hosted)
AFFINE_API_TOKENNoPersonal access token for Bearer auth
AFFINE_GRAPHQL_PATHNoGraphQL endpoint path/graphql
AFFINE_HEADERS_JSONNoOptional JSON of extra headers to send
AFFINE_WORKSPACE_IDNoDefault workspace id (optional). Tools also accept explicit workspaceId

Schema

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Tools

Functions exposed to the LLM to take actions

NameDescription
list_workspaces

List all available AFFiNE workspaces

get_workspace

Get details of a specific workspace

create_workspace

Create a new workspace with initial document (accessible in UI)

update_workspace

Update workspace settings

delete_workspace

Delete a workspace permanently

list_docs

List documents in a workspace (GraphQL).

get_doc

Get a document by ID (GraphQL metadata).

search_docs

Search documents in a workspace.

recent_docs

List recently updated docs in a workspace.

publish_doc

Publish a doc (make public).

revoke_doc

Revoke a doc's public access.

affine_list_comments

List comments of a doc (with replies).

affine_create_comment

Create a comment on a doc.

affine_update_comment

Update a comment content.

affine_delete_comment

Delete a comment by id.

affine_resolve_comment

Resolve or unresolve a comment.

affine_list_histories

List doc histories (timestamps) for a doc.

affine_recover_doc

Recover a doc to a previous timestamp.

affine_current_user

Get current signed-in user.

affine_update_profile

Update current user's profile information.

affine_update_settings

Update user settings and preferences.

affine_send_verify_email

Send email verification link.

affine_change_password

Change user password (requires token from email).

affine_send_password_reset

Send password reset email.

affine_delete_account

Permanently delete user account. WARNING: This cannot be undone!

affine_apply_doc_updates

Apply CRDT updates to a doc (advanced).

affine_list_access_tokens

List personal access tokens (metadata).

affine_generate_access_token

Generate a personal access token (returns token).

affine_revoke_access_token

Revoke a personal access token by id.

affine_upload_blob

Upload a file or blob to workspace storage.

affine_delete_blob

Delete a blob/file from workspace storage.

affine_cleanup_blobs

Permanently remove deleted blobs to free up storage.

affine_list_notifications

Get user notifications.

affine_read_notification

Mark a notification as read.

affine_read_all_notifications

Mark all notifications as read.

affine_sign_in

Sign in to AFFiNE using email and password; sets session cookies for subsequent calls.

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/DAWNCR0W/affine-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server