edintwi

sql-mcp

Community edintwi
Updated

Local MCP server to PostgresSQL

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_URL

Run with Docker

docker compose up --build

The 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 dev

Register with an MCP client

Point your MCP-compatible client at the streamable HTTP endpoint:

http://localhost:3000/mcp

The 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, ... in sql and pass values in params.

MCP Server ยท Populars

MCP Server ยท New

    Blazemeter

    BlazeMeter MCP Server

    Official BlazeMeter MCP Server for AI-driven performance testing

    Community Blazemeter
    nirholas

    Universal Contract AI Interface

    Universal Contract AI Interface (UCAI) ๐Ÿ”— ABI to MCP | The open standard for connecting AI agents to blockchain. MCP server generator for smart contracts. Claude + Uniswap, Aave, ERC20, NFTs, DeFi. Python CLI, Web3 integration, transaction simulation. Polygon, Arbitrum, Base, Ethereum EVM chains. Claude, GPT, LLM tooling, Solidity, OpenAI.

    Community nirholas
    Dictation354

    Paper Fetch Skill

    Fetch papers as agent-ready markdown โ€” DOI/URL/title in, structured full text out. CLI ยท MCP ยท Skill.

    Community Dictation354
    Kaelio

    ktx

    ktx is the context layer for analytics agents

    Community Kaelio
    Goldentrii

    AgentRecall

    Persistent, correction-driven memory for AI agents. Cross-session, cross-platform (Claude Code, Codex, Gemini โ€” any MCP client). Learns from mistakes, compresses context to save tokens, consolidates knowledge overnight. npm: agent-recall-mcp

    Community Goldentrii