GitHub Issue for adcp-client
Repository: https://github.com/adcontextprotocol/adcp-clientTitle
Auth headers not forwarded forsync_creatives
but work for get_products
(MCP/StreamableHTTP)
Labels
- bug
- authentication
- mcp
- transport
Description
Summary
When using@adcp/client
with MCP protocol and auth_token_env
configuration, auth headers are successfully forwarded for get_products
but NOT for sync_creatives
, despite identical configuration and debug logs showing “Transport configured with x-adcp-auth header” for both tools.
Environment
- @adcp/client version: (check your version)
- Protocol: MCP
- Transport: StreamableHTTP
- Node.js: v22.19.0
- MCP Server: Wonderstruck (
https://wonderstruck.sales-agent.scope3.com/mcp
)
Reproduction Steps
Expected Behavior
Bothget_products
and sync_creatives
should successfully forward the x-adcp-auth
header to the MCP server, resulting in successful authenticated requests.
Actual Behavior
get_products: ✅ Header forwarded, request succeeds Debug log:Analysis
The debug logs are identical for both tools - both show “Transport configured with x-adcp-auth header”. However, the MCP server explicitly reports that the header is NOT present forsync_creatives
requests.
This suggests that:
- The header is being SET on the transport object (as logged)
- But NOT actually included in the HTTP request for
sync_creatives
- There may be different code paths in StreamableHTTP transport for different tool types
Impact
This bug prevents usingsync_creatives
(and potentially other write operations) with authenticated MCP servers. Since creative syncing is a core ADCP operation, this significantly limits the protocol’s usefulness in production scenarios requiring authentication.
Additional Information
- Same AgentConfig used for both tools
- Auth configuration is correct (get_products proves this)
- Issue appears to be in StreamableHTTP transport layer
- May affect other tools besides get_products/sync_creatives
Full Debug Logs
Suggested Fix
Ensure that custom auth headers (configured viaauth_token_env
) are consistently forwarded for ALL MCP tool calls. The StreamableHTTP transport should apply headers uniformly regardless of which tool is being invoked.
Potential areas to investigate:
- StreamableHTTP transport header management
- Tool-specific request handling paths
- Session/connection reuse between different tool calls
Instructions for Submitting
- Go to https://github.com/adcontextprotocol/adcp-client/issues/new
- Copy the title above
- Copy the description (everything under ## Description)
- Add labels: bug, authentication, mcp, transport
- Submit the issue
- Share the issue URL with the team