Skip to content

MCP

iCallAgent exposes each agent's tools over the Model Context Protocol via a Server-Sent Events (SSE) transport. This is how an agent actually calls tools mid-call: the knowledge base search, contact lookups, CRM actions, and every connected integration all go through this same MCP server.

Scope

This MCP server is built for the iCallAgent agent runtime. It's how a live call gets access to tools, not a general-purpose MCP endpoint for connecting arbitrary MCP clients (like Claude Desktop or Cursor) to your iCallAgent account. If you want that instead, see SDKs for the current status of general-purpose API access.

Endpoints

MethodPathPurpose
GET/api/mcp/sseOpens the SSE stream. Auth and widget resolution happen here.
POST/api/mcp/messages/Receives JSON-RPC messages from the MCP client over the open session.

Connecting

GET /api/mcp/sse?widget_id=<widget_id>&call_id=<ari_channel_id>&token=<secret>
ParamRequiredDescription
widget_idYesThe agent whose tools this session should expose.
call_idNoThe active call's channel id, if this session is tied to a live call.
tokenYes*The runtime secret. Can also be passed as X-Agent-Secret or Authorization: Bearer <secret> / Authorization: Token <secret> instead of a query param.

Tool visibility

A given session only sees the tools actually assigned and enabled for that agent, not every tool that exists in the system. This is resolved once per connection from:

  • MCPTool.is_active: whether the tool is enabled globally.
  • WidgetTool: which tools are assigned to this agent, and their per-agent config (e.g. a Google Sheets tool's spreadsheet_id).

Session context (including the resolved tool list) is cached per widget_id for a short TTL, so reconnects from the same agent skip redundant database lookups.

Standard MCP calls

Once connected, a client makes the two standard MCP calls:

  • list_tools: returns the tools available to this agent, with their JSON-Schema input definitions.
  • call_tool: invokes a tool by name with arguments and returns a text result.

See Available Tools for what each one does.

Built with VitePress.