Skip to content

[Feature Request]: PostgreSQL Schema Configuration SupportΒ #1535

@ESnark

Description

@ESnark

🧭 Type of Feature

Please select the most appropriate category:

  • Enhancement to existing functionality
  • New feature or capability
  • New MCP-compliant server
  • New component or integration
  • Developer tooling or test improvement
  • Packaging, automation and deployment (ex: pypi, docker, quay.io, kubernetes, terraform)
  • Other (please describe below)

🧭 Epic

Title: PostgreSQL Schema Configuration Support
Goal: Allow users to specify a custom PostgreSQL schema instead of defaulting to public.
Why now: Enterprise PostgreSQL environments often restrict access to the public schema for security reasons. Users currently cannot deploy MCP Gateway in such environments without database-level workarounds.


πŸ™‹β™‚οΈ User Story 1

As a: Platform operator deploying MCP Gateway to a shared PostgreSQL instance
I want: The search_path specified in DATABASE_URL's options parameter to be properly applied
So that: I can deploy MCP Gateway in enterprise environments without requiring access to the public schema

βœ… Acceptance Criteria

Scenario: Schema is applied from DATABASE_URL options parameter
  Given DATABASE_URL contains "?options=-csearch_path%3Dmcp_gateway"
  When bootstrap_db runs migrations
  Then all tables are created in the "mcp_gateway" schema
  And no access to "public" schema is attempted

πŸ“ Design Sketch (optional)

Include a diagram, sketch, or flow (use Mermaid if desired):

flowchart TD
    A[Client] -->|POST /completions| B(MCPGateway)
    B --> C[Completion Service]
Loading

πŸ”— MCP Standards Check

  • Change adheres to current MCP specifications
  • No breaking changes to existing MCP-compliant integrations
  • If deviations exist, please describe them below:

πŸ”„ Alternatives Considered

List any alternative designs, existing workarounds, or rejected ideas.


πŸ““ Additional Context

Include related issues, links to discussions, issues, etc.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesttriageIssues / Features awaiting triage

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions