Skip to main content
Glama
rajivdatta

mcp-sql-multi

by rajivdatta

mcp-sql-multi

One MCP server that fronts several SQL Server / Azure SQL / Synapse databases. Each tool takes a database argument naming a target declared in connections.json; call list_databases first to see them.

Tools

Tool

Purpose

list_databases

List configured targets (name, server, database, read-only).

list_tables

List base tables in a target (optional schema filter).

describe_table

Columns, types, lengths, nullability for a table.

run_query

Run a query, return up to 1000 rows as JSON (writes blocked on read-only targets).

Related MCP server: mcp-sqlserver

Configure targets

Copy the example and edit it with your own databases:

copy connections.example.json connections.json

connections.json is git-ignored (it holds your server names/logins). Passwords are not stored there — each SQL-auth target names an env var via password_env, supplied through .env (git-ignored) or the MCP host config.

Supported auth values:

  • sql - SQL login (user + password_env)

  • aad-integrated - Azure AD using your signed-in Windows/Entra identity (no secret)

  • aad-interactive - Azure AD with a browser sign-in popup

  • aad-service-principal - Azure AD app (client_id + client_secret_env)

Mark trusted-network or service targets "readonly": true to block write/DDL.

Run / test standalone

.venv\Scripts\activate
python -c "import db; print(db.list_targets())"
python -c "import server; print(server.list_tables('dev','dbo'))"

Register with an MCP host

See examples/mcp.json. Point command at .venv\Scripts\python.exe and args at server.py.

Safety

  • Read-only targets refuse write/DDL statements (regex guard).

  • Results capped at 1000 rows; 60s query timeout.

  • aad-interactive targets trigger a browser sign-in on first query.

License

MIT (c) 2026 Rajiv Datta

A
license - permissive license
-
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/rajivdatta/mcp-sql-multi'

If you have feedback or need assistance with the MCP directory API, please join our Discord server