Skip to main content

Add your description here

Project description

PolarDB PostgreSQL MCP Server

Environment Variables

  • POLARDB_POSTGRESQL_HOST: Database host address
  • POLARDB_POSTGRESQL_PORT: Database port
  • POLARDB_POSTGRESQL_USER: Database user
  • POLARDB_POSTGRESQL_PASSWORD: Database password
  • POLARDB_POSTGRESQL_DBNAME: Database name
  • POLARDB_POSTGRESQL_ENABLE_UPDATE: Enable update operation(default:false)
  • POLARDB_POSTGRESQL_ENABLE_DELETE: Enable delete operation(default:false)
  • POLARDB_POSTGRESQL_ENABLE_INSERT: Enable insert operation(default:false)
  • POLARDB_POSTGRESQL_ENABLE_DDL: Enable ddl operation(default:false)
  • SSE_BIND_HOST: The host address to bind for SSE mode
  • SSE_BIND_PORT: The port to bind for SSE mode
  • RUN_MODE: The run mode(sse|stdio),(default:sse)

Components

Tools

  • execute_sql: execute sql

Resources

  • polardb-postgresql://schemas: List all schemas for PolarDB PostgreSQL in the current database

Resource Templates

  • polardb-postgresql://{schema}/tables: List all tables for a schema
  • polardb-postgresql://{schema}/{table}/field: get the name,type and comment of the field in the table
  • polardb-postgresql://{schema}/{table}/data: get data from the table,default limit 50 rows

Usage

Run with packages from PyPI

{
  "mcpServers": {
    "polardb-postgresql-mcp-server": {
      "command": "uvx",
      "args": [
        "--from",
        "polardb-postgresql-mcp-server",
        "run_polardb_postgresql_mcp_server"
      ],
      "env": {
        "POLARDB_POSTGRESQL_HOST": "127.0.0.1",
        "POLARDB_POSTGRESQL_PORT": "15001",
        "POLARDB_POSTGRESQL_USER": "xxxx",
        "POLARDB_POSTGRESQL_PASSWORD": "xxx",
        "POLARDB_POSTGRESQL_DBNAME": "xxx",
        "RUN_MODE": "stdio",
        "POLARDB_POSTGRESQL_ENABLE_UPDATE": "false",
        "POLARDB_POSTGRESQL_ENABLE_DELETE": "false",
        "POLARDB_POSTGRESQL_ENABLE_INSERT": "false",
        "POLARDB_POSTGRESQL_ENABLE_DDL": "false"
      }
    }
  }
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

polardb_postgresql_mcp_server-1.0.0.tar.gz (6.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file polardb_postgresql_mcp_server-1.0.0.tar.gz.

File metadata

File hashes

Hashes for polardb_postgresql_mcp_server-1.0.0.tar.gz
Algorithm Hash digest
SHA256 a1fb93cf228e0728fed81a8bd6de3857f548e6d51d8a50b3013dd754ae3de4eb
MD5 79bec6291c73940b821df056c2fc1169
BLAKE2b-256 41ec99b4f1e26cc66a49670df6e8c2310db78b6c7261e0a32381d24e0376a590

See more details on using hashes here.

File details

Details for the file polardb_postgresql_mcp_server-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for polardb_postgresql_mcp_server-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3dcd1422e1e37dcfe9945600e4a1f9047ccf4988fa12c9493f5da168d3f0aa9f
MD5 8192bd7a6902bb99edb0745e7a91472a
BLAKE2b-256 e4b2ef3f4de17c34c136aab99abcd76b300d1ef90d8007d73d575b79444fff0d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page