sql-mcp
Provides a query tool to run parameterized SQL statements against a PostgreSQL database, returning command, rowCount, and rows as JSON.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@sql-mcpSELECT * FROM users"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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_URLRun 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.
This server cannot be installed
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/edintwi/sql-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server