MCP.enabled: true, the platform mounts a Streamable HTTP MCP endpoint at /mcp/:agent for each agent ID. External MCP clients — Claude Desktop, custom agents, or any MCP-compatible tool — can connect to these endpoints and call the agent’s tools directly.
Prerequisites
- Completed Your first app — you have a working project with
src/exulu.ts. - Read ExuluMCP — the reference page for the underlying class.
What you will build
A project with MCP enabled, an understanding of the endpoint layout and authentication model, and a working MCP client config that connects to an agent.1
Enable MCP in the app config
Set No other configuration is required.
MCP.enabled: true in the config passed to app.create(). The MCP field is required — it does not have a default:src/exulu.ts
ExuluApp calls ExuluMCP.create() internally during app.express.init(), mounting the route handlers before the server begins accepting connections.2
Understand the endpoint layout
After the server starts, three routes are active for each agent:
:agent is the agent’s numeric or UUID ID from the IMP database — the same ID shown in the agent workbench URL. Sessions are tracked by the mcp-session-id header. The first POST to an endpoint without a session ID is treated as an initialize request; the response includes a mcp-session-id header the client must send on subsequent requests.Built-in prompt tools — in addition to the agent’s enabled tools, every MCP server registers two built-in tools:getListOfPromptTemplates— lists prompt templates assigned to the agent.getPromptTemplateDetails— retrieves the full content of a template by ID.
3
Understand authentication
Every request to
/mcp/:agent goes through IMP’s standard authentication middleware before any MCP processing occurs:- API key — pass an API key in the
x-api-keyheader. Obtain keys from Administration → API keys. - Session token — browser-based clients can use the platform’s session cookie.
401. Requests for an agent the authenticated user cannot access receive 404.There is no separate MCP-specific credential — the same API key that authenticates the REST and GraphQL APIs authenticates the MCP endpoint.4
Connect a generic MCP client
Most MCP clients accept a JSON configuration block. To connect to an IMP agent, use:Replace Or, if your client supports direct HTTP transport (Streamable HTTP):
<agent-id> with the agent’s numeric ID from the workbench URL (for example, 42) and sk_your-api-key-here with a key from Administration → API keys.For Claude Desktop specifically, add this block to claude_desktop_config.json:5
Verify the connection
Start the server:Send an A successful response includes The response lists all tools enabled for the agent plus the two built-in prompt tools.
initialize request to the MCP endpoint:"result": { "protocolVersion": "...", "capabilities": { "tools": {} }, ... } and a mcp-session-id header. Use that session ID on subsequent requests.Send a tools/list request to verify the agent’s tools are exposed:What you built
- MCP enabled on the IMP app with
MCP.enabled: true. - An understanding of the Streamable HTTP endpoint layout (
POST/GET/DELETEat/mcp/:agent). - A generic MCP client config JSON that connects to an agent using
x-api-keyauthentication.
Next steps
ExuluMCP
The ExuluMCP class reference — endpoints, session management, and built-in prompt tools.
Custom tools
Add tools that are exposed through the MCP server.
API keys
Create and manage API keys for MCP client authentication.