# mcp-odbc-server

> mcp-odbc-server is an open-source MCP server for databases. MCP server giving AI clients SQL, schema and SPARQL access to ODBC data sources. It is available on CLI and Self-hosted.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, Self-hosted
- **Repository:** https://github.com/openlinksoftware/mcp-odbc-server
- **GitHub stars:** 13
- **License:** MIT
- **Categories:** [databases](https://ai-powered.com/categories/databases)
- **Listing updated:** 2026-12-01

## About

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.

## Features

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

## Tools

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_schemas` (name suggests: reads): List database schemas accessible to the connected DBMS.
- `get_tables` (name suggests: reads): List tables associated with a selected database schema.
- `describe_table` (name 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_database` (name suggests: reads): Execute a SQL query and return results in JSON Lines format.
- `execute_query` (name suggests: changes): Execute a SQL query and return results in JSON Lines format.
- `execute_query_md` (name suggests: changes): Execute a SQL query and return results as a Markdown table.
- `spasql_query` (name suggests: reads): Execute a SPASQL query and return results.
- `sparql_query` (name suggests: reads): Execute a SPARQL query and return results.
- `virtuoso_support_ai`: Interact with the Virtuoso Support Assistant.

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

## Alternatives

- [mcp-sqlalchemy-server](https://ai-powered.com/mcp/mcp-sqlalchemy-server): mcp-sqlalchemy-server is an open-source MCP server for databases.
- [mcp-jdbc-server](https://ai-powered.com/mcp/mcp-jdbc-server): mcp-jdbc-server is an open-source MCP server for databases.
- [mcp-libsql](https://ai-powered.com/mcp/mcp-libsql): mcp-libsql is an open-source MCP server for databases.
- [sql-query-mcp](https://ai-powered.com/mcp/sql-query-mcp): sql-query-mcp is an open-source MCP server for databases.
- [mysql_mcp_server](https://ai-powered.com/mcp/mysql-mcp-server-4): mysql_mcp_server is an open-source MCP server for databases.
- [SQL Server MCP (Windows)](https://ai-powered.com/mcp/sql-server-mcp-windows): SQL Server MCP (Windows) is an open-source MCP server for databases.
- [postgres_mcp](https://ai-powered.com/mcp/postgres-mcp-5): postgres_mcp is an open-source MCP server for databases.
- [mcp-mongo-server](https://ai-powered.com/mcp/mcp-mongo-server): mcp-mongo-server is an open-source MCP server for databases.

---
Source: https://ai-powered.com/mcp/mcp-odbc-server
