Why Doesn't Postgres MCP Work Correctly Even with Correct Auth and Connect Link?

This topic was automatically generated from Slack. You can find the original thread here.

Postgres mcp doesn’t work correctly
Even though auth is already provided through connect, it doesn’t get picked up by the mcp and it produces a connect link
Connect link has this format:

app=database isn’t postgresql and the link doesn’t work

Hey AFAI Postgres isn’t supported as of writting in MCP

MCP uses the Pipedream Connect SDK and a quickcheck on my end reveals that the Postgres app is not enabled for Connect.

Oh that’s an interesting edge case. Can you try app=postgresql?

Then I can look into actually fixing

PostgreSQL is definitely supported in Connect in general

Tried app=postgresql and could configure there. That also created a new account in connect.

On the next run it asked for auth again though, again against the app=database link

How are you using / configuring the MCP? Are you defining the app manually? If so, which app?

Just using the postgresql pipedream app and creating a conn through connect

Can you elaborate? Can you show me a code snippet?

	headers := map[string]string{
		"x-pd-project-id":       projectid,
		"x-pd-environment":      env,
		"x-pd-app-slug":         "postgresql",
		"x-pd-external-user-id": userid,
	}

	tool := responses.ToolUnionParam{
		OfMcp: &responses.ToolMcpParam{
			Type:          constant.Mcp("mcp"),
			ServerLabel:   "postgresql",
			ServerURL:     openaiapi.String(baseURL),
			Authorization: openaiapi.String(token.AccessToken),
			Headers:       headers,

			RequireApproval: responses.ToolMcpRequireApprovalUnionParam{
				OfMcpToolApprovalSetting: openaiapi.Opt("never"),
			},
}

Connect Frontend

    const connectConfig: ConnectConfig = {
      app: appSlug,
      token: connectToken.token,
      onSuccess: (res) => {
        console.log("Connected successfully", res);
      },
    };

    // Add oauthAppId to config only if it exists
    // if (oauthAppId) {
    //   connectConfig.oauthAppId = oauthAppId;
    // }

    if (!pd) {
      console.error("Pipedream SDK not loaded");
      return;
    }
    pd.connectAccount(connectConfig);
  };

If you change postgresql to slack or notion for example this works fine

This is what I see when I pull app with slug name postgresql from /v1/apps of Pipedream API

“connect”: {
“allowed_domains”: null,
“base_proxy_target_url”: null,
“proxy_enabled”: false
}

That’s interesting, I can’t reproduce that issue…

const payload = {
  model: 'gpt-5-2025-08-07',
  tools: [
    {
      type: 'mcp',
      server_label: appSlug,
      server_url: `https://remote.mcp.pipedream.net`,
      headers: {
        Authorization: `Bearer ${accessToken}`,
        "x-pd-project-id": process.env.PIPEDREAM_PROJECT_ID,
        "x-pd-environment": process.env.PIPEDREAM_ENVIRONMENT,
        "x-pd-external-user-id": externalUserId,
        "x-pd-app-slug": "postgresql",
      },
      require_approval: 'never'
    }
  ],
  input: 'how many rows are in the products table?'
};

// Make the OpenAI request with the MCP server
const response = await openaiClient.responses.create(payload);
...
  "output_text": "To get the row count, I need access to your PostgreSQL connection.\n\nPlease click this link to connect your account (do not modify the URL):\nhttps://pipedream.com/_static/connect.html?token=ctok_xxx&connectLink=true&app=postgresql\n\nOnce connected, reply "Done" and I'll run:\nSELECT COUNT(*) AS row_count FROM products;"