sql-mcp
Provides a query tool to run parameterized SQL statements against a PostgreSQL database, returning command, rowCount, and rows as JSON.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
sql-mcp
Local MCP server exposed over HTTP that runs inside Docker and provides a single query tool against a PostgreSQL database supplied via DATABASE_URL.
Configure
cp .env.example .env
# edit .env and set DATABASE_URLRelated MCP server: Postgres MCP Server
Run with Docker
docker compose up --buildThe MCP endpoint is then available at http://localhost:3000/mcp.
Run locally (without Docker)
npm install
npm run build
npm start
# or, for hot reload:
npm run devRegister with an MCP client
Point your MCP-compatible client at the streamable HTTP endpoint:
http://localhost:3000/mcpThe transport is streamable-http. Initialize the session with a standard MCP initialize request; subsequent requests must include the mcp-session-id header returned by the server.
Tool
query({ sql: string, params?: unknown[] })— runs a parameterized SQL statement and returns{ command, rowCount, rows }as JSON. Use$1,$2, ... insqland pass values inparams.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Managed Postgres MCP: projects, SQL, docs search, and storage buckets via OAuth.
Hosted MCP server for PostgreSQL diagnostics: slow queries, missing indexes, connection pressure.
Paid remote MCP for governed database query review, SQL simulation, approvals, and audits.
Read authorized Loam tables and supported external databases through a bounded MCP connection.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables secure querying of PostgreSQL databases through MCP-compatible clients. Supports read-only SQL execution, table exploration, and connection management with built-in security validation.349 npm9MIT
- FlicenseNot gradedqualityCmaintenanceEnables querying and modifying PostgreSQL databases through MCP tools with read/write operations, schema inspection, and write-safety constraints that limit modifications to the mcp schema.1-
- AlicenseNot gradedqualityDmaintenanceEnables interaction with PostgreSQL databases through MCP, supporting queries, DDL, DML, and schema inspection.6MIT
- FlicenseNot gradedqualityDmaintenanceEnables querying PostgreSQL databases via MCP, with multi-database routing, credential isolation, and truncated results plus full CSV export.-