Postgres MCP
PostgreSQL MCP server with 15 tools (SQL, EXPLAIN, health, indexes) plus a Gradio UI with LLM chat.
Connector by sparta2025 · GitHub account verified by the MCP Registry
Install
Works with Claude Code, Codex, VS Code, Cursor, Windsurf, Claude Desktop. Read the repository before you give any tool access to your data.
npx agentmarket install connector/sparta2025-postgres-mcp
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this server can do and what it asks for, from its tool list and install config. Checked Oct 25, 2026.
- Tools
- 13 read · 1 write · 0 delete · 1 not yet classified
- Secrets
- 1 (API keys, tokens or passwords)
- Install scripts
- Not scanned yet
- Runs as
- Python package
Tools by what they do 15
Read from the source code; the running server may list different tools.
Read 13 · Look things up without changing anything.
analyze_db_healthanalyze_index_performanceexplain_queryformat_sql_queryget_active_queriesget_database_infoget_database_locksget_object_detailsget_table_sizesget_top_querieslist_objectslist_schemas
Show 1 more tools
list_tools
Write 1 · Create, change, send or run things.
manage_encryption_key
Not yet classified 1 · We could not tell from the name and description.
execute_sql
Secrets and settings it asks for
Secrets: values you paste in that let it act as you.
DATABASE_URL
Tools (15)
Read from the source code; the running server may differ. Descriptions are the server’s own words; hidden characters are shown as [U+…].
analyze_db_healthDatabase health overview. Args: health_type: Принимается для совместимости со старой схемой инструмента, но пока не используется — отчёт всегда включает все проверки (default: "all"). database_url: Database URL (optional, uses DATABASE_URL from .env if omitted).
analyze_index_performanceAnalyze index usage and find unused/duplicate indexes. Args: schema_name: Schema to analyze (default: "public"). database_url: Database URL (optional, uses DATABASE_URL from .env if omitted).
execute_sqlExecute a SQL query. Args: sql: SQL statement to execute. database_url: Database URL (optional, uses DATABASE_URL from .env if omitted).
explain_queryGet query execution plan. Args: sql: SQL statement to explain. analyze: If true, actually executes the query for real timing data (default: value of EXPLAIN_ANALYZE in .env, normally false). WARNING: true really runs the query, including any INSERT/UPDATE/DELETE it contains — use with care. database_url: Database URL (optional, uses DATABASE_URL from .env if omitted).
format_sql_queryFormat/beautify a SQL query for readability. Args: sql: Raw SQL text to format.
get_active_queriesList currently running queries and their duration. Args: database_url: Database URL (optional, uses DATABASE_URL from .env if omitted).
get_database_infoGet general database information: version, size, extensions, server settings. Args: database_url: Database URL (optional, uses DATABASE_URL from .env if omitted).
get_database_locksShow current database locks and blocking queries. Args: database_url: Database URL (optional, uses DATABASE_URL from .env if omitted).
get_object_detailsGet columns of a table or view. Args: schema_name: Schema containing the object. object_name: Table or view name. database_url: Database URL (optional, uses DATABASE_URL from .env if omitted).
get_table_sizesShow table sizes including indexes and total. Args: schema_name: Schema to analyze (default: "public"). sort_by: Sort order — "total", "table", or "indexes" (default: "total"). database_url: Database URL (optional, uses DATABASE_URL from .env if omitted).
get_top_queriesTop queries by resource usage (requires pg_stat_statements extension). Args: limit: How many queries to return (optional, defaults to TOP_QUERIES_DEFAULT_LIMIT from .env). sort_by: Принимается для совместимости со старой схемой инструмента, но пока не используется — сортировка всегда по total_exec_time (default: "resources"). database_url: Database URL (optional, uses DATABASE_URL from .env if omitted).
list_objectsList tables/views/sequences in a schema. Args: schema_name: Name of the schema to list objects from. object_type: One of "table", "view", "sequence" (default: "table"). database_url: Database URL (optional, uses DATABASE_URL from .env if omitted).
list_schemasList all schemas in the database. Args: database_url: Database URL (optional, uses DATABASE_URL from .env if omitted).
list_toolsList all available MCP tools of this server with their descriptions. Returns a JSON array with one entry per tool: name, description and inputSchema (parameters). Does NOT require a database connection — useful for discovering capabilities at runtime. Returns: JSON string: [{"name": ..., "description": ..., "parameters": ...}, ...]
manage_encryption_keyManage the Data Encryption Certificate (Fernet key) for stored secrets. Args: action: One of: - "status" (default) — list all certs with metadata, no changes. - "generate" — create a new cert, set as active. ttl_days applies. - "rotate" — create a new cert (version+1), set as active, previous one becomes ROTATING (decrypt still works in grace period). - "rekey" — re-encrypt connections.json and llm_connections.json with the new active cert (run after rotation). - "revoke" …
Signals
- Stars
- 0
- Forks
- 0
- Open issues
- 0
- Weekly downloads
- 72
- Last commit
- Aug 21, 2026 (2 months ago)
- Last release
- Aug 21, 2026 (2 months ago)
- Last package publish
- Aug 21, 2026 (2 months ago)
From GitHub (fetched Oct 24, 2026) and the package registry.
Details
- Registry name
io.github.sparta2025/postgres-mcp- Version
- 0.4.2
- Auth
- API key
- Packages
- pypi postgres-mcp-pro
- License
- MIT
- Repository
- github.com/sparta2025/postgres-mcp
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
Cite this page
Postgres MCP. Agent Mart. https://agentmart.dev/connectors/sparta2025-postgres-mcp (last updated 2026-10-24)