Last updated

Built-in MCP Servers

Connect an MCP client (Claude Code, Cursor, Claude Desktop, or your own agent) to the ibl.ai platform's built-in Model Context Protocol servers, and call platform features as tools.

Note: This guide runs against the hosted iblai.app environment. For a license to run the full ibl.ai platform on your own infrastructure, reach out to our team at ibl.ai/contact.


Overview

The platform's ASGI service hosts a set of MCP servers under /mcp/. Each server groups related tools: agent settings and memory, sessions and projects, chat with a deployed agent, workflows, and a few account helpers.

  • Transport: Streamable HTTP. Every server is a single URL that accepts MCP JSON-RPC over POST.
  • Authentication: the same credentials as the REST API. A tool can only do what the caller can already do through the API; RBAC and tenant scoping apply unchanged.
  • Execution: a tool runs the same view as the matching REST endpoint, inside the platform. The result is the endpoint's JSON response, returned as tool text.

Most tools are generated from the /v1 API: one tool per published /v1 route, named and documented after that route. A few tools are hand-written for things the REST API does not cover directly, such as chatting with an agent or running a workflow. See How tools are generated.

This is different from two related pages:

  • MCP Servers covers the iblai/vibe skills and the hosted agent-chat server for coding agents.
  • MCP Server Connections covers registering external MCP servers that your agents call during a chat.

Servers

The MCP servers are served from https://asgi.data.iblai.app under /mcp/....

On a self-hosted deployment, use your ASGI host for MCP.

ServerURL pathWhat it covers
Agent create/mcp/agent-create/Agent settings, public settings, memories, skills
Agent chat/mcp/agent-chat/Send a prompt to one deployed agent and get its reply
Analytics/mcp/analytics/Current user, the key's platform, user count
Search/mcp/search/Health check only, until search routes are published in /v1
Platform/mcp/platform/Sessions, pinned sessions, projects, disclaimers, notifications, organization metadata, LLMs, apps, audit logs, chat privacy, permission checks
Workflows/mcp/workflows/Run a workflow and get its result
User/mcp/user/Health check only, until user routes are published in /v1

Keep the trailing slash on each URL.

Every server except agent chat has a ping tool that returns the server time. A ping confirms the URL and that the key is valid. It does not check what the key can access: call a read tool, such as agents_settings_retrieve for one of your agents, for that.

The workflows server is on by default and is off when the deployment sets IBL_ENABLE_WORKFLOWS to false.


Authentication

Authenticate with a Platform API key. Send it in the Authorization header on every request:

Authorization: Api-Token <PLATFORM_API_KEY>

Organization. A Platform API key belongs to exactly one platform, and that platform is the organization for every tool call. It cannot be changed per request. Organization and user are never tool arguments.

Use a key from the platform you work on. A key is created on the platform you are signed in to at the time. To work with the agents of platform A, create the key while signed in to platform A. A key from platform B reports platform A's agents as not found, even if you are an admin of both.

User. The acting user is the key's owner. A tool cannot act as another user.

Agent chat. The agent-chat server also needs the agent to talk to. Pass the agent's unique_id; the agent must belong to the key's platform:

X-Agent-Unique-Id: <AGENT_UNIQUE_ID>

X-Mentor-Unique-Id is the older name of this header and still works, so existing configurations need no change. If you send both, they must name the same agent; two different ids are refused.

To create a Platform API key, see the App CLI login flow or your platform admin settings.


Connect a Client

Claude Code

claude mcp add --transport http iblai-platform \
  https://asgi.data.iblai.app/mcp/platform/ \
  --header "Authorization: Api-Token $IBLAI_API_KEY"

claude mcp add --transport http iblai-agent-create \
  https://asgi.data.iblai.app/mcp/agent-create/ \
  --header "Authorization: Api-Token $IBLAI_API_KEY"

Cursor and other JSON-configured clients

Add the servers you need to the client's MCP config (for Cursor, ~/.cursor/mcp.json):

