Typescript based Model Context Procotol (MCP) Server for Open Database Connectivity (ODBC)
Config is the same across clients — only the file and path differ.
{
"mcpServers": {
"ODBC": {
"env": {
"PATH": "~/.nvm/versions/node/v21.1.0/bin:${PATH}",
"ODBCINI": "/Library/ODBC/odbc.ini",
"NODE_VERSION": "v21.1.0"
},
"args": [
"/path/to/mcp-odbc-server/node_modules/.bin/tsx",
"/path/to/mcp-odbc-server/src/main.ts"
],
"command": "/path/to/.nvm/versions/node/v21.1.0/bin/node",
"disabled": false,
"autoApprove": []
}
}
}Are you the author?
Add this badge to your README to show your security score and help users find safe servers.
This document covers the set up and use of a generic ODBC server for the Model Context Protocol (MCP), referred to as an mcp-odbc server. It has been developed to provide Large Language Models with transparent access to ODBC-accessible data sources via a Data Source Name configured for a specific ODBC Connector (also called an ODBC Driver).
Run this in your terminal to verify the server starts. Then let us know if it worked — your result helps other developers.
npx -y '@modelcontextprotocol/sdk' 2>&1 | head -1 && echo "✓ Server started successfully"
After testing, let us know if it worked:
Five weighted categories — click any category to see the underlying evidence.
@modelcontextprotocol/sdk has cross-client data leak via shared server/transport instance reuse
### Summary Cross-client data leak via two distinct issues: (1) reusing a single `StreamableHTTPServerTransport` across multiple client requests, and (2) reusing a single `McpServer`/`Server` instance across multiple transports. Both are most common in stateless deployments. ### Impact This advisory covers two related but distinct vulnerabilities. A deployment may be affected by one or both. #### Issue 1: Transport re-use **What happens:** When a single `StreamableHTTPServerTransport` insta
Anthropic's MCP TypeScript SDK has a ReDoS vulnerability
### Impact A ReDoS vulnerability in the `UriTemplate` class allows attackers to cause denial of service. The `partToRegExp()` function generates a regex pattern with nested quantifiers (`([^/]+(?:,[^/]+)*)`) for exploded template variables (e.g., `{/id*}`, `{?tags*}`), causing catastrophic backtracking on malicious input. **Who is affected:** MCP servers that register resource templates with exploded array patterns and accept requests from untrusted clients. **Attack result:** An attacker sen
Model Context Protocol (MCP) TypeScript SDK does not enable DNS rebinding protection by default
The Model Context Protocol (MCP) TypeScript SDK does not enable DNS rebinding protection by default for HTTP-based servers. When an HTTP-based MCP server is run on localhost without authentication with `StreamableHTTPServerTransport` or `SSEServerTransport` and has not enabled `enableDnsRebindingProtection`, a malicious website could exploit DNS rebinding to bypass same-origin policy restrictions and send requests to the local MCP server. This could allow an attacker to invoke tools or access re
Click any tool to inspect its schema.
Be the first to review
Have you used this server?
Share your experience — it helps other developers decide.
Sign in to write a review.
Others in data / developer-tools
Query and manage PostgreSQL databases directly from AI assistants
A Model Context Protocol (MCP) server and CLI that provides tools for agent use when working on iOS and macOS projects.
XcodeBuildMCP provides tools for Xcode project management, simulator management, and app utilities.
Asynchronous coordination layer for AI coding agents: identities, inboxes, searchable threads, and advisory file leases over FastMCP + Git + SQLite
MCP Security Weekly
Get CVE alerts and security updates for Mcp Odbc Server and similar servers.
Start a conversation
Ask a question, share a tip, or report an issue.
Sign in to join the discussion.
This document covers the set up and use of a generic ODBC server for the Model Context Protocol (MCP), referred to as an mcp-odbc server. It has been developed to provide Large Language Models with transparent access to ODBC-accessible data sources via a Data Source Name configured for a specific ODBC Connector (also called an ODBC Driver).

This MCP Server for ODBC is a small TypeScript layer built on top of node-odbc. It routes calls to the host system's local ODBC Driver Manager via node.js (specifically using npx for TypeScript).
While the examples that follow are oriented toward the Virtuoso ODBC Connector, this guide will also work with other ODBC Connectors. We strongly encourage code contributions and submissions of usage demos related to other database management systems (DBMS) for incorporation into this project.
node.js version. If it's not 21.1.0 or higher, upgrade or install explicitly using:
nvm install v21.1.0
npm install @modelcontextprotocol/sdk zod tsx odbc dotenv
nvm version using:
nvm alias default 21.1.0
git clone https://github.com/OpenLinkSoftware/mcp-odbc-server.git
cd mcp-odbc-server
npm init -y
npm install @modelcontextprotocol/sdk zod tsx odbc dotenv
odbcinst -j
odbcinst -q -s
As good security practice, you should use the .env file situated in the same directory as the mcp-ser to set bindings for the ODBC Data Source Name (ODBC_DSN), the User (ODBC_USER), the Password (ODBC_PWD), the ODBC INI (ODBCINI), and, if you want to use the OpenLink AI Layer (OPAL) via ODBC, the target Large Language Model (LLM) API Key (API_KEY).
API_KEY=sk-xxx
ODBC_DSN=Local Virtuoso
ODBC_USER=dba
ODBC_PASSWORD=dba
ODBCINI=/Library/ODBC/odbc.ini
After successful installation, the following tools will be available to MCP client applications.
| name | description |
|---|---|
get_schemas | List database schemas accessible to connected database management system (DBMS). |
get_tables | List tables associated with a selected database schema. |
describe_table | Provide the description of a table associated with a designated database schema. This includes information about column names, data types, null handling, autoincrement, primary key, and foreign keys |
filter_table_names | List tables associated with a selected database schema, based on a substring pattern from the q input field. |
query_database | Execute a SQL query and return results in JSON Lines (JSONL) format. |
execute_query | Execute a SQL query and return results in JSON Lines (JSONL) format. |
execute_query_md | Execute a SQL query and return results in Markdown table format. |
spasql_query | Execute a SPASQL query and return results. |
sparql_query | Execute a SPARQL query and return results. |
virtuoso_support_ai | Interact with the Virtuoso Support Assistant/Agent — a Virtuoso-specific feature for interacting with LLMs |
get_schemas
user (string, optional): Database username. Defaults to "demo".password (string, optional): D