
mnemiq
Open-source text-to-SQL engine you can tune and evaluate on your own database
The repository was last updated 15 hours ago and is published under Apache-2.0.
mnemiq is an open-source MCP server for databases. It is available on CLI, API, Self-hosted and Web.
- Pricing
- Open source
- Platforms
- CLI, API, Self-hosted
- What it can do
- Read-only
- GitHub stars
- 82
- Last commit
- Language
- Python
Similar MCP servers
About mnemiq
Mnemiq turns plain-language questions into SQL over a database you control. Each stage between the question and the query, from schema retrieval to the refusal threshold, is exposed as a setting you can inspect and change, so results can be compared rather than taken on faith.
Before a query runs, a deterministic layer checks that it is read-only, touches only tables the caller may see, compiles in the source's SQL dialect and passes an EXPLAIN. Queries that fail any check are refused with a stated reason, and every answer keeps its SQL, the tables it read and the enrichment version behind it.
It suits data teams who want to measure how a text-to-SQL setup performs on their own schema, and who need to run models on local or hosted endpoints of their choosing. An evaluation harness grades returned rows and reports correct, wrong and refused answers separately.
Tools this server provides (2)
Taken from the project documentation; the running server may differ.
From the tool list in its README, going by the names, all 2 tools only read data.
From the server's own tool labels and tool names; not verified by us.
- db_readName suggests: reads
- Answers a natural-language question, returning the answer, SQL and trace.
- get_schemaName suggests: reads
- Returns the schema visible to the caller.
What it does
- Query validation before execution
- Generated SQL must pass read-only, permission and dialect checks before it reaches the database.
- Configurable model endpoints
- Works with any OpenAI-compatible endpoint, including local servers such as vLLM or Ollama.
- Schema enrichment tiers
- Builds table and column context from structure, profiling and reviewed business definitions.
- Result-based evaluation harness
- Grades answers by the rows returned and reports right, wrong and refused results separately.
- Answer traces
- Each answer shows the SQL as asked, the tables it touched and the enrichment version used.
- Row and column policies
- Applies access rules to the query tree so restricted tables are not visible to the model.
Good for
- Measure how accurately a text-to-SQL setup answers questions on your own warehouse
- Let analysts ask questions in plain English while every query stays read-only
- Run a text-to-SQL engine entirely inside your network using a local model
- Expose database questions to AI agents through a read-only MCP tool
Pricing
Open source
Free open-source engine; Fabriq hosted plans are separate
Prices change. Check agenticfabriq.com before you buy.
mnemiq FAQ
Which databases are supported?
Postgres, SQLite, DuckDB, Oracle, Snowflake and Databricks are listed, with DuckDB used as the universal executor.
What license is mnemiq under?
The engine is licensed under Apache-2.0.
Can mnemiq run without sending data to a hosted provider?
Yes. It accepts any OpenAI-compatible endpoint, and a setting can restrict it to endpoints on your own network.
What happens when a question cannot be answered from the data?
The engine returns a refusal with a reason, naming the missing columns where it can, instead of a guessed number.
Is mnemiq free?
Yes. mnemiq is open source, so you can use and self-host it for free.
What are the best alternatives to mnemiq?
The closest alternatives to mnemiq are nlqueries, xiyan_mcp_server, text2sql, QueryWeaver and anyquery.
Where this comes from
- Description: written from the project's README and the project's website.

