MCP Server Sqlalchemy logo

MCP Server Sqlalchemy

by openlink

Connects AI clients to ODBC databases through SQLAlchemy for schema discovery, SQL queries, and Virtuoso-specific SPARQL operations.

Install MCP Server Sqlalchemy

Run the project’s own setup commands, in order.

Setup steps from the project

openlink/mcp-server-sqlalchemy installs with its own commands rather than a config we can generate, so these are copied as-is. Run them in order in a terminal. Source: github.com

  1. 1. Install
    pip install uv
    
  2. 2. Install
    git clone https://github.com/OpenLinkSoftware/mcp-sqlalchemy-server.git
    
  3. 3. Run
    cd mcp-sqlalchemy-server
    

Overview

The openlink/mcp-server-sqlalchemy MCP server connects AI clients to ODBC-accessible databases through SQLAlchemy, pyodbc, and Python. It exposes tools for browsing schemas and tables, inspecting columns and keys, running SQL, and formatting query results as JSONL or Markdown. Virtuoso users can also run SPASQL and SPARQL queries and access the Virtuoso Support Assistant. Reach for it when an agent needs database metadata or query access through an existing ODBC data source and SQLAlchemy-compatible backend.

Use cases

  • Inspect schemas and tables before generating SQL
  • Describe table columns and key relationships
  • Run SQL queries against an ODBC-connected database
  • Format query results as JSONL or Markdown
  • Query Virtuoso data with SPARQL or SPASQL

Key features

  • ODBC connectivity through SQLAlchemy and pyodbc
  • Schema and table metadata discovery
  • Table-name substring filtering
  • SQL results in JSONL or Markdown
  • Virtuoso SPARQL and SPASQL queries
  • Virtuoso Support Assistant access

Tools10

What MCP Server Sqlalchemy lets your agent do. Expand a tool for its parameters.

Self-reported~252 tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

9/9 checks healthy over the last 91d

Supply-chain signal

2 high-severity advisories on record for this package. Most advisories affect transitive dependencies and may not be exploitable in this server's actual usage — this is a directional signal, not a security audit.

Critical 1High 1Medium 0Low 0

Scanned 8/20/2026 via OSV.dev

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars25Stargazers on the source repository.
Last commit1y agoMost recent push to the default branch.
Tools exposed10Callable tools this server registers over MCP.
Directory activity4 viewsConfig copies, upvotes, and views on AllMCPs.

How MCP Server Sqlalchemy works

What openlink/mcp-server-sqlalchemy does

The openlink/mcp-server-sqlalchemy MCP server gives an MCP client access to databases reachable through ODBC and a SQLAlchemy provider. The project is built with FastAPI, pyodbc, and SQLAlchemy, and is described as compatible with Virtuoso DBMS as well as other supported DBMS backends.

Its metadata tools let an agent list available schemas, inspect tables within a schema, search table names by substring, and describe a table. Table descriptions can include column names, data types, nullability, autoincrement information, primary keys, and foreign keys.

Query tools accept SQL and return database results in JSONL or Markdown table form. The server also exposes Virtuoso-oriented operations for SPASQL, SPARQL, stored-procedure-backed queries, and interaction with the Virtuoso Support Assistant.

How it works

The openlink/mcp-server-sqlalchemy MCP server uses an ODBC data source configured on the host. The repository documentation references unixODBC checks, including odbcinst -j for locating configuration files and odbcinst -q -s for listing configured data source names. A DSN can be defined in ~/.odbc.ini; the example uses a Virtuoso data source with a driver path, database name, network address, and character-width setting.

The connection is represented with a SQLAlchemy URL. The documented Virtuoso form is virtuoso+pyodbc://user:password@ODBC_DSN. Examples are also provided for PostgreSQL, MySQL, and SQLite URLs, indicating that the server is intended for DBMS backends with suitable SQLAlchemy and driver support.

Setup and configuration

Install uv with pip or Homebrew, then clone the repository and run it from the project directory. The documented Claude Desktop configuration invokes uv with the repository directory, the run subcommand, and the mcp-sqlalchemy-server entry point.

Configuration uses these environment variables:

  • ODBC_DSN identifies the configured ODBC data source.
  • ODBC_USER supplies the database username.
  • ODBC_PASSWORD supplies the database password.
  • API_KEY is shown in the example environment configuration.

The sample Claude Desktop configuration also sets these values under the server's env object. Replace the sample DSN, credentials, API key, and local repository path with values for the target environment.

Tools and capabilities

The documented MCP tool set includes:

  • podbc_get_schemas for accessible schema names.
  • podbc_get_tables for table information in a selected or default schema.
  • podbc_filter_table_names for substring-based table-name searches.
  • podbc_describe_table for structural metadata about a specified table.
  • podbc_query_database and podbc_execute_query for SQL execution with JSONL results.
  • podbc_execute_query_md for SQL results formatted as a Markdown table.
  • podbc_spasql_query for Virtuoso SPASQL queries.
  • podbc_sparql_query for Virtuoso SPARQL queries.
  • podbc_virtuoso_support_ai for the Virtuoso Support Assistant or Agent.

Limitations and notes

Database access depends on a working ODBC driver, unixODBC configuration, a valid DSN, and a compatible SQLAlchemy provider. The Virtuoso-specific tools are not general-purpose database features. The documentation contains both a high-level tool list and additional legacy-style names in detailed examples, so verify the installed server's actual registered tool names when integrating it.

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about MCP Server Sqlalchemy

Install uv, clone the repository, change into its directory, and run it with uv using the documented mcp-sqlalchemy-server entry point.

Install and check unixODBC, configure a DSN such as one in ~/.odbc.ini, and set ODBC_DSN, ODBC_USER, and ODBC_PASSWORD for the server.

Yes. The documentation provides a Claude Desktop configuration that launches the server with uv and passes its environment variables.

Yes. It exposes podbc_sparql_query and podbc_spasql_query for Virtuoso-specific query operations.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewMCP Server Sqlalchemy AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/openlink-mcp-server-sqlalchemy?style=directory)](https://allmcps.com/mcp/openlink-mcp-server-sqlalchemy)
HTML Embed
<a href="https://allmcps.com/mcp/openlink-mcp-server-sqlalchemy"><img src="https://allmcps.com/api/badge/openlink-mcp-server-sqlalchemy?style=directory" alt="MCP Server Sqlalchemy on AllMCPs" /></a>