Skip to content

feat(managed_agents): CMA Sessions API as an MCP server (stdio + HTTP)#617

Merged
rlancemartin merged 1 commit into
mainfrom
lance/managed-agents-cma-mcp
May 13, 2026
Merged

feat(managed_agents): CMA Sessions API as an MCP server (stdio + HTTP)#617
rlancemartin merged 1 commit into
mainfrom
lance/managed-agents-cma-mcp

Conversation

@rlancemartin
Copy link
Copy Markdown
Contributor

@rlancemartin rlancemartin commented May 11, 2026

A thin MCP server wrapping the Managed Agents Sessions API, so Claude Desktop or claude.ai web can start and chat with an org's hosted CMA agents via tool calls. DIY bridge until "publish agent to claude.ai" is first-class.

User ─▶ Claude (Desktop or claude.ai) ─▶ MCP: send_message + wait_for_idle ─▶ CMA session
  ▲                                                                              │
  └──────────────────────── agent's reply ◀─── stream-to-idle ◀──────────────────┘

managed_agents/cma-mcp/

9 tools (shared src/tools.ts) — 8 are 1:1 endpoint wrappers; wait_for_idle is the one SSE→request/response shim. Two entrypoints:

Entrypoint Transport Client LOC
src/server.ts stdio Claude Desktop / Claude Code ~10
src/server-http.ts Streamable HTTP + bearer auth claude.ai web custom Connector ~40

Dockerfile for Fly/Railway/Render. Authoring (agents.create), destructive ops, and secrets deliberately not exposed; rationale in skill.md.

Tested

  • Claude Desktop (stdio): create_session → send_message → wait_for_idle loop proven end-to-end against a live agent.
  • HTTP transport: smoke-tested via ngrok — 401 unauth'd, tools/list returns 9 with bearer token.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 11, 2026

@rlancemartin rlancemartin changed the title feat(managed_agents): CMA Sessions API as a local MCP server feat(managed_agents): CMA Sessions API as an MCP server (stdio + HTTP) May 11, 2026
@github-actions
Copy link
Copy Markdown

/model-check findings

Reviewed model references in the changed files:

  • managed_agents/cma-mcp/CLAUDE.md
  • managed_agents/cma-mcp/README.md
  • managed_agents/cma-mcp/skill.md

No Claude model IDs are referenced in any of the three files (no claude-opus-*, claude-sonnet-*, claude-haiku-*, or anthropic.claude-* strings). Nothing to flag against the current public models list.

The files describe the MCP server's structure, setup paths, and tool wrappers — model selection is delegated to the CMA-side agent configuration (created via the ant CLI or Console), not pinned here, which is the right call for a transport-layer wrapper.

One note (not a blocker)

README.md line 50 specifies @anthropic-ai/sdk ≥ 0.95.1 — that's an SDK version, not a model ID, so it's outside /model-check's scope. Worth confirming separately that this minimum supports the CMA Sessions API surface the server uses.

✅ No action required for model usage.

@rlancemartin rlancemartin marked this pull request as ready for review May 12, 2026 22:25
Thin MCP server wrapping Managed Agents sessions so Claude Desktop or
claude.ai can drive hosted CMA agents via tool calls. DIY bridge until
'publish agent to claude.ai' is first-class.

9 tools in shared src/tools.ts — 8 are 1:1 endpoint wrappers;
wait_for_idle is the SSE→request/response shim. Two entrypoints:
server.ts (stdio, Desktop) and server-http.ts (Streamable HTTP +
bearer auth, claude.ai Connector). Dockerfile for Fly/Railway/Render.

list_agents capped + name_contains filter (busy workspaces hang
auto-pagination). Authoring/destructive/secret endpoints deliberately
excluded. README forks on client; CLAUDE.md invokes /claude-api;
skill.md has Desktop + Connector setup, relay-mode Project
instructions, org-admin gating note.

stdio path proven e2e in Claude Desktop; HTTP smoke-tested via ngrok.
@rlancemartin rlancemartin force-pushed the lance/managed-agents-cma-mcp branch from 25208da to a090206 Compare May 13, 2026 15:48
@rlancemartin rlancemartin merged commit e7b800d into main May 13, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants