
danielpmichalski/anki-cloud
Developer toolsЭта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал
A fully-fledged Anki Sync Server with OAuth2.0, REST API and MCP Server included, everything one needs to finally work with Anki the way one wants.
Обзор
A privacy-first, open-source Anki sync server with a first-class REST API and MCP server, enabling seamless LLM-to-Anki workflows. User deck data lives in their own cloud storage (Google Drive, Dropbox, etc.) — this service is stateless infrastructure that never holds user data. "Anki" is a registered trademark of Ankitects Pty Ltd. This project is not affiliated with or endorsed by Ankitects. The sync server is compiled locally from sync-platform-cloud/ via Dockerfile.sync. It authenticates Anki clients against the shared SQLite database and resolves each user's Google Drive backend. Google OAuth credentials are required. Before running, register these callback URIs in your OAuth apps: (Cloud Console → APIs & Services → Credentials): (optional — Settings → Developer settings → OAuth Apps): Set TRUSTED_ORIGINS in .env to your frontend URL(s) (comma-separated) so Better Auth accepts requests from the web UI. Defaults to FRONTEND_URL if unset.
README
Показан фрагмент оригинального README. Открыть оригинал.
anki-cloud
A privacy-first, open-source Anki sync server with a first-class REST API and MCP server, enabling seamless LLM-to-Anki workflows. User deck data lives in their own cloud storage (Google Drive, Dropbox, etc.) — this service is stateless infrastructure that never holds user data.
Trademark note: “Anki” is a registered trademark of Ankitects Pty Ltd. This project is not affiliated with or endorsed by Ankitects.
Running the stack
The sync server is compiled locally from sync-platform-cloud/ via Dockerfile.sync.
It authenticates Anki clients against the shared SQLite database and resolves each user’s
Google Drive backend. Google OAuth credentials are required.
Before running, register these callback URIs in your OAuth apps:
Google (Cloud Console → APIs & Services → Credentials):
{BETTER_AUTH_URL}/v1/auth/callback/google # sign-in callback
{FRONTEND_URL}/v1/me/storage/connect/google/callback # Google Drive callback
GitHub (optional — Settings → Developer settings → OAuth Apps):
{BETTER_AUTH_URL}/v1/auth/callback/github # sign-in callback
Set TRUSTED_ORIGINS in .env to your frontend URL(s) (comma-separated) so Better Auth accepts
requests from the web UI. Defaults to FRONTEND_URL if unset.
cp .env.example .env # fill in all credentials
docker compose up --build
First build:
docker compose up --buildcompiles the Rust sync server from source (~10–20 min on first run). Subsequent starts are instant once the image is cached.
If you’re actively developing sync-platform-cloud/ or anki-cloud-sync, rebuild only the
sync image:
docker compose build anki-sync-server
docker compose up
To develop against a local checkout of anki-cloud-sync (instead of fetching git deps):
docker compose -f docker-compose.yml -f docker-compose.dev.yml up --build
docker-compose.dev.yml overrides anki-sync-server to build directly from ../anki-cloud-sync.
API reference
Once the stack is running, two endpoints are available:
| URL | Purpose |
|---|---|
http://localhost:3000/openapi.json |
OpenAPI 3.1 spec — import into Postman via Import → Link |
http://localhost:3000/docs |
Scalar interactive UI |
All data endpoints (/v1/decks/*, /v1/notes/*, /v1/cards/*) require an API key:
Authorization: Bearer ak_
Generate a key in the web UI under Account → API Keys, or via POST /v1/me/api-keys.
Установка
This server does not publish a one-line install command.
Open the repository installation guide Новичок в MCP? Начните с руководства на mcpskill.org →Конфигурация
{
"mcpServers": {
"anki-cloud": {
"command": "bun",
"args": [
"run",
"/path/to/anki-cloud/mcp/src/index.ts"
],
"env": {
"API_URL": "http://localhost:3000",
"API_KEY": "ak_your_key_here"
}
}
}
}