MCP ODBC Server is an MCP server that provides large language models with structured access to ODBC-compliant data sources via local Data Source Names (DSNs). Built as a TypeScript application on top of node-odbc, the server bridges Model Context Protocol clients directly to the host system's local ODBC Driver Manager. Software developers, data analysts, and database administrators use this server to interact with relational databases and semantic stores directly from LLM interfaces. The server enables agents to inspect database metadata, discover schemas, retrieve table layouts, and describe column types. It also allows clients to run arbitrary SQL queries with output formatted as JSON, Markdown tables, or JSON Lines (JSONL). In addition to standard SQL operations across generic ODBC drivers, it includes specialized support for OpenLink Virtuoso environments, enabling hybrid SPASQL queries, native SPARQL queries against RDF graphs, and automated interactions with Virtuoso AI assistant procedures.
Category: Data & Analytics
Tags: database-connectivity, dsn, odbc, SQL
odbcinst -j and odbcinst -q -s. 2. Clone the repository and change directory: sh git clone https://github.com/OpenLinkSoftware/mcp-odbc-server.git cd mcp-odbc-server 3. Install the required dependencies: sh npm install @modelcontextprotocol/sdk zod tsx odbc dotenv 4. Configure your .env file with your connection parameters such as ODBC_DSN, ODBC_USER, ODBC_PASSWORD, and ODBCINI. 5. Register the server in your MCP client configuration using the tsx executable pointing to ./src/main.ts: json { "mcpServers": { "odbc": { "command": "npx", "args": ["tsx", "/path/to/mcp-odbc-server/src/main.ts"], "env": { "ODBCINI": "/Library/ODBC/odbc.ini" } } } }Part of MCP Servers
MCP ODBC Server is a TypeScript Model Context Protocol server that uses node-odbc to route database commands from LLM clients to local ODBC Driver Managers. It allows AI tools to inspect schemas, read table structures, and run queries against any database with an active DSN.
Clone the repository from GitHub, verify that Node.js 21.1.0 or higher is active, and install packages using npm install. Set up your ODBC configuration paths and credentials in an environment file, then point your MCP client to the server entry point using npx and tsx.
The server includes schema discovery tools like get_schemas, get_tables, filter_table_names, and describe_table. Query execution tools include query_database, execute_query, and execute_query_md. For Virtuoso databases, it provides spasql_query, sparql_query, and virtuoso_support_ai.
Any database management system accessible through an installed ODBC driver and configured DSN can work with this server. While tested and documented using OpenLink Virtuoso, generic SQL querying and schema inspection functions operate across any standard ODBC connector.