{
  "mcpServers": {
    "iblai-platform": {
      "url": "https://asgi.data.iblai.app/mcp/platform/",
      "headers": { "Authorization": "Api-Token <PLATFORM_API_KEY>" }
    },
    "iblai-agent-create": {
      "url": "https://asgi.data.iblai.app/mcp/agent-create/",
      "headers": { "Authorization": "Api-Token <PLATFORM_API_KEY>" }
    },
    "iblai-agent-chat": {
      "url": "https://asgi.data.iblai.app/mcp/agent-chat/",
      "headers": {
        "Authorization": "Api-Token <PLATFORM_API_KEY>",
        "X-Agent-Unique-Id": "<AGENT_UNIQUE_ID>"
      }
    },
    "iblai-workflows": {
      "url": "https://asgi.data.iblai.app/mcp/workflows/",
      "headers": { "Authorization": "Api-Token <PLATFORM_API_KEY>" }
    },
    "iblai-analytics": {
      "url": "https://asgi.data.iblai.app/mcp/analytics/",
      "headers": { "Authorization": "Api-Token <PLATFORM_API_KEY>" }
    }
  }
}

Each tool's schema is loaded into the client's context, so connect only the servers you use.

Raw HTTP

Any HTTP client can call a server. Send Accept: application/json, text/event-stream; the reply may come back as a server-sent event whose data: line holds the JSON-RPC response.

URL=https://asgi.data.iblai.app/mcp/platform/
H=(-H "Authorization: Api-Token $IBLAI_API_KEY" \
   -H "Content-Type: application/json" \
   -H "Accept: application/json, text/event-stream")

# 1. Initialize
curl -s "${H[@]}" "$URL" -d '{"jsonrpc":"2.0","id":1,"method":"initialize",
  "params":{"protocolVersion":"2025-03-26","capabilities":{},
  "clientInfo":{"name":"curl","version":"0"}}}'

# 2. List tools
curl -s "${H[@]}" "$URL" -d '{"jsonrpc":"2.0","id":2,"method":"tools/list"}'

# 3. Call a tool
curl -s "${H[@]}" "$URL" -d '{"jsonrpc":"2.0","id":3,"method":"tools/call",
  "params":{"name":"projects_list","arguments":{"limit":5}}}'

Example: Chat with an Agent

This walkthrough connects a client to one agent and holds a short conversation with it.

1. Get what you need

  • A Platform API key for the platform the agent belongs to (see Authentication).
  • The agent's unique_id. It is returned as unique_id when the agent is created, and it is the agent_id the agent-create tools take.
export IBLAI_API_KEY=<PLATFORM_API_KEY>
export AGENT_ID=<AGENT_UNIQUE_ID>

2. Connect the agent-chat server

Each agent-chat connection talks to one agent, named by the X-Agent-Unique-Id header. To talk to several agents, add one server entry per agent.

Claude Code:

claude mcp add --transport http iblai-agent-chat \
  https://asgi.data.iblai.app/mcp/agent-chat/ \
  --header "Authorization: Api-Token $IBLAI_API_KEY" \
  --header "X-Agent-Unique-Id: $AGENT_ID"

Cursor and other JSON-configured clients:

{
  "mcpServers": {
    "iblai-agent-chat": {
      "url": "https://asgi.data.iblai.app/mcp/agent-chat/",
      "headers": {
        "Authorization": "Api-Token <PLATFORM_API_KEY>",
        "X-Agent-Unique-Id": "<AGENT_UNIQUE_ID>"
      }
    }
  }
}

The server has one tool, get_mentor_response(prompt). In Claude Code, ask for it in plain language, for example "Ask the iblai agent what it can help me with".

3. Send messages over raw HTTP

URL=https://asgi.data.iblai.app/mcp/agent-chat/
H=(-H "Authorization: Api-Token $IBLAI_API_KEY" \
   -H "X-Agent-Unique-Id: $AGENT_ID" \
   -H "Content-Type: application/json" \
   -H "Accept: application/json, text/event-stream")

