
querywise-mcp
MCP server and CLI that lets LLMs query your SQL databases in plain language
querywise-mcp is an open-source MCP server for databases. It is available on CLI, Self-hosted and API.
- Pricing
- Open source
- Platforms
- CLI, Self-hosted, API
- What it can do
- Can delete data (1 tool)
- GitHub stars
- 3
- Last commit
Similar MCP servers
About querywise-mcp
Querywise exposes a database to an AI assistant through a business semantic layer: glossary terms, metric definitions, a data dictionary, knowledge documents and example queries, all matched against the live schema before any SQL is written. The assistant retrieves grounded context for a question, drafts a SELECT, and runs it through a read-only execution path.
The same engine also ships as a command-line tool that runs the full natural-language-to-SQL pipeline on the server side, which needs an LLM provider key or a local Ollama instance. Metadata is stored in an embedded SQLite database with sqlite-vec, so there is no separate Postgres to operate.
It suits analysts and developers who want Claude or another MCP client to answer questions against internal databases while keeping queries read-only and tied to documented business definitions.
Tools this server provides (12)
Taken from the project documentation; the running server may differ.
From the tool list in its README, going by the names, 1 of 12 tools deletes data and 2 change data; 4 names don't say.
From the server's own tool labels and tool names; not verified by us.
- list_connectionsName suggests: reads
- List configured database connections.
- create_connectionName suggests: changes
- Create a database connection.
- test_connection
- Test a database connection.
- introspect_connection
- Introspect a connection's schema.
- delete_connectionName suggests: deletes
- Delete a database connection.
- list_tablesName suggests: reads
- List tables in a connection.
- describe_tableName suggests: reads
- Describe a table's columns.
- get_semantic_contextName suggests: reads
- Retrieve grounded semantic context for a question.
- run_sqlName suggests: changes
- Run a read-only SQL SELECT.
- generate_sql
- Generate SQL from a question without executing it.
- ask
- Run the full question-to-answer pipeline.
- query_historyName suggests: reads
- Show past queries.
What it does
- Business semantic layer
- Stores glossary terms, metric definitions, value mappings and example queries that ground generated SQL in your own vocabulary.
- Read-only SQL execution
- Combines a static blocklist of DDL, DML and admin statements with connector-level read-only enforcement.
- Hybrid context retrieval
- Selects relevant tables and definitions using vector similarity, keyword matching and foreign-key expansion.
- Multiple database connectors
- Connects to SQLite and PostgreSQL out of the box, with optional BigQuery and Databricks support.
- Conversational metadata management
- Lets an MCP client add, list and delete glossary terms, metrics and knowledge entries without using the CLI.
- Zero-infrastructure setup
- Runs from a single SQLite metadata file and works keyword-only without any embedding provider.
Good for
- Letting Claude answer ad hoc revenue or customer questions against a company database
- Grounding an assistant's SQL in documented metric definitions and business glossary terms
- Running a quick local analysis on a SQLite file without standing up a web application
- Reviewing generated SQL before executing it with a separate read-only run step
- Seeding a banking reporting layer with the bundled IFRS 9 sample for testing
Pricing
Open source
Free and MIT licensed; self-hosted.
querywise-mcp FAQ
Can the server modify my database?
Execution is designed to be read-only: a static SQL blocklist blocks DDL, DML and admin statements, and connectors enforce read-only access where supported.
Do I need an LLM API key to use querywise-mcp?
No. The MCP workflow lets the client model write the SQL, so the server needs no key. A provider key or Ollama is only required for embeddings and the server-side ask and generate_sql tools.
Which databases are supported?
SQLite and PostgreSQL are included. BigQuery and Databricks are available as optional extras.
How is querywise-mcp installed and started?
Install with pip in a virtual environment, initialise the metadata store with the init command, then run the serve command over stdio or Streamable HTTP.
Is querywise-mcp free?
Yes. querywise-mcp is open source, so you can use and self-host it for free.
What are the best alternatives to querywise-mcp?
The closest alternatives to querywise-mcp are sql-query-mcp, xiyan_mcp_server, nlqueries, mcp-server-mysql and mysql_mcp_server.
Where this comes from
- Description: written from the project's README.



