MCP directory
SA

SQL Agent

by github.com/Nachodusan · v0.2.0 · updated Dec 5, 2026

Natural-language SQL that measures whether its answers are right, with a trace of every step

PyPI

Run it locally

Install the package and point your AI client at it.

PyPI

uvx sql-agent-mcp==0.2.0

Environment variables

  • SQL_AGENT_DSNrequiredsecret

    Database connection string: sqlite:///./shop.db or postgresql://user:password@host:5432/db. Use a role that only has SELECT.

  • OPENAI_API_KEYsecret

    API key for the model behind the ask and evaluate tools. list_tables, describe_table and run_sql need no key.

  • OPENAI_BASE_URL

    Any OpenAI-compatible endpoint, for example https://api.deepinfra.com/v1/openai. Defaults to OpenAI itself.

  • SQL_AGENT_MODEL

    Model id to use, for example deepseek-ai/DeepSeek-V3.

More MCP servers