{
  "manifest_version": "1.0.0",
  "template": {
    "id": "edfcc421-3b67-4891-8039-3a885b2f2260",
    "slug": "postgres-mcp",
    "name": "Postgres MCP",
    "description": "Deploy and Host Postgres MCP with Railway",
    "url": "https://railway.com/deploy/postgres-mcp",
    "upstream": {
      "repo_url": "https://github.com/FournyP/postgres-mcp-railway-template"
    }
  },
  "status": "unvalidated",
  "validated_at": null,
  "success_rate_30d": null,
  "services": [
    {
      "name": "Postgres MCP",
      "source": {
        "repo": "https://github.com/FournyP/postgres-mcp-railway-template"
      },
      "needs_volume": false,
      "http": false
    },
    {
      "name": "Postgres MCP Gateway",
      "source": {
        "repo": "https://github.com/FournyP/postgres-mcp-railway-template"
      },
      "needs_volume": false,
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "PORT",
      "service": "Postgres MCP",
      "description": "Port the MCP HTTP server binds to inside the container. Fixed at 3000 to match what the gateway proxies to. Shoul match 'MCP_PORT' on the gateway.",
      "secret": false,
      "strategy": "default",
      "default": "3000"
    },
    {
      "key": "ACCESS_MODE",
      "service": "Postgres MCP",
      "description": "SQL-level guardrails. restricted forces read-only transactions and rejects commit/rollback — safe default. Set to unrestricted only for dev/throwaway databases where writes are acceptable.",
      "secret": false,
      "strategy": "default",
      "default": "restricted"
    },
    {
      "key": "DATABASE_URI",
      "service": "Postgres MCP",
      "description": "Postgres connection string the MCP will analyse. Wire this to the bundled Postgres plugin's private URL, or paste your own postgresql://user:pass@host:port/db for an external database.",
      "secret": false,
      "strategy": "ask_user"
    },
    {
      "key": "API_KEYS",
      "service": "Postgres MCP Gateway",
      "description": "Comma-separated list of bearer tokens allowed to call the MCP.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "MCP_HOST",
      "service": "Postgres MCP Gateway",
      "description": "Hostname of the MCP service on Railway's private network. Defaults to mcp.railway.internal. Only override if you rename the MCP service — then set it to .railway.internal.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "MCP_PORT",
      "service": "Postgres MCP Gateway",
      "description": "Port the MCP service listens on. Defaults to 3000, which matches the MCP service's fixed PORT. Don't change unless you also change PORT on the MCP service.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "postgres-mcp"
      }
    },
    "cli": "railway deploy --template postgres-mcp",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "edfcc421-3b67-4891-8039-3a885b2f2260",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "08d1ea13-7802-43a7-b060-b6354597d07e": {
                  "icon": "https://api.iconify.design/simple-icons:modelcontextprotocol.svg",
                  "name": "Postgres MCP",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/FournyP/postgres-mcp-railway-template",
                    "rootDirectory": "mcp"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Port the MCP HTTP server binds to inside the container. Fixed at 3000 to match what the gateway proxies to. Shoul match 'MCP_PORT' on the gateway.",
                      "defaultValue": "3000"
                    },
                    "ACCESS_MODE": {
                      "isOptional": false,
                      "description": "SQL-level guardrails. restricted forces read-only transactions and rejects commit/rollback — safe default. Set to unrestricted only for dev/throwaway databases where writes are acceptable.",
                      "defaultValue": "restricted"
                    },
                    "DATABASE_URI": {
                      "isOptional": false,
                      "description": "Postgres connection string the MCP will analyse. Wire this to the bundled Postgres plugin's private URL, or paste your own postgresql://user:pass@host:port/db for an external database.",
                      "defaultValue": "{{DATABASE_URI}}"
                    }
                  }
                },
                "49a6dff7-c5a8-49cb-b784-e20ca60b2474": {
                  "icon": "https://cdn.simpleicons.org/nginx",
                  "name": "Postgres MCP Gateway",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/FournyP/postgres-mcp-railway-template",
                    "rootDirectory": "gateway"
                  },
                  "variables": {
                    "API_KEYS": {
                      "isOptional": false,
                      "description": "Comma-separated list of bearer tokens allowed to call the MCP.",
                      "defaultValue": "{{API_KEYS}}"
                    },
                    "MCP_HOST": {
                      "isOptional": false,
                      "description": "Hostname of the MCP service on Railway's private network. Defaults to mcp.railway.internal. Only override if you rename the MCP service — then set it to .railway.internal.",
                      "defaultValue": "${{Postgres MCP.RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "MCP_PORT": {
                      "isOptional": false,
                      "description": "Port the MCP service listens on. Defaults to 3000, which matches the MCP service's fixed PORT. Don't change unless you also change PORT on the MCP service.",
                      "defaultValue": "${{Postgres MCP.PORT}}"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>": {}
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {},
  "resources": {
    "expected_services": 2,
    "needs_volume": false
  },
  "generated_at": "2026-09-10T16:14:52.212Z",
  "generator_version": "0.1.0"
}
