Skip to main content
Glama

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

Capabilities

Server capabilities have not been inspected yet.

Tools

Functions exposed to the LLM to take actions

NameDescription
list_workspacesB

List all available AFFiNE workspaces

get_workspaceC

Get details of a specific workspace

create_workspaceC

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

update_workspaceC

Update workspace settings

delete_workspaceC

Delete a workspace permanently

list_docsC

List documents in a workspace (GraphQL).

get_docC

Get a document by ID (GraphQL metadata).

search_docsC

Search documents in a workspace.

recent_docsC

List recently updated docs in a workspace.

publish_docC

Publish a doc (make public).

revoke_docC

Revoke a doc's public access.

affine_list_commentsC

List comments of a doc (with replies).

affine_create_commentC

Create a comment on a doc.

affine_update_commentC

Update a comment content.

affine_delete_commentC

Delete a comment by id.

affine_resolve_commentC

Resolve or unresolve a comment.

affine_list_historiesC

List doc histories (timestamps) for a doc.

affine_recover_docC

Recover a doc to a previous timestamp.

affine_current_userB

Get current signed-in user.

affine_update_profileC

Update current user's profile information.

affine_update_settingsC

Update user settings and preferences.

affine_send_verify_emailC

Send email verification link.

affine_change_passwordB

Change user password (requires token from email).

affine_send_password_resetC

Send password reset email.

affine_delete_accountA

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

affine_apply_doc_updatesC

Apply CRDT updates to a doc (advanced).

affine_list_access_tokensB

List personal access tokens (metadata).

affine_generate_access_tokenC

Generate a personal access token (returns token).

affine_revoke_access_tokenB

Revoke a personal access token by id.

affine_upload_blobC

Upload a file or blob to workspace storage.

affine_delete_blobC

Delete a blob/file from workspace storage.

affine_cleanup_blobsC

Permanently remove deleted blobs to free up storage.

affine_list_notificationsC

Get user notifications.

affine_read_notificationC

Mark a notification as read.

affine_read_all_notificationsB

Mark all notifications as read.

affine_sign_inA

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

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Latest Blog Posts

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