MCP Sqlalchemy Server MCP Server

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

Local serverstdio

What is the MCP Sqlalchemy Server MCP server?

A lightweight MCP (Model Context Protocol) server for ODBC built with FastAPI, pyodbc, and SQLAlchemy. This server is compatible with Virtuoso DBMS and other DBMS backends that implement a SQLAlchemy provider. Exposed over MCP by the mcp sqlalchemy server mcp server, that capability becomes something an assistant can invoke while it works, not something you go and do afterwards.

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

Its toolset

Everything the assistant can do here goes through one of these:

  • Overview — The Overview tool exposed by this server

Configuration

You will need 4 environment variables: ODBC_DSN, ODBC_USER, ODBC_PASSWORD, API_KEY. The server will not start without them, which is usually why the tools fail to appear on a first run. Keep credentials in your client's env block or a secrets manager rather than in a file you might commit.

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

Adding it to your client

The server ships on npm as @modelcontextprotocol/inspector, so your MCP client can launch it on demand — there is no separate build step. Add the server block to your client's configuration, restart it, and the tools register themselves.

When to reach for it

This sits in the database access group, where several servers overlap in what they claim to do but differ sharply once you actually set them up. MCP Sqlalchemy Server's toolset — Overview — is a fair guide to whether it matches your workflow. It is maintained by OpenLinkSoftware; worth a glance at recent repository activity before you build anything load-bearing on it.

We check each listing at SyncDev against the project's documentation before it goes live — if something here drifts out of date, it is a bug worth reporting.

Caveats

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • Missing credentials fail quietly in some clients — if no tools show up, check the environment block first.
  • MCP clients confirm each tool call by default. Leave that on until you have watched what the mcp sqlalchemy server mcp server does with a few real requests.

Available tools

ToolWhat it does
OverviewThe Overview tool exposed by this server.

How to install the MCP Sqlalchemy Server MCP server

{
  "mcpServers": {
    "sqlalchemy-server": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/inspector"],
      "env": {
        "ODBC_DSN": "your-value",
        "ODBC_USER": "your-value",
        "ODBC_PASSWORD": "your-value",
        "API_KEY": "your-value"
      }
    }
  }
}

Add to claude_desktop_config.json, then restart Claude Desktop.

Configuration

  1. Install uv: Or use Homebrew: 2. unixODBC Runtime Environment Checks: 1. Check installation configuration (i.e., location of key INI files) by running: odbcinst -j 2. List available data source names by running: odbcinst -q -s 3. ODBC DSN Setup: Configure your ODBC Data Source Name (~/.odbc.ini) for the target database. Example for Virtuoso DBMS: 3. SQLAlchemy URL Binding
VariableDescriptionRequired
ODBC_DSNEndpoint or connection string the server talks to.Yes
ODBC_USERConfiguration value read at startup.Optional
ODBC_PASSWORDConfiguration value read at startup.Optional
API_KEYCredential the server authenticates with.Yes

Example prompts to try

  • Use MCP Sqlalchemy Server to Overview.

Frequently asked questions

It connects MCP Sqlalchemy Server to MCP-compatible AI assistants such as Claude and Cursor, exposing 1 tool (Overview) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with MCP Sqlalchemy Server directly.