Trillet AI MCP Server
# Trillet AI MCP Server
A **Model Context Protocol (MCP)** server for the [Trillet AI](https://trillet.ai) voice and messaging platform.
Manage call agents, voice calls, conversation flows, messaging, and phone numbers through Claude Desktop, Claude Code, or any MCP-compatible client.
## Features
- **48 Tools** across 8 domains — full coverage of the Trillet API
- **Dual Transport** — stdio (local) + Streamable HTTP (remote)
- **TypeScript** with strict typing and Zod input validation
- **Built-in Rate Limiting** — token bucket (60 req/min)
- **Docker Ready** — optional, for hosting the HTTP transport
## Quick Start
### Prerequisites
- Node.js 18+
- A [Trillet AI](https://trillet.ai) account with an API key and workspace ID
### Install
```bash
git clone https://github.com/yourorg/trillet-mcp.git
cd trillet-mcp
npm install
npm run build
```
### Configure Claude Desktop
Add to your Claude Desktop config (`claude_desktop_config.json`):
```json
{
"mcpServers": {
"trillet": {
"command": "node",
"args": ["/absolute/path/to/trillet-mcp/dist/index.js"],
"env": {
"TRILLET_API_KEY": "your_api_key",
"TRILLET_WORKSPACE_ID": "your_workspace_id"
}
}
}
}
```
### Configure Claude Code
Add a `.mcp.json` to your project root:
```json
{
"mcpServers": {
"trillet": {
"command": "node",
"args": ["/absolute/path/to/trillet-mcp/dist/index.js"],
"env": {
"TRILLET_API_KEY": "your_api_key",
"TRILLET_WORKSPACE_ID": "your_workspace_id"
}
}
}
}
```
That's it — no Docker required for local use. Claude launches the server process directly.
---
## HTTP Transport (Optional)
For remote access (e.g., connecting from claude.ai), run with HTTP transport:
```bash
TRILLET_API_KEY=xxx TRILLET_WORKSPACE_ID=xxx TRANSPORT=http PORT=3000 node dist/index.js
```
Or use Docker:
```bash
cp .env.example .env
# Edit .env with your credentials
docker compose up -d --build
```
Health check: `curl http://localhost:3000/health`
MCP endpoint: `POST http://localhost:3000/mcp`
---
## Available Tools (48)
### Call Agents (5)
| Tool | Description |
|------|-------------|
| `trillet_list_agents` | List all voice call agents |
| `trillet_get_agent` | Get agent details by ID |
| `trillet_create_agent` | Create a new voice call agent |
| `trillet_update_agent` | Update an existing agent |
| `trillet_delete_agent` | Delete an agent |
### Omni Agents (5)
| Tool | Description |
|------|-------------|
| `trillet_list_omni_agents` | List all omni flow agents |
| `trillet_get_omni_agent` | Get omni agent details |
| `trillet_create_omni_agent` | Create a new omni agent |
| `trillet_update_omni_agent` | Update an omni agent |
| `trillet_delete_omni_agent` | Delete an omni agent |
### Calls (8)
| Tool | Description |
|------|-------------|
| `trillet_initiate_call` | Initiate an outbound voice call |
| `trillet_get_recording` | Get a call recording URL |
| `trillet_list_call_history` | List call history with filters |
| `trillet_start_batch` | Start a batch calling campaign |
| `trillet_get_batch_status` | Get batch campaign status |
| `trillet_get_batch_progress` | Get batch progress details |
| `trillet_list_batch_calls` | List individual calls in a batch |
| `trillet_cancel_batch` | Cancel a running batch |
### Call Flows (6)
| Tool | Description |
|------|-------------|
| `trillet_list_call_flows` | List all call flows |
| `trillet_get_call_flow` | Get call flow details |
| `trillet_create_call_flow` | Create a new call flow |
| `trillet_update_call_flow` | Update a call flow |
| `trillet_delete_call_flow` | Delete a call flow |
| `trillet_delete_kb_file` | Delete a knowledge base file from a flow |
### Message Flows (6)
| Tool | Description |
|------|-------------|
| `trillet_list_message_flows` | List all message flows |
| `trillet_get_message_flow` | Get message flow details |
| `trillet_create_message_flow` | Create a new message flow |
| `trillet_update_message_flow` | Update a message flow |
| `trillet_toggle_autopilot` | Toggle autopilot on a message flow |
| `trillet_delete_message_flow` | Delete a message flow |
### Conversations (7)
| Tool | Description |
|------|-------------|
| `trillet_list_conversations` | List conversations (optionally by flow) |
| `trillet_get_conversation` | Get conversation with messages |
| `trillet_handle_message_action` | Approve, edit, or reject a pending message |
| `trillet_generate_message` | Generate an AI reply for a conversation |
| `trillet_edit_customer_details` | Edit customer details on a conversation |
| `trillet_delete_conversation` | Delete a conversation |
| `trillet_delete_message` | Delete a specific message |
### Phone Numbers (4)
| Tool | Description |
|------|-------------|
| `trillet_list_phone_numbers` | List all phone numbers |
| `trillet_bind_phone_number` | Bind a number to an agent or flow |
| `trillet_release_phone_number` | Release a number from its binding |
| `trillet_register_phone_number` | Register an external phone number |
### Folders (7)
| Tool | Description |
|------|-------------|
| `trillet_list_folders` | List all folders |
| `trillet_get_folder` | Get folder details with flows |
| `trillet_create_folder` | Create a new folder |
| `trillet_update_folder` | Update a folder |
| `trillet_delete_folder` | Delete a folder |
| `trillet_add_flow_to_folder` | Add a flow to a folder |
| `trillet_remove_flow_from_folder` | Remove a flow from a folder |
---
## Environment Variables
| Variable | Required | Default | Description |
|----------|----------|---------|-------------|
| `TRILLET_API_KEY` | Yes | — | Your Trillet API key |
| `TRILLET_WORKSPACE_ID` | Yes | — | Your Trillet workspace ID |
| `TRANSPORT` | No | `stdio` | `stdio` or `http` |
| `PORT` | No | `3000` | HTTP transport port |
| `DEBUG` | No | `false` | Enable debug logging |
---
## Usage Examples
Once connected to Claude:
```
"List all my call agents"
"Create a new call flow named 'Support Line' for inbound calls"
"Initiate a call to +1234567890 using agent abc123"
"Show me conversations for flow xyz"
"Approve the pending message in conversation 456"
"Start a batch campaign with these contacts..."
```
---
## Project Structure
```
trillet-mcp/
├── src/
│ ├── index.ts # Server entry (dual transport)
│ ├── constants.ts # Base URL, rate limits
│ ├── types.ts # TypeScript interfaces
│ ├── schemas/ # Zod input validation
│ │ ├── common.ts
│ │ ├── agents.ts
│ │ ├── omni-agents.ts
│ │ ├── calls.ts
│ │ ├── call-flows.ts
│ │ ├── message-flows.ts
│ │ ├── conversations.ts
│ │ ├── phone-numbers.ts
│ │ └── folders.ts
│ ├── services/
│ │ ├── trillet-client.ts # API client with rate limiting
│ │ └── formatters.ts # Response formatters
│ └── tools/ # Tool registrations (8 domains)
├── Dockerfile
├── docker-compose.yml
├── package.json
└── tsconfig.json
```
---
## License
MIT
TDQS
Scored across 48 tools
Most tools target a clearly distinct resource+action pair (voice agents, omni agents, call flows, message flows, folders, phone numbers, batches, conversations). A few boundaries are fuzzy: get_batch_status vs get_batch_progress, and the voice-agent / call-flow / omni-agent trio requires careful reading since each has parallel CRUD sets. Overall an agent can pick correctly with the descriptions provided.
Strong, predictable pattern: trillet_ + snake_case verb_noun (list_/get_/create_/update_/delete_) applied uniformly across every resource. Minor deviations exist, e.g. edit_customer_details instead of update_, and ad-hoc verbs like bind/release/register/toggle/handle that don't fit the CRUD verb set, but they remain readable and unambiguous.
48 tools is very heavy, and several are near-duplicates from parallel resource families (voice agent, omni agent, call flow, message flow each get 5-6 near-identical CRUD tools). The domain is broad, but consolidation (e.g. merging batch status/progress, or generic resource CRUD) would meaningfully reduce surface noise.
Coverage is largely complete: full CRUD for agents, omni agents, call flows, message flows, and folders, plus phone number lifecycle, outbound calls, batch operations, and conversation/message handling. The main gap is knowledge base files, which can only be deleted (delete_kb_file) with no list or upload, and there is no conversation update beyond customer details.