Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Mochi MCP Serversearch for cards about machine learning"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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
# Install
npm install
# Build
npm run build
# Run (needs your Mochi API key)
MOCHI_API_KEY=your_key_here node dist/index.jsGet your API key from the Mochi app: Settings → Account → API Key.
Usage with Claude Desktop
Add to your claude_desktop_config.json:
{
"mcpServers": {
"mochi": {
"command": "node",
"args": ["/path/to/mochi-mcp/dist/index.js"],
"env": {
"MOCHI_API_KEY": "your_api_key"
}
}
}
}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
# Run tests
npm test
# Type check
npm run lint
# Development mode
MOCHI_API_KEY=your_key npm run dev
# Test with MCP Inspector
npm run inspectLicense
MIT
Resources
Looking for Admin?
Admins can modify the Dockerfile, update the server description, and track usage metrics. If you are the server author, to access the admin panel.