MCP.so
Sign In

MCP Server ODBC via SQLAlchemy

@OpenLinkSoftware

About MCP Server ODBC via SQLAlchemy

A simple MCP ODBC server using FastAPI, ODBC and SQLAlchemy.

Config

Add this server to your MCP-compatible client using the configuration below.

{
  "mcpServers": {
    "my_database": {
      "command": "uv",
      "args": [
        "--directory",
        "/path/to/mcp-sqlalchemy-server",
        "run",
        "mcp-sqlalchemy-server"
      ],
      "env": {
        "DB_URL": "virtuoso+pyodbc://user:password@VOS"
      }
    }
  }
}

Tools

No tools detected

We auto-extract tools from the README. The maintainer can list them under a ## Tools heading to populate this section.

Overview

What is MCP Server ODBC via SQLAlchemy?

A lightweight MCP (Model Context Protocol) server for ODBC built with FastAPI, pyodbc, and SQLAlchemy. It connects to any database with a SQLAlchemy provider, with special support for Virtuoso DBMS. Designed for AI agents and applications that need structured database access via ODBC.

How to use MCP Server ODBC via SQLAlchemy?

Clone the repository, install dependencies with uv, configure an ODBC DSN in ~/.odbc.ini, set environment variables (ODBC_DSN, ODBC_USER, ODBC_PASSWORD, API_KEY), and run mcp-sqlalchemy-server. For Claude Desktop, add the server to claude_desktop_config.json as shown in the README.

Key features of MCP Server ODBC via SQLAlchemy

  • List schema names from the connected database
  • Retrieve table information by schema or default
  • Describe table structure including columns, keys, and nullability
  • Search tables by name substring
  • Execute stored procedures (Virtuoso-specific)
  • Run SQL queries returning JSONL or Markdown table results

Use cases of MCP Server ODBC via SQLAlchemy

  • AI agents querying relational databases via natural language
  • Automated database schema exploration for data cataloging
  • Reporting workflows that need Markdown-formatted query results
  • Integrating Virtuoso-specific features like SPARQL and SPASQL queries
  • Rapid prototyping of database-backed MCP tools

FAQ from MCP Server ODBC via SQLAlchemy

What databases are supported?

Any DBMS with a SQLAlchemy provider, including Virtuoso, PostgreSQL, MySQL, and SQLite. Virtuoso-specific features like SPARQL and SPASQL queries are also available.

What are the runtime requirements?

Python 3, uv package manager, unixODBC with a configured DSN, and an ODBC driver for your target database.

How do I configure authentication?

Set ODBC_USER, ODBC_PASSWORD, and API_KEY environment variables. The API key is used for server-side authentication.

Can I query using formats other than JSON?

Yes. The server provides tools for JSON, JSON Lines (JSONL), and Markdown table output.

Does this server support stored procedures?

For Virtuoso, you can execute stored procedures. For other databases, you can run arbitrary SQL queries.

Frequently asked questions

What databases are supported?

Any DBMS with a SQLAlchemy provider, including Virtuoso, PostgreSQL, MySQL, and SQLite. Virtuoso-specific features like SPARQL and SPASQL queries are also available.

What are the runtime requirements?

Python 3, `uv` package manager, `unixODBC` with a configured DSN, and an ODBC driver for your target database.

How do I configure authentication?

Set `ODBC_USER`, `ODBC_PASSWORD`, and `API_KEY` environment variables. The API key is used for server-side authentication.

Can I query using formats other than JSON?

Yes. The server provides tools for JSON, JSON Lines (JSONL), and Markdown table output.

Does this server support stored procedures?

For Virtuoso, you can execute stored procedures. For other databases, you can run arbitrary SQL queries.

Comments

Basic information

Category

Other

License

MIT

Transports

stdio

Author

OpenLinkSoftware

More Other MCP servers