Why is the Connect MCP Failing to Paginate and Scope Account Resolution Resulting in Account Limit Errors?

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

Hi Pipedream team,

We’re seeing a hard failure in Connect MCP in production that appears related to account-list pagination or account resolution inside the MCP server.

Context

We use Connect MCP over remote streamable HTTP to expose connected-app tools to our AI agent. Once our project grew beyond a certain number of connected accounts, MCP tool calls began failing consistently across users.

Error

When the agent calls MCP tools, we receive:

PipedreamError: Status code: 413

{
  "error": "account_limit_reached",
  "message": "External user has more than 100 accounts. Use /v1/connect/{project_id}/accounts for the full paginated list"
}

Why we think this may be an MCP-side pagination/scoping issue

No individual external user has more than 100 connected accounts. The issue appears to have started when the overall project account count crossed the pagination threshold.

The Connect REST API path still works as expected when listing accounts with external_user_id and pagination, and proxied provider calls succeed. The failure seems isolated to the MCP path.

From the error message, it looks like MCP’s internal account lookup may be hitting the unpaginated account-list limit at the project level instead of scoping correctly to the provided user/account context.

Impact

This is currently affecting our production agent-driven integrations. The Connect REST/proxy path is unaffected, but MCP tool calls are failing.

Questions

  1. Is the MCP server expected to paginate and scope account resolution by external_user_id and/or x-pd-account-id?
  2. Is there a recommended request pattern to avoid a project-wide account lookup, for example always supplying x-pd-account-id?
  3. Is this a known issue, and is there a fix or mitigation available?
  4. If the current workaround is to keep each project below the account-list threshold, is sharding across projects the recommended approach?

Any guidance or mitigation would be greatly appreciated. - I can share more info in a pm.

Please open a support ticket to share more info securely: Pipedream

We’ll need your workspace name or email - if you’re logged into the workspace when submitting the ticket, this info is sent automatically.

Also need to understand which tool the agent is calling and receiving this response - how far are they making it? Listing apps, listing accounts for an app?

That response should only be relevant when an individual external_user_id has >100 accounts — did you guys resolve this?

hi there: we get this error on project level; not external_user_id.
Can you confirm that this is not related to project level?

Project proj_RMsAO29: no external_user_id has >100 accounts (max 23; project total 103 across 28 users). GET /accounts?external_user_id=X returns the correct small count (200). But MCP tool calls return account_limit_reached for users with far fewer than 100 accounts, and we pin x-pd-external-user-id + x-pd-account-id. Your limit is being enforced per project, not per external user as stated.

i have created a ticket multiple times; did not get any answer.

I see, that sounds like a bug, I’m looking into it

Thanks for the info and patience

Tracking here: github.com/PipedreamHQ/pipedream/issues/21247

can you DM me the email you opened tickets with?

i did; can you please reply.?