user-1
(User 1)
1
This topic was automatically generated from Slack. You can find the original thread here.
Hello! I am trying to connect to Pipedream’s MCP for a connection I created for one of my projects, but I am always getting this error:
Failed to connect to Pipedream MCP server:
Error POSTing to endpoint (HTTP 500): !DOCTYPE html <html lang="en"> <head> <meta charset="utf-8"> <title>Error</title> </head> <body> <pre>Internal Server Error</pre> </body> </html>
user-1
(User 1)
2
Here’s how I’m handling the MCP connection, where it is always falling into the catch statement
user-1
(User 1)
3
I have double-checked it, and the app slug, oauth app id and external user id’s are correct and the same ones generated in my Pipedream project
user-1
(User 1)
4
I’m using ‘development’ as pipedream environment though
user-1
(User 1)
5
It does seem to work for the Notion connection, for some reason, but not for any other app I have tried like Slack, Google Drive or Google Docs.
user-1
(User 1)
6
accounts are correctly connected to the external user id in the project
user-1
(User 1)
7
any idea why is it always failing?
user-1
(User 1)
8
Do you actually have an oauthAppId associated w/ all of those apps you’re trying to connect to?
user-1
(User 1)
9
yes! and it’s the same value as the id from Pipedream’s Accounts ui
user-1
(User 1)
10
That happens for every app? Can you give me an example app you get that 500 for?
user-1
(User 1)
11
Here’s an example on Google Drive. As you can see, I am using the right values for every header
user-1
(User 1)
12
I have tried a few apps:
• Notion (oauth) and Telegram (api key) do work
• Google Drive, Google Docs, Slack (all oauth) don’t
user-1
(User 1)
13
hmmm actually, Notion did work yesterday but it’s not working now 
user-1
(User 1)
14
it looks like it may be failing on all apps connected with Oauth
user-1
(User 1)
15
I do have stored the oauthAppId returned when creating the connection, and I am including it as a header in the StreamableHTTPClientTransport
user-1
(User 1)
16
Oh, removing the x-pd-oauth-app-id fixes the issue
user-1
(User 1)
17
I see, this is for the custom Oauth, right?
user-1
(User 1)
19
However, then I do have an issue
user-1
(User 1)
20
What if the same user has two connected Drive accounts, for example