curl -s "${H[@]}" "$URL" -d '{"jsonrpc":"2.0","id":1,"method":"initialize",
  "params":{"protocolVersion":"2025-03-26","capabilities":{},
  "clientInfo":{"name":"curl","version":"0"}}}'

curl -s "${H[@]}" "$URL" -d '{"jsonrpc":"2.0","id":2,"method":"tools/call",
  "params":{"name":"get_mentor_response",
  "arguments":{"prompt":"Hi! In one sentence, what can you help me with?"}}}'

The agent's reply is the text of the result:

{"jsonrpc":"2.0","id":2,"result":{"content":[{"type":"text",
  "text":"I can answer questions, explain concepts, brainstorm ideas, write and edit text, and help with coding and problem-solving."}],
  "isError":false}}

4. Hold a conversation

Each get_mentor_response call is a new chat: the agent does not remember earlier calls. To continue a conversation, send the earlier turns with the new message. An MCP client such as Claude Code does this on its own when it writes the prompt; a script has to do it itself.

Without history, the third question has nothing to go on:

User:  My name is Sam and I'm planning a 3-day trip to Lisbon. Suggest one must-see place, in one sentence.
Agent: Sam, visit the Belem Tower, Lisbon's iconic riverside fortress and a UNESCO World Heritage Site.

User:  What is my name, and which city am I visiting?
Agent: I don't know your name or which city you're visiting - you haven't mentioned them in this conversation.

With the earlier turns included in each prompt, the agent follows along:

User:  My name is Sam and I'm planning a 3-day trip to Lisbon. Suggest one must-see place, in one sentence.
Agent: Visit Belem Tower, Lisbon's iconic riverside fortress and a must-see landmark.

User:  Great. What should I eat there? One sentence.
Agent: Try a warm pastel de nata, Lisbon's famous custard tart, from a local bakery in Belem.

User:  What is my name, and which city am I visiting?
Agent: Your name is Sam, and you're visiting Lisbon.

A minimal Python client that keeps the history:

import json
import os
import urllib.request

URL = "https://asgi.data.iblai.app/mcp/agent-chat/"
HEADERS = {
    "Authorization": f"Api-Token {os.environ['IBLAI_API_KEY']}",
    "X-Agent-Unique-Id": os.environ["AGENT_ID"],
    "Content-Type": "application/json",
    "Accept": "application/json, text/event-stream",
}


def rpc(method, params, id_=1):
    body = json.dumps({"jsonrpc": "2.0", "id": id_, "method": method, "params": params})
    req = urllib.request.Request(URL, data=body.encode(), headers=HEADERS, method="POST")
    text = urllib.request.urlopen(req, timeout=120).read().decode()
    # The reply may be a server-sent event; the JSON is on the "data:" line.
    for line in text.splitlines():
        if line.startswith("data:"):
            text = line[len("data:"):]
    return json.loads(text)


def ask(prompt):
    result = rpc("tools/call", {"name": "get_mentor_response", "arguments": {"prompt": prompt}})
    return result["result"]["content"][0]["text"]


rpc("initialize", {"protocolVersion": "2025-03-26", "capabilities": {},
                   "clientInfo": {"name": "chat-example", "version": "0"}})

history = []
for message in [
    "My name is Sam and I'm planning a 3-day trip to Lisbon. Suggest one must-see place, in one sentence.",
    "Great. What should I eat there? One sentence.",
    "What is my name, and which city am I visiting?",
]:
    prompt = message
    if history:
        prompt = "Conversation so far:\n" + "\n".join(history) + "\n\nUser: " + message
    reply = ask(prompt)
    history += [f"User: {message}", f"Assistant: {reply}"]
    print(f"User:  {message}\nAgent: {reply}\n")

Replies come from the agent's own model, prompt and knowledge, so wording varies between runs.


How Tools Are Generated

