Skip to content

Foundation: codify ACP MCP forwarding across SDK and integrations #3705

Closed
OpenHands/OpenHands
#14613

Description

@simonrosenberg

✅ Status as merged on main (closed 2026-06-15)

Original spec

Context

Agent profiles need MCP to be a first-class launch setting for both OpenHands and ACP agents.

The SDK already supports this at the model/runtime layer:

  • ACPAgentSettings.mcp_config exists and is documented as MCP servers made available to the ACP subprocess.
  • ACPAgentSettings.create_agent() passes mcp_config into ACPAgent.
  • ACPAgent translates standard OpenHands MCP config into ACP MCP servers at session creation, forwarding stdio servers and forwarding remote transports only when the ACP server advertises support.

Canvas local startup also treats MCP as shared across OpenHands and ACP.

The remaining risk is integration drift: different app-server / agent-server startup paths can accidentally treat MCP as OpenHands-only, or pre-filter ACP MCP before the SDK gets to apply its transport/capability rules.

Important downstream finding: OpenHands/OpenHands app-server currently has an ACP-specific MCP drop in the conversation-start path (_merge_custom_mcp_config returns early for ACPAgentSettings). That means ACP + MCP can work through the SDK/local Canvas path while still not working in the OpenHands app-server path. This issue should not be considered done unless that downstream path is fixed or a linked OpenHands issue/PR tracks the fix.

Goal

Make the SDK contract explicit and tested: ACPAgentSettings.mcp_config is a valid ACP launch setting and integrations should pass it through to the SDK rather than dropping it because the agent kind is acp.

This is both:

  • an SDK foundation task: codify and test the contract, and make any SDK changes needed if tests reveal missing behavior; and
  • an integration correctness task: verify and fix OpenHands app-server so ACP + MCP actually works end to end there.

Proposed work

SDK repo

  • Add/strengthen SDK tests proving ACPAgentSettings.create_agent() carries mcp_config into ACPAgent with secret-bearing env/header values preserved in runtime/plaintext mode.
  • Add/strengthen ACP session-init tests proving standard mcp_config entries are converted through the SDK path (stdio forwarded; HTTP/SSE forwarded only when advertised; unsupported dropped with a warning, not by callers pre-filtering).
  • Document the integration contract in the SDK settings/API docs.
  • Audit the local agent-server start path for any ACP-only MCP drops.

OpenHands repo

  • Audit + fix the app-server conversation-start path; specifically the _merge_custom_mcp_config early-return for ACPAgentSettings. Add tests. If not done in the same effort, link the downstream issue/PR.

Canvas repo

  • Confirm Canvas constructs/stores MCP in SDK shape for both kinds and does not disable MCP for ACP.

Acceptance criteria

  • Tested SDK contract for ACP MCP passthrough; SDK changes made if needed.
  • Integrations rule: do not discard user/profile MCP solely because agent_kind == "acp".
  • OpenHands app-server ACP startup verified, or a linked issue/PR tracks the fix.
  • Unsupported ACP remote transport behavior stays in the SDK, observable via warnings.
  • Canvas payloads remain compatible.
  • Foundation ready for AgentProfile materialization to include MCP for both variants.

Activity

  1. simonrosenberg commented on Jun 15, 2026

    @simonrosenberg
    MemberAuthor

    Tracked as a Phase 0 foundation prerequisite of the Agent Profiles epic #3713.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions