anthropics / anthropics/claude-ai-mcp
Custom connector to X Ads MCP fails after OAuth redirect ("Authorization with the MCP server failed") despite server working via curl
- Vorherrschende Sprache
- Keine Sprachdaten
- Sterne
- 471
- Forks
- 76
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
### MCP server URL or name
https://ads-api.x.com/mcp
### How are you connecting to this server?
From a custom connector URL I entered manually
### Where does the issue occur?
When auth finishes and redirects back to Claude.ai
### When did you last reproduce this?
2026-09-07 17:30〜17:35 JST
### Browser and OS
Chrome 152.0.7977.82 (arm64) on macOS Tahoe 26.6.2
### Describe the issue
I'm on a Claude Team plan and added a custom connector (remote MCP) pointing to the X Ads MCP server (`https://ads-api.x.com/mcp`). OAuth authentication with X completes successfully (I can see the X consent screen and approve it), but immediately after redirecting back to Claude.ai, I get the following error:
> "Your account was authenticated, but an error occurred while connecting to X ads MCP. Please try again or check that the server is working correctly."
Reference IDs from repeated attempts:
- `ofid_9f8af06d610f80df`
- `ofid_1560b34871fd0d9f`
**Setup details:**
- OAuth client type: "独自のOAuthクライアントを使用する" (Use my own OAuth client) — Client ID only, no client secret (X app is a Native App / public client using PKCE)
- Callback URI registered on X's side: `https://claude.ai/api/mcp/auth_callback`
- App permissions on X: Read and Write
**Evidence the server itself is working correctly:**
I manually completed X's OAuth2 authorization code flow with the same Client ID and scopes (`ads.read ads.write offline.access`), then called `tools/list` directly against `https://ads-api.x.com/mcp` via curl using the resulting access token. This succeeded and returned the full list of tools (`list_ads_accounts`, `create_campaign`, etc.), confirming the OAuth client configuration, app permissions, and ads account access are all correct on X's side.
This strongly suggests the failure occurs within Claude.ai's connector broker after the OAuth redirect back from X, rather than on the MCP server itself.
### Error details
```shell
**Error message shown in the UI (Japanese, as displayed):**
"アカウントは認証されましたが、X ads MCPへの接続中にエラーが発生しました。もう一度お試しいただくか、サーバーが正常に動作しているかご確認ください。"
**English translation:**
"Your account was authenticated, but an error occurred while connecting to X ads MCP. Please try again or check that the server is working correctly."
**Support reference IDs (from repeated attempts):**
- `ofid_9f8af06d610f80df`
- `ofid_1560b34871fd0d9f`
**No error is visible on the MCP server side** — a direct curl call to `https://ads-api.x.com/mcp` with a manually-issued access token (same OAuth client, same scopes) returns a normal `tools/list` response with no errors.
```
### Expected behavior
After completing OAuth authorization with X, Claude.ai should successfully connect to the X Ads MCP server (https://ads-api.x.com/mcp) and make its tools (e.g. list_ads_accounts, create_campaign, get_account_stats, etc.) available for use in conversations — the same way a direct MCP client (curl / manually-issued token) can already reach tools/list successfully against this server.
### Additional context
_No response_
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Bewertung
Dieses Issue wurde noch nicht bewertet.