Aima MCP
Connect Claude, Cursor, Codex, and other MCP clients to operate your AIMA Labs organization programmatically.
The Aima MCP server lets AI assistants drive your AIMA Labs account — list agents, create campaigns, dispatch calls, connect WhatsApp, and more — without leaving the chat. It exposes the same capabilities as the CLI and the /api/cli REST API, packaged as Model Context Protocol tools.
Every request is scoped to a single organization via an API key. There is no cross-tenant access.
Endpoint and authentication
| Item | Value |
|---|---|
| URL | https://app.aimalabs.io/api/mcp (self-hosted deployments use your own API host + /api/mcp) |
| Transport | Streamable HTTP (stateless) |
| Auth | Authorization: Bearer <api_key> on every request |
API keys are organization-scoped. Create one under Settings → Organization → Developers → API keys. Keys use the api_… prefix.
The MCP server and CLI share the same key type. A key that works for aima status works for MCP.
Connect your client
Setup snippets also appear on the dashboard under Settings → Organization → Developers in the Use Aima from Claude card.
Claude (web)
- Open Claude → Customize → Connectors.
- Click Add custom connector.
- Paste
https://app.aimalabs.io/api/mcpas the connector URL. - Authenticate with your API key when prompted.
Claude Code
claude mcp add --transport http aima https://app.aimalabs.io/api/mcp \
--header "Authorization: Bearer YOUR_API_KEY"Cursor
One-click: use the Add to Cursor deeplink on the Developers page (pre-fills the endpoint).
Manual: add to ~/.cursor/mcp.json:
{
"mcpServers": {
"aima": {
"url": "https://app.aimalabs.io/api/mcp",
"headers": {
"Authorization": "Bearer YOUR_API_KEY"
}
}
}
}After editing mcp.json, reload the Cursor window so new servers are picked up.
Codex
export AIMA_API_KEY="YOUR_API_KEY"
codex mcp add aima --url https://app.aimalabs.io/api/mcp --bearer-token-env-var AIMA_API_KEYOr add to ~/.codex/config.toml:
[mcp_servers.aima]
url = "https://app.aimalabs.io/api/mcp"
http_headers = { Authorization = "Bearer YOUR_API_KEY" }How tools work
Each MCP tool maps to one agent action in the AIMA backend — the same handler the CLI calls. Tool names use dotted notation (for example agents.list). Input parameters match the action's typed schema; responses are JSON.
Errors from the platform surface as MCP tool errors with the same detail message you would see from the CLI or REST API.
Currently exposed tools
The hosted server is rolling out tool-by-tool. Today these read-only tools are live:
| Tool | Description |
|---|---|
agents.list | List agent personas in your organization. Optional limit (1–200, default 100). |
voices.list | List voices available for campaigns. Optional filters: language, voice_type, provider, is_active. |
Call list_tools from your client to see the exact set enabled on your deployment.
Full catalog (mirrors CLI)
The MCP server is built from a single action registry shared with the CLI. As rollout completes, every tool below will be available over MCP with the same inputs and outputs as the matching CLI command.
Agents
| Tool | Description |
|---|---|
agents.list | List agent personas, newest first. |
agents.get | Fetch one agent by agent_id (includes system prompt). |
agents.create | Create a reusable agent (name, company_name, optional language, system_prompt, selected_voice_id). |
agents.update | Partial update by agent_id; only provided fields change. |
Voices
| Tool | Description |
|---|---|
voices.list | List voices (system + your own), with optional language/type/provider filters. |
Campaigns
| Tool | Description |
|---|---|
campaigns.list | List campaigns. Optional is_active, limit. |
campaigns.create | Atomically create a campaign, its agent, and extraction fields. Supports voice, whatsapp, and hybrid types. |
campaigns.update | Partial update: title, agent_id, extra_context, is_active. |
Leads
| Tool | Description |
|---|---|
leads.list | List leads. Optional campaign_id, search, limit. |
leads.add_test | Add test leads (name + E.164 phone_number) to a campaign — no dispatch. |
leads.upload_csv | Bulk-create from CSV text plus column mapping. |
leads.status | Lead status with latest call, conversation, and extracted field values. |
leads.initiate | Send the campaign's WhatsApp template to one lead (consumes WhatsApp lead quota). |
Calls
| Tool | Description |
|---|---|
calls.list | List calls. Optional campaign_id, limit. |
calls.dispatch | Place a real outbound voice call to a lead immediately. |
| Tool | Description |
|---|---|
whatsapp.create_connect_session | Start browser connect for embedded signup or coexistence. |
whatsapp.connect_session_status | Poll a connect session. |
whatsapp.config | Facebook App ID and Config ID for OAuth. |
whatsapp.register | Register credentials from an OAuth authorization code. |
whatsapp.list_credentials | List WhatsApp Business credentials on the account. |
whatsapp.validate_credentials | Live Meta API validation. |
whatsapp.list_templates | List APPROVED message templates for a credentials_id. |
whatsapp.delete_credentials | Remove a credentials record. |
Phone numbers
| Tool | Description |
|---|---|
phones.list | Phone numbers rented by your organization. |
phones.available | Numbers available to rent from platform inventory. |
phones.rent | Rent an available number. |
phones.release | Release a rented number by assignment_id. |
Usage and stats
| Tool | Description |
|---|---|
usage.get | Current-month voice minutes and WhatsApp leads as used / total. |
stats.overall | Overall performance: lead counts, response rate, qualification rates. Optional campaign_id, days. |
stats.funnel | Conversion funnel: leads → initiated → responded → completed → qualified. |
stats.daily | Daily time-series of leads, conversations, messages, and outcomes. |
MCP vs agent tool integrations
AIMA uses MCP in two different ways. This page documents the control-plane server (/api/mcp) for operating your account from an external AI client.
The other use is agent tool servers — external MCP endpoints your voice or WhatsApp agents call mid-conversation to look up orders, check inventory, or trigger actions in your own systems. Those are registered under Integrations and bound per campaign. See Integrations.
Aima MCP (/api/mcp) | Agent tool servers | |
|---|---|---|
| Who calls it | You, via Claude / Cursor / Codex | Your AI sales agent during a live call or chat |
| Auth | Organization API key | Per-server URL + headers you configure |
| Purpose | Manage campaigns, leads, calls | Give agents real-time access to your business systems |
Tips for AI agents
- Prefer read-only tools (
agents.list,campaigns.list,leads.status) before mutating operations. calls.dispatchandleads.initiateplace real outbound contact and consume quota — confirm with the user first.- Cross-tenant IDs return
404(not403) by design; treat a missing resource as "not found or not yours." - For scripting outside MCP, use the CLI with
AIMA_OUTPUT=jsonfor the same data shapes.
Related
- CLI reference — terminal access to the same capabilities
- Integrations — Google Calendar, agent MCP bindings, Leadsforce
- Getting Started — account and organization setup