Mochi MCP Server
A Model Context Protocol server that enables AI agents (Claude, Codex, etc.) to manage your Mochi.cards flashcards.
Features
Browse decks and cards
Search cards by content or tags
Create/Update cards with two-phase commit (preview before applying)
Delete cards with typed confirmation (safety first)
Robust safety - deck deletion disabled by default
Quick Start
Get your API key from the Mochi app: Settings → Account → API Key.
Usage with Claude Desktop
Add to your claude_desktop_config.json:
Then ask Claude: "List my Mochi decks" or "Search for cards about gradients".
Tools
Read Operations
Tool | Description |
| List all decks |
| Get deck with card list |
| Get full card content |
| Get multiple cards by ID |
| Search by text, tags, or date. Returns rich results (deckId, createdAt, etc.) |
| Paginated card listing with bookmark |
| Find decks by name (case-insensitive partial match) |
Write Operations (Two-Phase Commit)
Tool | Description |
| Preview new card → returns token |
| Apply creation with token |
| Preview edit with diff → returns token |
| Preview Q/A edit → returns token |
| Apply update with token |
| Preview batch updates |
| Apply batch updates |
Tag Operations (Two-Phase)
Tool | Description |
| Preview adding tags to cards |
| Preview removing tags |
| Apply tag changes with token |
Delete Operations (Requires Confirmation)
Tool | Description |
| Soft-delete (requires: "delete card <id>") |
| Disabled by default |
Performance Notes
Global search scans at most 1000 cards
Per-deck search scans at most 5000 cards
Use
list_cards_pagewith pagination for larger collectionsDate filters use UTC (ISO 8601 format:
YYYY-MM-DDTHH:mm:ss.sssZ)
Configuration
Variable | Required | Default | Description |
| ✅ | - | Your Mochi API key |
| ❌ |
| Enable deck deletion |
| ❌ |
| Preview token validity |
Safety Design
Two-phase commit: Create/update operations show a preview first. You approve by using the returned token.
Typed confirmations: Delete requires typing
"delete card <id>"exactly.Deck deletion disabled: Must set
MOCHI_ALLOW_DECK_DELETE=trueto enable.Soft delete default: Cards go to trash (recoverable in Mochi app).
Development
License
MIT