Provides containerization support with volume mounting for database persistence, allowing portable deployment of the flash card management system
Uses OpenAI embeddings for semantic search across flash card projects and cards, enabling similarity-based retrieval of content
Leverages SQLite for persistent storage of flash card projects and cards, including their associated metadata and embedding information
FlashCardsMCP
This is a dockerized Python Model Context Protocol (MCP) server for managing flash card projects. It uses OpenAI embeddings and SQLite for semantic search and storage.
Features
- List all project names and ids
- Semantic search for project by name (using OpenAI embeddings)
- Get random flash card by project id
- Add flash card to project (with question, answer, optional hint, optional description)
- List all flash cards by project
- Semantic search for flash cards by query (using OpenAI embeddings)
- Global semantic search for cards across all projects
- Retrieve a card by its id
- All API/tool responses include a
type
field:project
orcard
- No binary embedding data is ever returned in API responses
API/Tool Design
- All tools raise
ValueError
for not found or empty results - Project and card creation tools return the full object, not just the id
- See
.github/copilot-instructions.md
for code generation rules
Getting Started
- Install dependencies:
- Run the server:
- Run with Docker:
Environment Variables
- OPENAI_API_KEY: Required. Set this environment variable to your OpenAI API key to enable embedding generation. Example:You must set this variable before running the server or running the Docker container.
Usage
This server exposes its API via the Model Context Protocol (MCP) using FastMCP. You can call the following tools:
get_all_projects()
→ List all projectsadd_project(name)
→ Create a new project (returns full project dict)search_project_by_name(name)
→ Semantic search for a project (returns full project dict)get_random_card_by_project(project_id)
→ Get a random card from a projectadd_card(project_id, question, answer, hint=None, description=None)
→ Add a card (returns full card dict)get_all_cards_by_project(project_id)
→ List all cards in a projectsearch_cards_by_embedding(project_id, query)
→ Semantic search for cards in a projectglobal_search_cards_by_embedding(query)
→ Semantic search for cards across all projectsget_card_by_id(card_id)
→ Retrieve a card by its id
All returned objects include a type
field and never include binary embedding data.
Development
- All project and card data is stored in SQLite (
database.db
) - Embeddings are generated using OpenAI's
text-embedding-ada-002
model - The server is implemented in
main.py
anddb.py
- See
.github/copilot-instructions.md
for code and API rules
Inspector
For more details, see the code and docstrings in main.py
and db.py
.
This server cannot be installed
A dockerized Python MCP server that manages flash card projects using OpenAI embeddings and SQLite, enabling semantic search and storage of flash cards across projects.
Related MCP Servers
- -securityAlicense-qualityA Python-based MCP server that integrates the TapTools API, enabling AI models to fetch Cardano blockchain data, including tokens, NFTs, market stats, and wallet info, through standardized tools.Last updated -PythonMIT License
- -securityFlicense-qualityAn MCP server that enables AI assistants like Claude to interact with Anki flashcard decks, allowing users to create, manage, and update flashcards through natural language conversations.Last updated -1TypeScript
- AsecurityFlicenseAqualityAn MCP server that integrates Claude with Anki flashcards, allowing users to review due cards and create new flashcards directly through conversation.Last updated -68Python
- -securityAlicense-qualityAn MCP server for creating, studying, and organizing flashcard decks programmatically with features like spaced repetition and statistics tracking.Last updated -1TypeScriptMIT License