# openlink/mcp-server-sqlalchemy [Health: Active]

**Category:** 🗄️ Databases  
**Repository:** https://github.com/OpenLinkSoftware/mcp-sqlalchemy-server  
**GitHub Stars:** 24  
**npm Downloads (last month):** 906795  
**Views:** 3  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/openlink-mcp-server-sqlalchemy

## Description
An MCP server for generic Database Management System (DBMS) Connectivity via SQLAlchemy using Python ODBC (pyodbc)

## Tools
Capabilities this server exposes over MCP:

- **podbc_get_schemas** — List database schemas accessible to connected database management system (DBMS).
- **podbc_get_tables** — List tables associated with a selected database schema.
- **podbc_describe_table** — Provide the description of a table associated with a designated database schema. This includes information about column names, data types, nulls handling, autoincrement, primary key, and foreign keys
- **podbc_filter_table_names** — List tables, based on a substring pattern from the `q` input field, associated with a selected database schema.
- **podbc_query_database** — Execute a SQL query and return results in JSONL format.
- **podbc_execute_query** — Execute a SQL query and return results in JSONL format.
- **podbc_execute_query_md** — Execute a SQL query and return results in Markdown table format.
- **podbc_spasql_query** — Execute a SPASQL query and return results.
- **podbc_sparql_query** — Execute a SPARQL query and return results.
- **podbc_virtuoso_support_ai** — Interact with the Virtuoso Support Assistant/Agent -- a Virtuoso-specific feature for interacting with LLMs

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

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

**Requires environment variables:** `ODBC_DSN`, `ODBC_USER`, `ODBC_PASSWORD`, `API_KEY` — the values above are empty placeholders; fill in real credentials before running (see the repository for what each one is for).

## Documentation

## 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.

## Getting started with this openlink/mcp-server-sqlalchemy MCP server
Always refer to the official documentation for the most accurate and up-to-date information.

_Full upstream README: https://allmcps.com/mcp/openlink-mcp-server-sqlalchemy/readme_

