Why am I encountering an error when running pipedream MCP server on Docker?

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

I am coming across an error running pipedream mcp server on docker.

1) Clone the repository and build
	`docker build -t pipedream-connect .`

2) Have the service as bellow on docker-compose file
    pipedream_mcp_server:
     image: pipedream-connect:latest
     environment:
      - PIPEDREAM_CLIENT_ID=${PIPEDREAM_CLIENT_ID}
      - PIPEDREAM_CLIENT_SECRET=${PIPEDREAM_CLIENT_SECRET}
      - PIPEDREAM_PROJECT_ID=${PIPEDREAM_PROJECT_ID}
      - PIPEDREAM_PROJECT_ENVIRONMENT=${PIPEDREAM_ENVIRONMENT:-development}

I made sure the docker container has the above environment variable passed properly.

When I try to make a call.
 Error: ran out of attempts trying to retrieve oauth access token
 at x.ensureValidOauthAccessToken (file:///app/node_modules/@pipedream/sdk/dist/chunk-NQZ6DXXX.js:7:1943)
         at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
         at async x.oauthAuthorizationHeader (file:///app/node_modules/@pipedream/sdk/dist/chunk-NQZ6DXXX.js:7:2446)
         at async x.makeAuthorizedRequest (file:///app/node_modules/@pipedream/sdk/dist/chunk-NQZ6DXXX.js:1:2016)
         at async registerComponentTools (file:///app/dist/lib/registerComponentTools.js:31:24)
         at async serverFactory (file:///app/dist/src/mcp-server.js:8:5)
         at async handleSSEConnection (file:///app/dist/src/sse.js:39:28)
         at async file:///app/dist/src/sse.js:119:13

I am probably missing something super obvious…

I think I’ve most commonly seen that error when there’s a mismatch in the OAuth client credentials, are you able to confirm those are correct and indeed getting passed in correctly?

weirdly, running it the following way fixed it. i didn’t change any credentials or anything

  pipedream_mcp_server:
    image: node:22
    command: >
      bash -c "npm install -g @pipedream/mcp -y && npx @pipedream/mcp sse"
    environment:
      - PIPEDREAM_CLIENT_ID=${PIPEDREAM_CLIENT_ID}
      - PIPEDREAM_CLIENT_SECRET=${PIPEDREAM_CLIENT_SECRET}
      - PIPEDREAM_PROJECT_ID=${PIPEDREAM_PROJECT_ID}
      - PIPEDREAM_PROJECT_ENVIRONMENT=${PIPEDREAM_ENVIRONMENT:-development}