Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.usetitan.app/llms.txt

Use this file to discover all available pages before exploring further.

The Model Context Protocol (MCP) is an open standard that lets AI assistants call external tools. Titan implements MCP so that agents running in Claude Desktop, Claude Code, Cursor, or any custom MCP client can send WhatsApp messages, manage sessions, configure webhooks, and more — all through structured tool calls rather than raw HTTP. Titan’s MCP server exposes 76 tools across 14 domains, with a 1:1 mapping to every REST API endpoint. It also provides 3 resources for reading live state and 3 prompt templates to help agents get started quickly.

What’s included

76 tools

Every REST API endpoint is available as an MCP tool, organized across Sessions, Messaging, Contacts, Groups, Channels, Presence, Profile, Labels, Chats, Webhooks, Pairing, LIDs, Media, and Client Tokens.

3 resources

titan://sessions, titan://info, and titan://webhooks give agents direct read access to live session state, server info, and webhook configuration without calling a tool.

3 prompt templates

Built-in prompts for send_message, setup_session, and configure_webhooks help agents understand how to use the tools correctly.

2 transport modes

stdio for local clients like Claude Desktop and Cursor; Streamable HTTP for web-based agents and Docker deployments.

Connecting Claude Desktop (stdio)

stdio mode runs the MCP server as a subprocess managed by Claude Desktop. Add the following to your Claude Desktop configuration file: ~/.config/Claude/claude_desktop_config.json (Linux / macOS: ~/Library/Application Support/Claude/claude_desktop_config.json):
{
  "mcpServers": {
    "titan": {
      "command": "docker",
      "args": [
        "run", "--rm", "-i",
        "-e", "TITAN_API_KEY=titan_...",
        "-e", "TITAN_BASE_URL=https://api.example.com",
        "titanapi/mcp"
      ]
    }
  }
}
Replace titan_... with your API key and https://api.example.com with your Titan API base URL. Restart Claude Desktop after saving the file.

Connecting via HTTP (web agents and Docker)

HTTP mode runs the MCP server as a persistent process and exposes an endpoint that any MCP client can call over the network:
docker run -p 3100:3100 \
  -e TITAN_API_KEY=titan_... \
  -e TITAN_BASE_URL=https://api.example.com \
  -e TITAN_MCP_TRANSPORT=http \
  titanapi/mcp
The MCP endpoint is available at http://localhost:3100/mcp. Point your MCP client at this URL. For self-hosted Docker Compose deployments, a titan-mcp service is included in the official Compose file.

Connecting Claude Code or Cursor

For Claude Code (~/.claude/claude_desktop_config.json) and Cursor, use the same stdio configuration format shown above. Both tools read from the same MCP config file location.
Use pair_code instead of pair_qr when pairing sessions through an AI agent — the 8-digit pairing code is plain text and easy for an agent to relay, while QR codes require a camera.

API key scopes

The MCP server uses the API key you provide and inherits its permissions. Tools will return errors if the key lacks the required scope for the operation.
DomainRequired scope
Sessions (read)sessions:read
Sessions (manage), Pairingsessions:manage
Messagesmessages:write
Chatschats:manage
Groups (read)groups:read
Groups (manage)groups:manage
Contacts (read)contacts:read
Contacts (manage)contacts:manage
Channels (read)channels:read
Channels (manage)channels:manage
Presence (read)presence:read
Presence (write)presence:write
Profile (read)profile:read
Profile (write)profile:write
Labels (read)labels:read
Labels (manage)labels:manage
Webhookswebhooks:manage
Media (read)media:read
Media (manage)media:manage
For full access, use a key with all scopes (*). For restricted agents that should only send messages, issue a key scoped to messages:write sessions:read.
Issue the most restrictive key your agent needs. An agent that only sends notifications doesn’t need webhooks:manage or groups:manage.

Tool reference

All 76 tools follow a consistent naming pattern: domain_action (for example, sessions_list, messages_send, groups_add_participants).
ToolDescription
sessions_listList all sessions with status
sessions_createCreate a new session
sessions_getGet session details
sessions_updateUpdate session configuration
sessions_deleteDelete a session
sessions_startStart and connect a session
sessions_stopStop and disconnect a session
sessions_restartRestart a session
sessions_logoutLog out and unpair the device
sessions_meGet linked account info
ToolDescription
pair_qrGet a QR code for pairing (returns base64 PNG)
pair_codeGet an 8-digit pairing code for a phone number
ToolDescription
messages_sendSend a message (text, image, video, audio, document, poll, location, contact, sticker)
messages_seenMark messages as read
messages_typingSend a typing indicator
messages_reactReact to a message with an emoji
messages_starStar or unstar a message
ToolDescription
chats_edit_messageEdit a sent message
chats_delete_messageDelete a message for everyone
chats_archiveArchive a chat
chats_unarchiveUnarchive a chat
ToolDescription
groups_listList all groups
groups_createCreate a group
groups_getGet group info
groups_deleteDelete or disband a group
groups_leaveLeave a group
groups_set_subjectSet the group name
groups_set_descriptionSet the group description
groups_get_invite_codeGet the invite link
groups_revoke_inviteRevoke the invite link and generate a new one
groups_get_participantsList participants
groups_add_participantsAdd members
groups_remove_participantsRemove members
groups_promotePromote participants to admin
groups_demoteDemote admins
groups_set_pictureSet the group profile picture
groups_join_infoGet group info from an invite code
groups_joinJoin a group via invite code
ToolDescription
contacts_listList all contacts
contacts_getGet contact info
contacts_checkCheck if phone numbers are registered on WhatsApp
contacts_pictureGet a contact’s profile picture
contacts_blockBlock a contact
contacts_unblockUnblock a contact
ToolDescription
channels_listList followed channels
channels_createCreate a channel
channels_getGet channel info
channels_deleteDelete a channel
channels_followFollow a channel
channels_unfollowUnfollow a channel
channels_muteMute channel notifications
channels_unmuteUnmute channel notifications
ToolDescription
presence_setSet online or offline status
presence_get_allGet presence for all contacts
presence_get_chatGet presence for a specific chat
presence_subscribeSubscribe to presence updates for a chat
ToolDescription
profile_getGet own profile
profile_set_nameSet display name
profile_set_statusSet about text
profile_set_pictureSet profile picture
profile_delete_pictureRemove profile picture
ToolDescription
labels_listList all labels
labels_createCreate a label
labels_updateUpdate a label
labels_deleteDelete a label
labels_get_chatGet labels assigned to a chat
labels_set_chatSet labels on a chat
ToolDescription
webhooks_listList webhooks
webhooks_createCreate a webhook
webhooks_getGet webhook details
webhooks_updateUpdate a webhook
webhooks_deleteDelete a webhook
ToolDescription
media_downloadDownload a media file
media_infoGet media metadata
media_persistSave media to S3 storage
ToolDescription
lids_resolveResolve phone number JIDs to or from Linked Device IDs
ToolDescription
info_versionGet server version
info_statusGet server status

JID format reference

Most tools that target a specific WhatsApp user or group require a JID (Jabber ID). Use these formats:
EntityFormatExample
User{phone}@s.whatsapp.net[email protected]
Group{phone}-{timestamp}@g.us[email protected]
Channel{id}@newsletter120363...@newsletter
Status broadcaststatus@broadcaststatus@broadcast