Skip to content
MCP server

mcp-odbc-server

MCP server giving AI clients SQL, schema and SPARQL access to ODBC data sources

mcp-odbc-server is an open-source MCP server for databases. It is available on CLI and Self-hosted.

Pricing
Open source
Platforms
CLI, Self-hosted
What it can do
Can change data (2 tools)
GitHub stars
13
Last commit

Similar MCP servers

About mcp-odbc-server

This server lets an AI assistant reach any database that has an ODBC driver, using a Data Source Name configured on the host machine. It is a thin TypeScript layer built on the node-odbc module, which hands calls to the local ODBC driver manager.

Clients can list schemas and tables, describe column definitions with keys and nullability, filter table names by substring, and run SQL queries with results returned as JSON, JSON Lines or Markdown tables. Connection details such as DSN, user and password are read from a local .env file or passed per tool call.

The examples are written for the Virtuoso connector, with additional tools for SPARQL and SPASQL queries and a Virtuoso support assistant function. It suits developers and data analysts who want to query relational data from Claude Desktop, Cline or Cursor.

Tools this server provides (10)

Taken from the project documentation; the running server may differ.

From the tool list in its README, going by the names, 2 of 10 tools change data; 2 names don't say.

From the server's own tool labels and tool names; not verified by us.

get_schemasName suggests: reads
List database schemas accessible to the connected DBMS.
get_tablesName suggests: reads
List tables associated with a selected database schema.
describe_tableName suggests: reads
Describe columns, data types, null handling, keys and foreign keys of a table.
filter_table_names
List tables whose names contain a given substring.
query_databaseName suggests: reads
Execute a SQL query and return results in JSON Lines format.
execute_queryName suggests: changes
Execute a SQL query and return results in JSON Lines format.
execute_query_mdName suggests: changes
Execute a SQL query and return results as a Markdown table.
spasql_queryName suggests: reads
Execute a SPASQL query and return results.
sparql_queryName suggests: reads
Execute a SPARQL query and return results.
virtuoso_support_ai
Interact with the Virtuoso Support Assistant.

What it does

Schema and table discovery
Lists schemas, tables and columns so a model can explore an unfamiliar database before writing queries.
SQL query execution
Runs SQL statements through the ODBC connection and returns rows as JSON, JSON Lines or Markdown.
Table name filtering
Finds tables whose names contain a given substring within a chosen schema.
SPARQL and SPASQL support
Runs SPARQL and hybrid SPASQL queries against Virtuoso-backed data sources.
Environment-based credentials
Keeps DSN, user and password in a local .env file rather than in prompts.

Good for

  • Asking an AI assistant questions about data held in a local Virtuoso or other ODBC database
  • Exploring table structures and relationships before writing reports
  • Generating Markdown tables of query results for documentation
  • Combining relational queries with SPARQL lookups over linked data

Pricing

Open source

Free and MIT licensed, self-hosted.

mcp-odbc-server FAQ

Which databases does mcp-odbc-server connect to?

Any database with an ODBC driver. The guide's examples use the Virtuoso connector, and other ODBC connectors are said to work too.

Which AI clients can use mcp-odbc-server?

The setup guide covers Claude Desktop, Cline in Visual Studio Code and Cursor, and it can also be tested with the MCP Inspector.

What Node.js version is required?

Node.js 21.1.0 or higher is required.

Where are database credentials stored?

They can be set in a .env file in the server directory with ODBC_DSN, ODBC_USER, ODBC_PASSWORD and ODBCINI.

Is mcp-odbc-server free?

Yes. mcp-odbc-server is open source, so you can use and self-host it for free.

What are the best alternatives to mcp-odbc-server?

The closest alternatives to mcp-odbc-server are mcp-sqlalchemy-server, mcp-jdbc-server, mcp-libsql, sql-query-mcp and mysql_mcp_server.

Where this comes from

  • Description: written from the project's README.

How AIPoweredBot checks servers