Skip to main content

What is MCP?

The Model Context Protocol (MCP) is a standard that enables AI assistants to connect with external systems in a structured and secure way. Through MCP, a service can expose its data and operations to an assistant in the form of “tools,” which define specific actions or queries the assistant can perform. These tools give assistants the ability to do things like query user data and perform actions in users’ business applications — unlocking the potential to surface meaningful insights and automate complex, multi-step workflows.

What Can I Do with Rollout’s MCP Server?

Rollout’s MCP server currently exposes a focused set of CRM tools. Today you can:
  • List valid credentials for the authenticated user
  • Retrieve a person overview from a connected CRM
  • Create people, notes, and tasks in a connected CRM
This enables workflows like: “Show me a quick overview of this lead,” or “Create a follow‑up task for the lead I’m viewing.” As we expand MCP coverage, we’ll add additional tools for other categories. If multiple valid credentials exist, provide credentialId in tool input to disambiguate which connected account should be used.

Building with Rollout’s MCP Server

Before You Begin

The rest of this guide assumes that you have a Rollout Client Id and Client Secret as well as at least one CRM credential connected to Rollout.

Connecting to the Server

Rollout’s MCP server uses Streamable HTTP. The MCP SDK manages the session and any streaming under the hood — you just point it at the /mcp endpoint and include your auth token. Server URL: https://universal.rollout.com/mcp

Authorization

Rollout’s MCP server requires each request to include a Bearer Token Authorization header containing a valid Rollout auth token. You’ll need to configure your SDK or HTTP client to set this header for every request made to the server.

Example Using the Model Context Protocol SDK (JavaScript)

The example below demonstrates how to:
  • Connect an MCP client to Rollout’s MCP server,
  • Fetch the list of available tools,
  • Provide those tools to an AI model, and
  • Call a tool on the MCP server on the model’s behalf.
While this example uses Anthropic’s SDK, other model providers that support tool calling (like OpenAI) can use the same pattern.
import Anthropic from "@anthropic-ai/sdk";
import { Client } from "@modelcontextprotocol/sdk/client/index.js";
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js";

const ROLLOUT_MCP_URL = new URL("https://universal.rollout.com/mcp");
const ROLLOUT_AUTH_TOKEN = "<YOUR ROLLOUT AUTH TOKEN HERE>";
const ANTHROPIC_API_KEY = "<YOUR ANTHROPIC API KEY HERE>";

async function sendQueryWithTools(client) {
  const anthropic = new Anthropic({
    apiKey: ANTHROPIC_API_KEY,
  });

  const messages = [
    {
      role: "user",
      content: "Which leads should I reach out to today?",
    },
  ];

  // Get the list of tools available from the MCP server
  const toolsResponse = await client.listTools();
  const availableTools = toolsResponse.tools.map((t) => ({
    name: t.name,
    description: t.description,
    input_schema: t.inputSchema,
  }));

  // Send user message to the model along with provided tools
  let modelResponse = await anthropic.messages.create({
    model: "claude-3-5-sonnet-20241022",
    max_tokens: 1000,
    messages,
    tools: availableTools,
  });

  for (const content of modelResponse.content) {
    if (content.type === "tool_use") {
      // Make call to MCP server on the model's behalf
      const result = await client.callTool({
        name: content.name,
        arguments: content.input,
      });

      // Provide prior conversation context and tool use result back to the model
      messages.push({
        role: "assistant",
        content: [content],
      });

      messages.push({
        role: "user",
        content: [
          {
            type: "tool_result",
            tool_use_id: content.id,
            content: result.content,
          },
        ],
      });

      // Get next response from the model after tool use
      modelResponse = await anthropic.messages.create({
        model: "claude-3-5-sonnet-20241022",
        max_tokens: 1000,
        messages,
        tools: availableTools,
      });
    }
  }

  // Print the final response text
  console.log(modelResponse.content[0].text);
}

async function withRolloutMcpClient(token, fn) {
  const client = await createRolloutMcpClient(token);
  try {
    await fn(client);
  } finally {
    client.close();
  }
}

async function createRolloutMcpClient(rolloutAuthJwt) {
  const transport = new StreamableHTTPClientTransport(ROLLOUT_MCP_URL, {
    requestInit: {
      headers: { Authorization: `Bearer ${rolloutAuthJwt}` },
    },
  });

  const client = new Client({
    name: "rollout-client",
    version: "0.0.1",
  });

  await client.connect(transport);

  return client;
}

withRolloutMcpClient(ROLLOUT_AUTH_TOKEN, sendQueryWithTools);

Credential Management UI

If a user doesn’t yet have a connected credential, the MCP server will return a link to the credential manager UI:
https://universal.rollout.com/mcp/credentials/<authToken>
This UI is the same Rollout Link experience, scoped to CRM credentials. If multiple valid credentials exist and no credentialId is supplied, the server returns an error prompting credential selection.