An MCP (Model Context Protocol) server that enables LLM tools like Claude Desktop to query databases via ODBC connections. This server allows Claude and other MCP clients to access, analyze, and generate insights from database data while maintaining security and read-only safeguards.
git clone https://github.com/tylerstoltz/mcp-odbc.git
cd mcp-odbc
uv venv
.venv\Scripts\activate # On Mac / Linux: source .venv/bin/activate (untested)
uv pip install -e .
The server can be configured through:
Create a configuration file (.ini
) with your database connection details:
[SERVER]
default_connection = my_database
max_rows = 1000
timeout = 30
[my_database]
dsn = MyDatabaseDSN
username = your_username
password = your_password
readonly = true
For SQLite databases with ODBC:
[SERVER]
default_connection = sqlite_db
max_rows = 1000
timeout = 30
[sqlite_db]
dsn = SQLite_DSN_Name
readonly = true
ProvideX requires special configuration for compatibility. Use this minimal configuration for best results:
[SERVER]
default_connection = sage100
max_rows = 1000
timeout = 60
[sage100]
dsn = YOUR_PROVIDEX_DSN
username = your_username
password = your_password
company = YOUR_COMPANY_CODE
readonly = true
Important notes for ProvideX:
readonly = true
for safetycompany
parameter is required for Sage 100 connectionsTo configure the server in Claude Desktop:
Open or create claude_desktop_config.json
:
%APPDATA%\Claude\claude_desktop_config.json
~/Library/Application Support/Claude/claude_desktop_config.json
Add MCP server configuration:
{
"mcpServers": {
"odbc": {
"command": "uv",
"args": [
"--directory",
"C:\\path\\to\\mcp-odbc",
"run",
"odbc-mcp-server",
"--config",
"C:\\path\\to\\mcp-odbc\\config\\your_config.ini"
]
}
}
}
# Start with default configuration
odbc-mcp-server
# Start with a specific config file
odbc-mcp-server --config path/to/config.ini
The ODBC MCP server provides these tools:
Try these prompts in Claude Desktop after connecting the server:
If you encounter connection problems:
For Sage 100/ProvideX:
Driver not capable
errors, check that autocommit is being set at connection timeIf tables aren't showing up:
MIT License - Copyright (c) 2024
{
"mcpServers": {
"odbc": {
"env": {},
"args": [
"--directory",
"C:\\path\\to\\mcp-odbc",
"run",
"odbc-mcp-server",
"--config",
"C:\\path\\to\\mcp-odbc\\config\\your_config.ini"
],
"command": "uv"
}
}
}
Seamless access to top MCP servers powering the future of AI integration.