mnemiq MCP

A text-to-SQL MCP server: an agent asks a database in words, gets SQL plus a trace, and a stated refusal when data is missing.

  • 88 ★ on the repository
  • Last commit
MCP server

Extended access

Why this level

  • Questions and schema descriptions go to the chosen model, and queries run on your database.
  • Result rows enter the agent context, so set role permissions in advance.
All reasons and checks

agenticfabriq/mnemiq

Install

Manual install

{ "mcpServers": { "mnemiq": { "command": "mnemiq", "args": ["serve"] } } }

The configuration from the README. First run `uv sync`, set up the source and model, then `mnemiq enrich` and `mnemiq build`.

Access and checks

How we review

Extended accessThe tool runs code or makes network calls and only reads external data.

  • Questions and schema descriptions go to the chosen model, and queries run on your database.
  • Result rows enter the agent context, so set role permissions in advance.

This is third-party code. Review the repository files before installing.

What it does

mnemiq answers natural-language questions over your database and gives an agent two tools through MCP: `db_read(question)` returns an answer, SQL and a trace, and `get_schema()` returns the schema. Both only read data and work within the caller's permissions. A model only proposes a query. A deterministic layer then checks that the query is read-only, touches only visible objects, compiles in the source dialect and survives `EXPLAIN`. A query that fails ends in a refusal with a reason instead of a plausible number. Sources are Postgres, SQLite, DuckDB, Oracle, Snowflake and Databricks. A built-in harness measures accuracy on your own questions.

Who it is for. Data analysts and teams who want to give Claude Code or Cursor answers over their own database and first measure accuracy on its questions.

Good fit when

  • An agent needs numbers from a data warehouse and nobody wants to write SQL by hand.
  • Each role needs its own permissions, and the model never sees tables outside its access.
  • Accuracy on your own schema matters before launch: twenty or thirty questions are run with different settings.
  • An answer should show the query and the tables it read so a person can check it.

Not a fit when

  • Writing to the database or changing data is required, while the tools only read.
  • The data cannot go to an external model provider and no local model is available.
  • A ready hosted service is expected: the project is run yourself.

Example request

How many customers do we have by country? Show the SQL and the tables you read.

MCP

Transport
stdio
Authentication
API key

Environment variables

MNEMIQ_LLM_BASE_URL required
Base URL of the OpenAI-compatible API of the model that writes SQL.
MNEMIQ_LLM_API_KEY required, secret
Access key for the model.
MNEMIQ_LLM_MODEL required
Model name.
MNEMIQ_SOURCES_PATH required
Path to the data sources manifest.
MNEMIQ_AUTHZ_PATH required
Path to the role access policy.
MNEMIQ_STORE_PATH required
Path to the DuckDB file with the enrichment cache.

Limitations

Python 3.12 or newer and the `uv` manager are required, and the first install pulls about 230 MB. Model access is needed through the `MNEMIQ_LLM_BASE_URL`, `MNEMIQ_LLM_API_KEY` and `MNEMIQ_LLM_MODEL` variables. You must run `mnemiq enrich` and `mnemiq build` before asking questions, and until then the tool returns an error. DuckDB in the dependencies is capped below version 2. The project is young: the version in `pyproject.toml` is marked `0.1.0.dev0`.

How to disable. Remove the `mnemiq` entry from the MCP client configuration. The cache lives at `MNEMIQ_STORE_PATH` and goes away with that file.

FAQ

Which MCP tools does mnemiq expose?

Two: `db_read(question)` returns an answer, SQL and a trace, and `get_schema()` returns the schema. Both only read and respect the caller's permissions.

How do I connect mnemiq to an MCP client?

Add `{ "mcpServers": { "mnemiq": { "command": "mnemiq", "args": ["serve"] } } }` to the configuration. With a `uv sync` installation run `uv run mnemiq serve` from the repository directory.

What happens if the data for an answer is missing?

The engine refuses and names the columns it would need instead of returning a plausible-looking number.

Can I run mnemiq without my own database?

Yes. `uv run python scripts/seed_demo.py` creates a small SQLite database with a source manifest and access policy in the `demo/` folder.

Is there a web interface?

Yes, the workbench starts with `uv run mnemiq serve --http` on `127.0.0.1:8080` after building the `workbench` directory.

Discussion

No questions or reviews yet.

Official

A single-binary MCP server for MySQL, MariaDB, PostgreSQL and SQLite: read-only by default, with optional PII redaction

MCP serverBroad access33Repository stars

One MCP server for SQLite, SQL Server, PostgreSQL and MySQL: read and change data, edit schemas and export to CSV and JSON

MCP serverBroad access390Repository stars

A SQLite-based SQL engine with plugins for apps, databases and files: the anyquery mcp command exposes that data to Claude, Cursor and other MCP clients

MCP serverBroad access1.8KRepository stars

A Go MCP server that lets an agent ask a PostgreSQL database questions in plain language and returns the query result

MCP serverExtended access542Repository stars
Official

A desktop SQL workspace with a built-in MCP server: the agent reads the schema and runs queries in the same client you already use

MCP serverBroad access5.4KRepository stars

A Python MCP server for MySQL: listing tables, reading data, running SQL and inspecting schema through a controlled interface

MCP serverBroad access1.4KRepository stars

README in short

The project provides a text-to-SQL engine and a harness for measuring accuracy on your own data. The nine stages of an answer, the tiers of the semantic layer and a quickstart on a demo database are described. A separate beacon repository grades results so the system does not mark its own homework.

README badge

Report a problem

Foxx AImnemiq
Foxx AI

I am Foxx AI and I have already vetted this tool. Ask about install, setup or anything else, and I will keep it simple.