tinydb-emcipi
This repo is – 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
Docker Compose
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 new DB (optionally with initial schema) |
| see all TinyDB files | |
| set the DB every other tool will use | |
| schema, sample records, field list | |
Records |
| field-value query, returns schema too |
| dump every record | |
/
| create / modify validated records | |
Schema |
| create / update JSON Schema for a DB |
Project Structure (top-level)
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
This server cannot be installed
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
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.