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.1.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.1.0.tar.gz.

File metadata

File hashes

Hashes for polardb_postgresql_mcp_server-1.1.0.tar.gz
Algorithm Hash digest
SHA256 9514cee7529b975ea426a262fec1d75a1f7e7d13a4cfc23f73c1b94383a43276
MD5 10fda87e369ac3d4fec1da0bcb9409d0
BLAKE2b-256 d535461051764508434f11c9477cd5c7d350987c3b1df1fd77393ff7b1d473b0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for polardb_postgresql_mcp_server-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9085f3fc211d11321c7d4276f382646f7d0c0ce32e4cb4d8b00f8bb7d6a75b99
MD5 492ab03536d45bbc73bab2fac7d59d45
BLAKE2b-256 a9da367c179646d8646e8143c69825b99cabd932e8770f05cb4caaee7a0beda2

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