TinyDB MCP Server
Provides long-term memory for chatbots through a TinyDB-backed MCP server. Enables storing, searching, and managing JSON records with schema validation without requiring external databases.
README
tinydb-emcipi

This repo is docker-friendly – an MCP wrapper around TinyDB that gives chatbots long-term memory without leaving your laptop.
Tiny MCP server backed by TinyDB — drop-in long-term memory for chatbots and small-context LLM apps.
Why?
Keeping structured facts in the prompt is wasteful. With tinydb-emcipi an agent can store, search and mutate JSON records through MCP tool calls, loading only what it needs.
- Zero dependencies – TinyDB stores JSON on disk.
- Schema-first – every record validated; the schema itself is queryable.
- Opinionated tools – list DBs, switch DB, introspect schema, CRUD, search.
- Docker-friendly – run locally or in CI with a single
docker compose up.
Quick Start
Native
pip install -r requirements.txt
python -m main # MCP endpoint on http://localhost:8000/mcp
Docker Compose
docker compose up # builds dependencies at first run
The compose file mounts the repo into /app inside a python:3.12-slim container and starts the same command.
Available MCP Tools (summary)
| Category | Tool | Purpose |
|---|---|---|
| Discovery | create_database_tool |
create new DB (optionally with initial schema) |
list_databases_tool |
see all TinyDB files | |
switch_active_db_tool |
set the DB every other tool will use | |
get_database_info_tool |
schema, sample records, field list | |
| Records | search_records_tool |
field-value query, returns schema too |
get_all_records_tool |
dump every record | |
add_record_tool / update_record_tool |
create / modify validated records | |
| Schema | set_schema_tool |
create / update JSON Schema for a DB |
Project Structure (top-level)
config/ configuration & sample
logs/ runtime logs
sandbox/db/ TinyDB JSON databases
utils/ code modules (db, schema, mcp wrappers)
main.py entry-point
docker-compose.yml
requirements.txt
Contributing
Pull requests are welcome! Please:
- Follow PEP 8 and keep imports sorted.
- Add or update unit tests.
- Keep the README and doc-strings concise and useful.
Example MCP Prompt
A ready-to-use JSON request lives at scratchpad/mcp.json.sample showing how to invoke these tools from an MCP client.
© 2025 • MIT License
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.