Skip to main content
IMP implements the Model Context Protocol (MCP) Streamable HTTP transport. When MCP.enabled: true in your app config, each agent is reachable as a standalone MCP server at /mcp/:agent.

Prerequisites

MCP must be enabled in the ExuluApp config before the endpoint becomes active. See MCP tutorial for setup instructions and the ExuluMCP reference for class-level documentation.

Endpoints

Three routes implement the Streamable HTTP transport: :agent is the agent’s numeric or UUID identifier as shown in the workbench URL.

Sessions

Send the first POST without a mcp-session-id header. The initialize handshake returns a mcp-session-id value in the response header. Include that value on every subsequent request for the same session:
Sessions are not persisted to disk — they live in process memory. Restarting the backend invalidates all active MCP sessions.

Authentication

Every request to /mcp/:agent passes through IMP’s standard authentication middleware before any MCP processing:
  • API key — set x-api-key: sk_<secret>/<keyname>.
  • Bearer JWT — set Authorization: Bearer <session-token>.
Unauthenticated requests receive 401. Requests where the authenticated caller does not have access to the agent also receive 401. Requests for an agent that does not exist receive 404.

Worked example — raw HTTP

1. Initialize

The response includes a mcp-session-id header. Copy it for subsequent calls.

2. List tools

The response lists every tool enabled for the agent, plus two built-in prompt tools: getListOfPromptTemplates and getPromptTemplateDetails.

3. Terminate session

Client configuration examples

Generic MCP client (Streamable HTTP)

Claude Desktop

Add to claude_desktop_config.json:
Older Claude Desktop builds that require a STDIO proxy can use:

Cursor

Open Settings → MCP and add a new server entry:

Error codes

MCP tutorial

Step-by-step guide to enabling and testing MCP in your project.

ExuluMCP reference

Class-level documentation for ExuluMCP including session management internals.

LiteLLM gateway

OpenAI-compatible model pass-through for raw model calls and embeddings.

API keys

Create and manage API keys for MCP client authentication.