CMA as an MCP server

Expose Anthropic Managed Agents Sessions API as MCP tools.

28|5|Updated Jun 24, 2025
One-click install
npx skills add https://github.com/thevibeworks/claude-code-docs --skill cma-as-an-mcp-server
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: CMA as an MCP server
Source: https://github.com/thevibeworks/claude-code-docs/tree/main/content/github/claude-cookbooks/managed_agents/cma-mcp
Command: npx skills add https://github.com/thevibeworks/claude-code-docs --skill cma-as-an-mcp-server

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you expose Anthropic Managed Agents as MCP tools so Claude can start sessions and relay messages reliably across both local Claude Desktop and remote claude.ai web.

Core Features & Use Cases

  • MCP tool wrapper for Managed Agents: Maps Managed Agents Sessions API endpoints (agents, sessions, events, archiving) into MCP tools for chat-driven workflows.
  • Two transport modes, one tool set: Supports stdio (Claude Desktop/Claude Code) and Streamable HTTP (claude.ai web Connector) using the same tool definitions.
  • Correct “relay mode” behavior: Guides you to prevent the frontend model from answering directly and instead return the backend agent’s reply verbatim.

Quick Start

Ask Claude Desktop or claude.ai web to “walk me through setting up CMA as an MCP server” for the desired client (Desktop or web).

Frequently Asked Questions about CMA as an MCP server

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I expose Anthropic Managed Agents as MCP tools for Claude Desktop?

You can expose Managed Agents as MCP tools by installing the CMA server repository, configuring environment variables, and registering the server with Claude Desktop using the stdio transport for local chat-driven workflows.

Can I use the same MCP server tool set for both Claude Desktop and claude.ai web?

Yes, the MCP server supports both stdio for Claude Desktop and Streamable HTTP for claude.ai web Connector, using the identical tool definitions for Managed Agents Sessions API endpoints across both transport modes.

How do I stop Claude from answering directly and return the backend agent reply instead?

To enforce relay mode and return the backend agent's reply verbatim, you must apply the relay-mode instruction pattern using list_agents, create_session, send_message, and wait_for_idle to prevent the frontend model from answering directly.

What Managed Agents Sessions API endpoints are mapped to MCP tools?

The MCP server maps Managed Agents Sessions API endpoints for agents, sessions, events, and archiving into individual MCP tools, enabling interactive operations like creating sessions, streaming tool execution, and returning agent replies.

Do I need additional dependencies to set up CMA as an MCP server?

You need to install the repository and configure environment variables for your Managed Agents environment, but no external dependencies are required beyond the chosen client transport and the Managed Agents API access.

Why is my Managed Agents MCP server not returning agent replies in chat-driven workflows?

If agent replies are missing, verify you are using the correct relay-mode instruction pattern with wait_for_idle and that environment variables for the Managed Agents environment are properly configured for your chosen transport mode.