MCP Pyodbc Server MCP Server

A lightweight MCP (Model Context Protocol) server for ODBC built with **FastAPI** and **pyodbc**. This server is compatible with Virtuoso DBMS and

Local serverstdio

What is the MCP Pyodbc Server MCP Server?

A lightweight MCP (Model Context Protocol) server for ODBC built with FastAPI and pyodbc. This server is compatible with Virtuoso DBMS and any other DBMS

What it actually does

  • Get Schemas — Fetch and list all schema names from the connected database
  • Get Tables — Retrieve table information for specific schemas or all schemas
  • Describe Table — Generate a detailed description of table structures, including:
  • Column names and data types
  • Nullable attributes
  • Primary and foreign keys

Configuration

  1. Install uv: Or use Homebrew: 2. unixODBC Runtime Environment Checks: 3. Check installation configuration (i.e., location of key INI files) by running: odbcinst -j 4. List available data source names by running: odbcinst -q -s 5. ODBC DSN Setup: Configure your ODBC Data Source Name (typically in ~/.odbc.ini) for the target database. Example for Virtuoso DBMS: ---

More MCP options

Compare MCP servers by category, or browse hosted MCP servers if you prefer an endpoint over a local process.

Maintainer setup documentation.

Recorded tools

Check the linked publisher documentation and your connected client's tool list. Names and availability can vary with the server version and account permissions.

ToolWhat it does
userstring, optional): Database username. Defaults to "demo".
passwordstring, optional): Database password. Defaults to "demo".
dsnstring, optional): ODBC data source name. Defaults to "Local Virtuoso".
schemastring, required): The database schema name containing the table.
tablestring, required): The name of the table to describe.
querystring, required): The SPASQL query string.
max_rowsnumber, optional): Maximum number of rows to return. Defaults to 20.
timeoutnumber, optional): Query timeout in milliseconds. Defaults to 30000.
promptstring, required): The prompt text for the AI function.
api_keystring, optional): API key for the AI service. Defaults to "none".
podbc_get_schemasList database schemas accessible to connected database management system (DBMS).
podbc_get_tablesList tables associated with a selected database schema.
podbc_describe_tableProvide the description of a table associated with a designated database schema. This includes information about column names, data types, null handling, autoin
podbc_filter_table_namesList tables, based on a substring pattern from the q input field, associated with a selected database schema.
podbc_query_databaseExecute a SQL query and return results in JSONL format.
podbc_execute_queryExecute a SQL query and return results in JSONL format.
podbc_execute_query_mdExecute a SQL query and return results in Markdown table format.
podbc_spasql_queryExecute a SPASQL query and return results.
podbc_virtuoso_support_aiInteract with the Virtuoso Support Assistant/Agent -- a Virtuoso-specific feature for interacting with LLMs

How to install the MCP Pyodbc Server MCP Server

{
  "mcpServers": {
    "my_database": {
      "command": "uv",
      "args": [
        "--directory",
        "/path/to/mcp-pyodbc-server",
        "run",
        "mcp-pyodbc-server"
      ],
      "env": {
        "ODBC_DSN": "dsn_name",
        "ODBC_USER": "username",
        "ODBC_PASSWORD": "YOUR_ODBC_PASSWORD",
        "API_KEY": "YOUR_API_KEY"
      }
    }
  }
}

From the project documentation. Replace placeholders and example paths before connecting.

Configuration

  1. Install uv: Or use Homebrew: 2. unixODBC Runtime Environment Checks: 3. Check installation configuration (i.e., location of key INI files) by running: odbcinst -j 4. List available data source names by running: odbcinst -q -s 5. ODBC DSN Setup: Configure your ODBC Data Source Name (typically in ~/.odbc.ini) for the target database. Example for Virtuoso DBMS: ---
VariableDescriptionRequired
ODBC_DSNDeclared in the maintainer’s client configuration.Check documentation
ODBC_USERDeclared in the maintainer’s client configuration.Check documentation
ODBC_PASSWORDDeclared in the maintainer’s client configuration.Check documentation
API_KEYDeclared in the maintainer’s client configuration.Optional

Example prompts to try

  • “Use MCP Pyodbc Server to Overview.”

Frequently asked questions

A lightweight MCP (Model Context Protocol) server for ODBC built with **FastAPI** and **pyodbc**. This server is compatible with Virtuoso DBMS and any other DBMS Confirm the tools offered by your installed version in the connected client. Tool availability and permissions depend on the server and account configuration.