
danielpmichalski/anki-cloud
Developer toolsこのページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る
OAuth2.0、REST API、MCP Server が組み込まれた本格的な Anki Sync Server が搭載され、Anki が望む方法をすべて Anki と連携できます.
概要
ファーストクラスのREST API と MCP サーバを備えた、プライバシーファーストでオープンソースの Anki の同期サーバーで、シームレスな LLM-to-Anki ワークフローを実現します。 ユーザーのデッキデータは、独自のクラウドストレージ(Googleドライブ、Dropboxなど)に住んでいます。このサービスは、ユーザーデータを保持しないステートレスなインフラです。 「Anki」はAnkitects Pty Ltd.の登録商標です。 このプロジェクトは、Ankitects が承認または承認されていない。 同期サーバーは、Dockerfile.sync 経由で sync-platform-cloud/ からローカルにコンパイルされます。 共有SQLiteデータベースに対してAnkiクライアントを認証し、各ユーザーのGoogleドライブバックエンドを解決します。 Google OAuthの資格情報が必要です。 実行前に、OAuth アプリケーションでこれらのコールバック URI を登録します。 (クラウドコンソール → API & サービス → 認証情報): (オプション — 設定 → 開発者設定 → OAuth アプリ): .env で TRUSTED ORIGINS をフロントエンド URL(s) (コンマ区切り) に設定するので、より良い Auth は Web UI からのリクエストを受け入れます。 デフォルトは FRONTEND URL に設定されていない場合です.
概要(AI 翻訳)
ファーストクラスの REST API と MCP サーバーで、プライバシーファースト、オープンソースの Anki 同期サーバー、 シームレスなLM-to-Ankiワークフローを有効にします。 ユーザーのデッキデータは、独自のクラウドストレージに住んでいます (Google ドライブ、Dropbox など) — このサービスは、保持しないステートレスなインフラです。 ユーザーデータ。
Trademark Note: "Anki"はAnkitects Pty Ltd.の登録商標です。 プロジェクト はAnkitects によってまたは支持されると関連付けられません。
お問い合わせ
スタックを実行
[sync-platform-cloud/]から[Dockerfile.sync]からローカルで同期サーバーがコンパイルされます。
共有された SQLite データベースに対して Anki クライアントを認証し、各ユーザーの問題を解決します。
Googleドライブバックエンド。 Google OAuthの資格情報が必要です。
実行前に、OAuth アプリケーションでこれらのコールバック URI を登録します。
Google(クラウドコンソール→API&サービス→認証)
GitHub (オプション — 設定 → 開発者設定 → OAuth アプリ):
.envのTRUSTED_ORIGINSをフロントエンドURL(s)(コンマ区切り)に設定しますので、より良いAuthが受け入れます
Web UIからのリクエスト unset の場合、[FRONTEND_URL にデフォルトを指定します。
First build:
docker compose up --buildは、Rust sync サーバをソースからコンパイルします。 (始発10~20分).
このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。
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"
}
}
}
}