anki-sync-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| MCP_HOST | No | Address on which the HTTP server listens. | 0.0.0.0 |
| MCP_PATH | No | MCP endpoint path. It must be an absolute, static, non-root path and must not overlap /health. | /mcp |
| MCP_PORT | No | HTTP listen port (1-65535). Keep this consistent with expose, any ports mapping, and the client URL. | 8000 |
| LOG_LEVEL | No | Uvicorn log level, such as debug, info, warning, or error. | INFO |
| MCP_SCOPES | No | Comma-separated tool groups to register. Allowed values are read, write, admin, and destructive. Destructive tools require both the destructive scope and their feature flag. | read,write,admin |
| ANKI_SYNC_HOST | No | Custom sync-server HTTP(S) base URL. Non-loopback servers require HTTPS; credentials, query strings, and fragments are rejected. | |
| MCP_AUTH_TOKEN | No | Bearer token supplied directly. Use exactly one of this setting and MCP_AUTH_TOKEN_FILE; the Compose setup uses the file variant. | |
| ANKI_SYNC_ON_READ | No | Synchronize before coordinated reads. Individual read tools can still request a sync with sync_before=true. | false |
| MCP_ALLOWED_HOSTS | No | Comma-separated HTTP Host patterns accepted by MCP DNS-rebinding protection. Add the service name or hostname used by remote clients. | testserver,localhost,localhost:*,127.0.0.1,127.0.0.1:*,anki-mcp,anki-mcp:* |
| MCP_MAX_PAGE_SIZE | No | Maximum limit accepted by paginated tools (1-1000). | 100 |
| ANKI_SYNC_ON_WRITE | No | Synchronize before and after coordinated mutations. Disabling this permits local changes to remain unsynchronized. | true |
| ANKI_SYNC_PASSWORD | No | Sync password supplied directly. It is optional after authentication has been persisted; do not set it together with ANKI_SYNC_PASSWORD_FILE. | |
| ANKI_SYNC_USERNAME | No | AnkiWeb username or self-hosted sync username. Required for anki_sync_login and for bootstrap when no persisted authentication exists. | |
| ANKI_BOOTSTRAP_MODE | No | Startup behavior: disabled, or download_if_empty to authenticate and perform a download-only initialization when the local collection is empty. Startup fails rather than uploading if the server requests a full upload. | disabled |
| ANKI_MAX_BATCH_SIZE | No | Maximum notes accepted by one atomic batch-create operation (1-500). | 50 |
| MCP_ALLOWED_ORIGINS | No | Comma-separated browser origins accepted by MCP transport security. Add explicit trusted origins when using a browser-based client. | http://localhost:*,http://127.0.0.1:* |
| MCP_AUTH_TOKEN_FILE | No | Path to a file containing the bearer token. One trailing newline is ignored. Compose mounts ./secrets/anki_mcp_token at /run/secrets/anki_mcp_token. | |
| MCP_MAX_CARD_FIELDS | No | Maximum fields or templates returned for a note or note type (1-1000); omitted counts are reported. | 100 |
| MCP_MAX_SEARCH_SCAN | No | Maximum collection items that bounded list/search and tag operations may scan (1-1000000). | 10000 |
| ANKI_ALLOW_FULL_SYNC | No | Registers explicit full-download and full-upload recovery tools. It must also be enabled for schema-changing tools. | false |
| ANKI_COLLECTION_PATH | No | Local Anki collection file. Compose persists its parent directory in the anki_data volume; do not point multiple processes at the same file. | /data/collection.anki2 |
| ANKI_MAX_MEDIA_BYTES | No | Maximum decoded size of a media file read, written, or renamed (1-16777216 bytes). | 1048576 |
| MCP_MAX_REQUEST_BYTES | No | Maximum MCP request-body size (1024-16777216 bytes); larger requests receive HTTP 413. | 1048576 |
| ANKI_ALLOW_DESTRUCTIVE | No | Registers delete and FSRS rescheduling preview/apply tools when MCP_SCOPES also includes destructive. Applying destructive changes requires a preview token and verified fresh backup. | false |
| MCP_MAX_RESPONSE_BYTES | No | Maximum serialized tool-result size (1024-16777216 bytes). It must be at least MCP_MAX_RENDERED_FIELD_BYTES + 4096. | 1048576 |
| ANKI_SYNC_PASSWORD_FILE | No | Path to the sync-password file. Compose mounts ./secrets/anki_sync_password at /run/secrets/anki_sync_password. Remove the setting and secret after login if automatic reauthentication is not needed. | |
| ANKI_ALLOW_REVIEW_ANSWERS | No | Registers the administrative card-answering tool, which changes scheduling state. | false |
| ANKI_ALLOW_SCHEMA_CHANGES | No | Registers note-type and template mutation tools when ANKI_ALLOW_FULL_SYNC is also enabled. Note-type deletion additionally requires destructive access. | false |
| ANKI_SYNC_TIMEOUT_SECONDS | No | Maximum wait for media synchronization (> 0, up to 3600 seconds). | 300 |
| MCP_MAX_RENDERED_FIELD_BYTES | No | UTF-8 byte limit for each rendered text field in responses (1-4194304); oversized values are truncated and marked. | 262144 |
| ANKI_CONFIRMATION_TTL_SECONDS | No | Lifetime of destructive-operation preview tokens (30-3600 seconds). Tokens are single-use. | 300 |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Server capabilities have not been inspected yet.
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
No tools | |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
This server cannot be deployed
Maintenance
ActivityMaintained
ResponsivenessNo issues