Skip to main content
An MCP server exposes a curated set of your tools, agents, and data models behind one Model Context Protocol endpoint, so external assistants (Claude, Cursor, …) can discover and call them. You define one with defineMcpServer.

Define an MCP server

Each member is passed by handle — the same rich refs an agent accepts:
mcp/crm.ts
import { defineMcpServer } from "@cargo-ai/cdk";
import { sdr } from "../agents/sdr";
import { contacts } from "../models/contacts";
import { enrich } from "../tools/enrich";

export const crmServer = defineMcpServer("crm", {
  description: "CRM tools and data for assistants.",
  tools: [enrich],
  agents: [sdr],
  models: [{ ref: contacts, readOnly: true }],
});

Deploy and connect

cargo-ai cdk deploy
cargo-ai ai mcp-server list
Point your MCP client at the deployed endpoint to use the bundled tools and agents as native actions.

From the CLI

cargo-ai ai mcp-server create --name "GTM tools"
cargo-ai ai mcp-server update --uuid <uuid> --name "GTM tools"