The platform publishes its public API under /v1 through the API facade. Each published route has a stable path, method, and SDK operation name. The built-in MCP servers read the same published route table and register one tool per route.

Only published /v1 routes become tools. Legacy /api/... URLs that are not part of /v1 have no tool. As more routes are published in /v1, their tools appear on the matching server with no client change beyond reconnecting.

Names follow the /v1 operation. A tool's name is the route's SDK operation name: the path segments joined with _, plus the action.

/v1 routeTool
GET /v1/agents/{agent_id}/settingsagents_settings_retrieve
PUT /v1/agents/{agent_id}/settingsagents_settings_update
GET /v1/projectsprojects_list
POST /v1/projectsprojects_create
PATCH /v1/projects/{id}projects_partial_update
DELETE /v1/projects/{id}projects_destroy

Actions are list, retrieve, create, update (PUT), partial_update (PATCH) and destroy. When two routes would get the same name, the later one gets a numeric suffix (_2).

Arguments come from the route's OpenAPI operation. Path parameters (such as agent_id), query parameters and request-body fields are all flat tool arguments. Read-only response fields are not arguments. The tool description lists the method, the /v1 path, and each parameter.

Server by namespace. The first /v1 path segment picks the server:

/v1 namespaceServer
agentsagent-create
analyticsanalytics
usersuser
search, recommendationssearch
workflowsworkflows
anything elseplatform

Streaming routes are skipped. Chat streaming and WebSocket routes (/v1/chat) are not tools. Use the agent-chat server for a single prompt and reply, or the chat API for streaming.


Tool Reference

The lists below match the routes published at the time of writing. Call tools/list for the current set.

Agent create (/mcp/agent-create/)

ToolRoutePurpose
agents_settings_retrieveGET /v1/agents/{agent_id}/settingsAgent settings
agents_settings_updatePUT /v1/agents/{agent_id}/settingsUpdate agent settings (display name, LLM, prompts, capabilities, ...)
agents_settings_public_retrieveGET /v1/agents/{agent_id}/settings/publicPublic agent settings
agents_memories_retrieveGET /v1/agents/{agent_id}/memoriesMemories grouped by category
agents_memories_list_retrieveGET /v1/agents/{agent_id}/memories-listMemories, paginated
agents_memories_createPOST /v1/agents/{agent_id}/memoriesAdd a memory (category_slug, content)
agents_memories_partial_updatePATCH /v1/agents/{agent_id}/memories/{memory_id}Edit a memory
agents_memories_destroyDELETE /v1/agents/{agent_id}/memories/{memory_id}Delete a memory
agents_skills_listGET /v1/agents/{agent_id}/skillsSkills assigned to the agent
agents_skills_createPOST /v1/agents/{agent_id}/skillsAssign an existing skill (skill is the skill id)
pingHealth check

category_slug must be an active memory category of that agent. New agents get the default categories, such as learning_goals and knowledge_gaps.

Platform (/mcp/platform/)

