# Smithery configuration file: https://smithery.ai/docs/config#smitheryyaml
# ============================================================================
# NOTE: This repository contains both Python and TypeScript versions.
#
# For Smithery deployment, use the TypeScript version located at:
# typescript/smithery.yaml
#
# When adding this server in Smithery, specify the path: typescript/
# ============================================================================
# This root configuration is for backwards compatibility with existing deployments
# pointing to the Python version. New deployments should use typescript/smithery.yaml
startCommand:
type: stdio
configSchema:
type: object
properties:
POSTGRES_HOST:
type: string
default: localhost
description: PostgreSQL database host
POSTGRES_PORT:
type: number
default: 5432
description: PostgreSQL database port
POSTGRES_USER:
type: string
description: Database user
POSTGRES_PASSWORD:
type: string
description: Database password
POSTGRES_DB:
type: string
description: Database name
POSTGRES_SSLMODE:
type: string
enum:
- disable
- allow
- prefer
- require
- verify-ca
- verify-full
default: prefer
description: SSL mode for connection
ALLOW_WRITE_OPERATIONS:
type: boolean
default: false
description: Enable INSERT/UPDATE/DELETE operations
QUERY_TIMEOUT:
type: number
default: 30
description: Query timeout in seconds
MAX_ROWS:
type: number
default: 1000
description: Maximum rows returned per query
required:
- POSTGRES_USER
- POSTGRES_PASSWORD
- POSTGRES_DB
commandFunction: |
(config) => ({
command: 'node',
args: ['typescript/dist/index.js'],
env: {
POSTGRES_HOST: config.POSTGRES_HOST || "localhost",
POSTGRES_PORT: config.POSTGRES_PORT ? String(config.POSTGRES_PORT) : "5432",
POSTGRES_USER: config.POSTGRES_USER,
POSTGRES_PASSWORD: config.POSTGRES_PASSWORD,
POSTGRES_DB: config.POSTGRES_DB,
POSTGRES_SSLMODE: config.POSTGRES_SSLMODE || "prefer",
ALLOW_WRITE_OPERATIONS: config.ALLOW_WRITE_OPERATIONS ? "true" : "false",
QUERY_TIMEOUT: config.QUERY_TIMEOUT ? String(config.QUERY_TIMEOUT) : "30",
MAX_ROWS: config.MAX_ROWS ? String(config.MAX_ROWS) : "1000"
}
})
exampleConfig:
POSTGRES_HOST: localhost
POSTGRES_PORT: 5432
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
POSTGRES_DB: mydb