Agent as an MCP Server

Agents can be used directly as MCP Servers, allowing them to be used as tools within other agents. This is helpful for integrating agents from compatible tools like Claude or Cursor.

Agents as MCP Servers is currently (Studio 1.3.6) an experimental feature. For deployed agents in Agent Compute, this feature is available starting from version 1.4.0.

In Studio

Enable Experiments in the Settings -> Advanced to use this feature. Once you have enabled Experiments, each agent can be used as an MCP Server. You'll find the local MCP Server endpoint in the right sidebar of the agent editor.

Agent as an MCP Server
Agent as an MCP Server

In Control Room

In Control Room, the MCP Server endpoint is available for each deployed agent automatically. When viewing any deployed agent, you'll see the MCP Server endpoint in the details, like this:

Agent as an MCP Server
Agent as an MCP Server

Clicking on the element will open a dialog with the MCP Server endpoint and the Work Room API key. You can copy the MCP Server endpoint to your clipboard and use it in any MCP Client (like Studio - to create multi agent workflows!)

MCP Endpoint and API Key
MCP Endpoint and API Key

Notice that Control Room automatically generates the Work Room API key for you - but you can always generate a new one if you need to. And deprecate the old one if you want to.

Example: Using the MCP Server in Cursor

As an example, let's say you have an agent called "Marketing Agent" and you want to use it in Cursor. In Cursor, you can add it to the .cursor/mcp.json file like this:

{
    "mcpServers": {
        "marketing-agent": {
            "url": "http://127.0.0.1:54627/api/v2/agent-mcp/a4cb3f7c-7ce2-44bf-8e55-28fffb239843/mcp"
        }
    }
}

Or if connecting to a deployed agent, you can use the MCP Server endpoint from Control Room like this:

{
    "mcpServers": {
        "marketing-agent": {
            "url": "https://ace-6746b3ab.prod-demo.sema4ai.work/tenants/aa8cc9ca-0edf-4641-b6e2-929f4044c90e/api/v1/agent-mcp/e5fd6111-ef29-4f06-8793-503f035ef914/mcp/",
            "headers": {
                "Authorization": "Bearer your_work_room_api_key"
            }
        },
    }
}

Now the agent becomes available as a tool in the agent chat (in the right sidebar in the screenshot below).

Agent as an MCP Server
Agent as an MCP Server

Once MCP server is used to talk with the agent, the threads created using MCP are also visible in Studio if you are running the agent locally. In the Work Room the threads are not visible to other users - only through the API with the same Work Room API key. We are working on making the threads visible in the Work Room as well for specific roles.