- Home
- MCP servers
- OpenLink MCP Server for ODBC via PyODBC
OpenLink MCP Server for ODBC via PyODBC
- python
5
GitHub Stars
python
Language
6 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"openlinksoftware-mcp-pyodbc-server": {
"command": "uv",
"args": [
"--directory",
"/path/to/mcp-pyodbc-server",
"run",
"mcp-pyodbc-server"
],
"env": {
"API_KEY": "xxx",
"ODBC_DSN": "VOS",
"ODBC_USER": "dba",
"ODBC_PASSWORD": "dba"
}
}
}
}You can run an MCP server that exposes ODBC access through PyODBC, enabling you to query and describe database schemas, tables, and stored procedures from your MCP client. This server is designed to work with Virtuoso and other ODBC-backed databases, providing JSONL, Markdown, and other formats for query results.
How to use
You connect to the ODBC MCP server from your MCP client by configuring the client to talk to a locally running server or a remote MCP endpoint. Once connected, you can fetch available schemas, list tables within schemas, describe table structures, filter tables by name, and run standard SQL or SPASQL-like queries when supported. Use the client’s commands to invoke the endpoints exposed by the server, and choose the desired result format such as JSONL or Markdown for easy downstream consumption.
How to install
pip install uv
brew install uv
odbcinst -j
odbcinst -q -s
# Configure your ODBC DSN in ~/.odbc.ini for Virtuoso or your target DB
[VOS]
Description = OpenLink Virtuoso
Driver = /path/to/virtodbcu_r.so
Database = Demo
Address = localhost:1111
WideAsUTF16 = Yes
# Then clone the MCP server repository and prepare to run
git clone https://github.com/OpenLinkSoftware/mcp-pyodbc-server.git
cd mcp-pyodbc-server
# Create or edit environment settings for the DSN and credentials
ODBC_DSN=VOS ODBC_USER=dba ODBC_PASSWORD=dba API_KEY=xxx
Optional: start an inspector to troubleshoot MCP interactions (if needed)
npm install -g @modelcontextprotocol/inspector
npx @modelcontextprotocol/inspector uv --directory /path/to/mcp-pyodbc-server run mcp-pyodbc-server
Configuration
{
"mcpServers": {
"pyodbc_mcp": {
"command": "uv",
"args": ["--directory", "/path/to/mcp-pyodbc-server", "run", "mcp-pyodbc-server"],
"env": {
"ODBC_DSN": "dsn_name",
"ODBC_USER": "username",
"ODBC_PASSWORD": "password",
"API_KEY": "sk-xxx"
}
}
}
}
Additional configuration notes
The server provides a set of tools to interact with the connected database. You can fetch schemas, list and describe tables, filter table names by a substring, and execute queries in multiple formats. If you need Virtuoso-specific features, you can also run SPASQL queries or use the Virtuoso AI assistant functionality where supported.
Troubleshooting
# Install MCP Inspector for quick troubleshooting
npm install -g @modelcontextprotocol/inspector
npx @modelcontextprotocol/inspector uv --directory /path/to/mcp-pyodbc-server run mcp-pyodbc-server
# Visit the troubleshooting URL provided by the inspector to diagnose issues
Available tools
podbc_get_schemas
Retrieve and return a list of all schema names from the connected database.
podbc_get_tables
Retrieve and return information about tables in a specified schema or the default schema.
podbc_filter_table_names
Filter and return tables whose names contain a given substring.
podbc_describe_table
Provide a detailed description of a table's columns, including data types and constraints.
podbc_query_database
Execute a SQL query and return the results in JSON format.
podbc_query_database_md
Execute a SQL query and return the results formatted as a Markdown table.
podbc_query_database_jsonl
Execute a SQL query and return the results in JSON Lines format.
podbc_spasql_query
Execute a SPASQL query (Virtuoso-specific) and return results.
podbc_virtuoso_support_ai
Interact with Virtuoso AI assistant for support queries using a prompt.