ToolRoutePurpose
sessions_listGET /v1/sessionsSessions in a date range
sessions_createPOST /v1/sessionsGet or create a chat session with an agent (mentor)
sessions_updatePUT /v1/sessions/{session_id}Session title and tools
sessions_recent_listGET /v1/sessions/recentRecent sessions
sessions_messages_retrieveGET /v1/sessions/{session_id}/messagesMessages in a session
sessions_messages_destroyDELETE /v1/sessions/{session_id}/messagesDelete every message in a session
sessions_sources_listGET /v1/sessions/{session_id}/sourcesSources retrieved in a session
sessions_guided_prompts_retrieveGET /v1/sessions/{session_id}/guided-promptsSuggested follow-up prompts
sessions_pinned_listGET /v1/sessions/pinnedPinned sessions
sessions_pinned_createPOST /v1/sessions/pinnedPin a session (session_id)
sessions_pinned_destroyDELETE /v1/sessions/pinnedUnpin a session (session_id)
chat_stop_createPOST /v1/chat/stopStop a running generation (generation_id)
projects_listGET /v1/projectsProjects
projects_createPOST /v1/projectsCreate a project
projects_retrieveGET /v1/projects/{id}One project
projects_updatePUT /v1/projects/{id}Replace a project
projects_partial_updatePATCH /v1/projects/{id}Edit a project
projects_destroyDELETE /v1/projects/{id}Delete a project
disclaimers_listGET /v1/disclaimersDisclaimers
disclaimers_createPOST /v1/disclaimersCreate a disclaimer
disclaimers_retrieveGET /v1/disclaimers/{id}One disclaimer
disclaimers_updatePUT /v1/disclaimers/{id}Replace a disclaimer
disclaimers_partial_updatePATCH /v1/disclaimers/{id}Edit a disclaimer
notifications_retrieveGET /v1/notificationsNotifications
notifications_updatePUT /v1/notificationsChange notification status
notifications_count_retrieveGET /v1/notifications/countNotification count
organization_metadata_retrieveGET /v1/organization/metadataOrganization metadata
organization_metadata_updatePUT /v1/organization/metadataReplace organization metadata
organization_metadata_partial_updatePATCH /v1/organization/metadataEdit organization metadata
configurations_chat_privacy_retrieveGET /v1/configurations/chat-privacyWhether users control chat privacy
configurations_chat_privacy_partial_updatePATCH /v1/configurations/chat-privacyChange that setting (admins)
configurations_chat_privacy_effective_retrieveGET /v1/configurations/chat-privacy/effectiveEffective chat-privacy mode
llms_listGET /v1/llmsAvailable LLMs
features_apps_listGET /v1/features/appsApps the user can access
memsearch_status_retrieveGET /v1/memsearch-statusWhether memory search is on
audit_logs_listGET /v1/audit-logsAudit log entries
rbac_permissions_check_createPOST /v1/rbac/permissions/checkCheck the caller's permissions on resources
pingHealth check

Hand-written tools

ServerToolPurpose
agent-chatget_mentor_response(prompt)Send one prompt to the agent in X-Agent-Unique-Id and return its reply
workflowsexecute_workflow(workflow_id, input_message, timeout?)Run an active workflow and return response, workflow_id and session_id
analyticsget_current_user()Username of the authenticated user
analyticsget_user_platforms()The platform the API key belongs to
analyticscount_users_in_platform(platform)Number of active users in a platform

Results and Errors

  • A tool returns the endpoint's JSON response as text: an object, a list, or a paginated {count, next, previous, results} envelope.
  • An endpoint error comes back the same way, for example {"error": "Category not found or inactive"} or a field validation map. The MCP call itself still succeeds, so check the body.
  • A DELETE or empty 201 response returns null.
  • Optional arguments that are not sent are left out of the request. false, 0 and empty strings are sent as given.

Troubleshooting

SymptomCauseFix
HTTP 401Missing or invalid Authorization headerSend Authorization: Api-Token <PLATFORM_API_KEY> with a valid key
HTTP 403 with a JSON RequestId body before any MCP responseAn edge firewall in front of the ASGI host blocks the pathOn a self-hosted deployment, allow /mcp/<server>/ on your ASGI host's edge firewall
HTTP 404, or 403 on a URL without the trailing slashWrong path, or the trailing slash is missingUse the paths in Servers, with the trailing slash
Could not authenticate the agent via X-Agent-Unique-IdThe header is missing, is not the agent's unique_id, names an agent outside the key's platform, or X-Agent-Unique-Id and X-Mentor-Unique-Id name different agentsSend the agent's unique_id, with a key created on that agent's platform
Mentor <id> not found. on an agent-create toolThe agent is not on the key's platformCreate the key on the agent's platform (see Authentication); get_user_platforms shows which platform the key belongs to
A tool you expect is missingIts route is not published in /v1 yetCall tools/list again after the route is published

Copyright Β© ibl.ai | support@iblai.zendesk.com