# mnemiq

> mnemiq is an open-source MCP server for databases. Open-source text-to-SQL engine you can tune and evaluate on your own database. It is available on CLI, API, Self-hosted and Web.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, API, Self-hosted, Web
- **Website:** https://www.agenticfabriq.com/mnemiq
- **Repository:** https://github.com/agenticfabriq/mnemiq
- **GitHub stars:** 82
- **License:** Apache-2.0
- **Categories:** [databases](https://ai-powered.com/categories/databases)
- **Listing updated:** 2026-12-01

## About

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.

## Features

- **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

## Tools

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_read` (name suggests: reads): Answers a natural-language question, returning the answer, SQL and trace.
- `get_schema` (name suggests: reads): Returns the schema visible to the caller.

## 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.

## Alternatives

- [nlqueries](https://ai-powered.com/mcp/nlqueries): nlqueries is an open-source MCP server for databases.
- [xiyan_mcp_server](https://ai-powered.com/mcp/xiyan-mcp-server): xiyan_mcp_server is an open-source MCP server for databases.
- [text2sql](https://ai-powered.com/mcp/text2sql-2): text2sql is an open-source MCP server for databases.
- [QueryWeaver](https://ai-powered.com/mcp/queryweaver): QueryWeaver is an open-source MCP server for databases.
- [anyquery](https://ai-powered.com/mcp/anyquery): anyquery is an open-source MCP server for databases.
- [PlainQuery | MCP DB Agent](https://ai-powered.com/mcp/plainquery-mcp-db-agent): PlainQuery | MCP DB Agent is a freemium MCP server for databases.
- [querywise-mcp](https://ai-powered.com/mcp/querywise-mcp): querywise-mcp is an open-source MCP server for databases.
- [sqlai.dev SQL Verifier](https://ai-powered.com/mcp/sqlai-dev-sql-verifier): sqlai.dev SQL Verifier is a freemium MCP server for databases.

---
Source: https://ai-powered.com/mcp/mnemiq
