Description
Summary
Gym resources servers can return a per-rollout MCP endpoint and signed session token from /seed_session, but responses_api_agents/openclaw_agent currently retains only the response cookies. The standalone OpenClaw harness therefore cannot call Gym resources-server tools even though upstream OpenClaw supports MCP servers.
This is the OpenClaw counterpart to the Hermes integration tracked in #2667.
Current behavior
OpenClawAgent.run() calls /seed_session to establish rollout state, preserves its cookies for /verify, and then runs the OpenClaw CLI. It does not read NEMO_GYM_MCP_METADATA_KEY from the seed response or add that server to the rollout's OpenClaw configuration.
The harness documentation consequently describes the resources server as verifier-only while OpenClaw uses its own internal tools.
Expected behavior
When /seed_session returns MCP metadata, the OpenClaw harness should:
- Parse the server name, URL path, transport, and signed headers.
- Resolve the resources-server base URL.
- Add a rollout-scoped MCP server to the temporary OpenClaw configuration.
- Keep the token isolated to that rollout under concurrent execution.
- Preserve the session cookie for
/verify. - Preserve today's verifier-only behavior when no MCP metadata is returned.
Acceptance criteria
- OpenClaw can discover and call tools from a Gym resources server with
expose_tools_over_mcp: true. - Every rollout uses only its own signed MCP token and temporary configuration.
- Missing MCP metadata remains backward compatible.
- Tests cover URL/header propagation, cookie propagation, concurrent rollout isolation, and temporary-config cleanup.
- Documentation distinguishes OpenClaw's built-in tools from dynamically attached Gym resources-server tools.
Canonicalizing OpenClaw's <server>__<tool> trajectory aliases is tracked in #2668. Running the complete OpenClaw runtime inside a Gym SandboxProvider is a separate capability tracked in #2669.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDev WIP
Activity
refactor(mcp): defer OpenClaw provenance to handoff work
[-]feat(openclaw_agent): consume resources-server MCP metadata from seed_session[/-][+]bug(openclaw_agent): consume resources-server MCP metadata from seed_session[/+]