Back to MCP Directory
ODBC
Model Context Protocol moderate risk

ODBC

The MCP ODBC server provides LLMs with access to ODBC-accessible data sources, enabling data retrieval and manipulation via SQL and SPARQL queries.

Connections & Capabilities

Connects To

GitHub

Capabilities

readwriteexec

Quickstart

Install

npm install @modelcontextprotocol/sdk

Config

{
    "mcpServers": {
        "ODBC": {
            "command": "/path/to/.nvm/versions/node/v21.1.0/bin/node",
            "args": [
                "/path/to/mcp-odbc-server/node_modules/.bin/tsx",
                "/path/to/mcp-odbc-server/src/main.ts"
            ],
            "env": {
                "ODBCINI": "/Library/ODBC/odbc.ini",
                "NODE_VERSION": "v21.1.0",
                "PATH": "~/.nvm/versions/node/v21.1.0/bin:${PATH}"
            },
            "disabled": false,
            "autoApprove": []
        }
    }
}

Exposed MCP Tools (10)

safe
get_schemas

Lists database schemas accessible to the connected DBMS.

Read-only operation with no side effects.

safe
get_tables

Lists tables associated with a selected database schema.

Read-only operation with no side effects.

safe
describe_table

Provides the description of a table associated with a designated database schema.

Read-only operation with no side effects.

safe
filter_table_names

Lists tables associated with a selected database schema, based on a substring pattern.

Read-only operation with no side effects.

high
query_database

Executes a SQL query and returns results in JSON Lines format.

Executes arbitrary SQL queries, potential for SQL injection.

high
execute_query

Executes a SQL query and returns results in JSON Lines format.

Executes arbitrary SQL queries, potential for SQL injection.

high
execute_query_md

Executes a SQL query and returns results in Markdown table format.

Executes arbitrary SQL queries, potential for SQL injection.

high
spasql_query

Executes a SPASQL query and returns results.

Executes SPASQL queries, potential for complex vulnerabilities.

high
sparql_query

Executes a SPARQL query and returns results.

Executes SPARQL queries, potential for complex vulnerabilities.

moderate
virtuoso_support_ai

Interacts with the Virtuoso Support Assistant/Agent using LLMs.

Interaction with LLMs can introduce data leakage or unexpected behavior.

Safety Assessment

The MCP ODBC server offers both safe read-only operations and potentially risky query execution. It is safe to use for listing schemas and tables, but running arbitrary SQL queries should be done with caution and proper input validation to prevent SQL injection attacks. Securely managing database credentials is crucial.

  • Uses environment variables for sensitive credentials.
  • Provides read-only tools like `get_schemas` and `get_tables`.
  • Access is controlled by database user permissions.
  • Includes tools for filtering and describing tables without modifying data.
  • Executes arbitrary SQL queries via `query_database` and related tools.
  • SPASQL and SPARQL execution can introduce complex vulnerabilities.
  • Direct access to database credentials if not properly secured.
  • Potential for SQL injection if input sanitization is not implemented correctly.
  • No built-in sandboxing or resource limits for queries.