The ODBC MCP Server provides seamless integration between large language models and databases, allowing tools like Claude Desktop to query databases via ODBC connections while maintaining security through 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
uv pip install -e .
The server can be configured through a config file, environment variables, or Claude Desktop configuration.
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:
[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 100To 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:
If you encounter connection problems:
For Sage 100/ProvideX:
Driver not capable
errors, check that autocommit is being setIf tables aren't showing up:
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"cursor-rules-mcp": {
"command": "npx",
"args": [
"-y",
"cursor-rules-mcp"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.