@abhinavyadav/bolna-mcp 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +120 -198
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,87 +1,104 @@
1
1
  # Bolna MCP Server
2
2
 
3
- A production-ready [Model Context Protocol (MCP)](https://modelcontextprotocol.io) server that exposes the full [Bolna Voice AI](https://api.bolna.ai) platform as MCP tools. Connect any MCP-compatible AI client (Claude Desktop, Cursor, etc.) to Bolna so you can create and manage voice agents, make and monitor calls, run batch campaigns, manage knowledgebases, and handle phone numbers all through natural language.
3
+ [![npm version](https://img.shields.io/npm/v/@abhinavyadav/bolna-mcp.svg)](https://www.npmjs.com/package/@abhinavyadav/bolna-mcp)
4
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
5
+
6
+ Manage voice AI agents, make calls, run campaigns, and more — through natural language.
7
+
8
+ ## Supported Features
9
+
10
+ ### 🤖 Agents
11
+
12
+ Build and manage AI voice agents on the Bolna platform.
13
+
14
+ **Create & Configure** — Create agents with custom system prompts, voices, and task configs
15
+
16
+ **Manage** — Get, list, update, patch, and delete agents
17
+
18
+ **Control** — Stop all queued calls for an agent instantly
4
19
 
5
20
  ---
6
21
 
7
- ## Prerequisites
22
+ ### 📞 Calls
23
+
24
+ Make and manage outbound voice calls.
25
+
26
+ **Outbound Calls** — Initiate calls with optional scheduling, retry logic, and dynamic user context
8
27
 
9
- - **Node.js 18+**
10
- - A **Bolna API key** — sign up at [bolna.ai](https://bolna.ai) and find your key in the dashboard
28
+ **Call Control** — Stop an active call at any time
11
29
 
12
30
  ---
13
31
 
14
- ## Installation
32
+ ### 📋 Batch Campaigns
15
33
 
16
- ```bash
17
- # 1. Clone or download the repository
18
- git clone https://github.com/your-org/bolna-mcp.git
19
- cd bolna-mcp
34
+ Run outbound call campaigns at scale.
20
35
 
21
- # 2. Install dependencies
22
- npm install
36
+ **Create & Schedule** — Upload a list of numbers and schedule campaigns
23
37
 
24
- # 3. Build the TypeScript source
25
- npm run build
26
- ```
38
+ **Monitor** Track batch status, call counts, and execution history
27
39
 
28
- The compiled server will be available at `dist/index.js`.
40
+ **Control** Stop running batches or delete them
29
41
 
30
42
  ---
31
43
 
32
- ## MCP Client Configuration
33
-
34
- The Bolna MCP server runs as a background process. Here is how you can add it to your favorite MCP clients:
35
-
36
- > [!TIP]
37
- > **How to get the absolute path to `dist/index.js` on your machine:**
38
- >
39
- > First, ensure you have navigated (using `cd`) into the root of the cloned `bolna-mcp` directory. Then run:
40
- > - **macOS / Linux**: Run:
41
- > ```bash
42
- > echo "$(pwd)/dist/index.js"
43
- > ```
44
- > - **Windows (PowerShell)**: Run:
45
- > ```powershell
46
- > (Get-Item .).FullName + "\dist\index.js"
47
- > ```
48
- > - **Windows (Command Prompt)**: Run:
49
- > ```cmd
50
- > echo %cd%\dist\index.js
51
- > ```
52
- > Use the resulting path (e.g., `/Users/username/Developer/bolna-mcp/dist/index.js`) as the replacement for `/path/to/bolna-mcp/dist/index.js` in the configs below.
53
-
54
- ### 1. Claude Desktop App
55
- Add the following to your Claude Desktop configuration file:
56
- - **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
57
- - **Windows**: `%APPDATA%\Claude\claude_desktop_config.json`
44
+ ### 📊 Call History
45
+
46
+ **Executions** Retrieve full call details including transcripts, recording URLs, and telephony data
47
+
48
+ **Raw Logs** — Access low-level call logs for debugging
49
+
50
+ ---
51
+
52
+ ### 📚 Knowledgebases
53
+
54
+ **Create** — Build knowledgebases from PDF files (base64) or web URLs
55
+
56
+ **Manage** List, get, and delete knowledgebases
57
+
58
+ ---
59
+
60
+ ### 📱 Phone Numbers
61
+
62
+ **Search & Buy** — Find and purchase phone numbers for your account
63
+
64
+ **Inbound Routing** Link phone numbers to agents for inbound call handling
65
+
66
+ ---
67
+
68
+ ### 🎯 Dispositions
69
+
70
+ **Extraction** — Define structured outputs to extract from call transcripts
71
+
72
+ **Bulk & Test** — Create multiple dispositions at once and test them against sample transcripts
73
+
74
+ ---
75
+
76
+ ### 🔌 Providers & Integrations
77
+
78
+ **Providers** — Add, list, and remove telephony / LLM / TTS providers
79
+
80
+ **Custom LLMs** — Plug in your own LLM endpoint
81
+
82
+ ---
83
+
84
+ ### 🏢 Sub-Accounts & SIP Trunks
85
+
86
+ **Sub-Accounts** — Create and manage sub-accounts with usage tracking
87
+
88
+ **SIP Trunks** — Configure SIP trunks and manage their associated numbers
89
+
90
+ ---
91
+
92
+ ## Quick Start
93
+
58
94
 
59
- ```json
60
- {
61
- "mcpServers": {
62
- "bolna": {
63
- "command": "node",
64
- "args": ["/path/to/bolna-mcp/dist/index.js"],
65
- "env": {
66
- "BOLNA_API_KEY": "your_api_key_here"
67
- }
68
- }
69
- }
70
- }
71
- ```
72
95
 
73
- ### 2. Claude Code (CLI)
74
- You can add the Bolna MCP server to Claude Code by running:
75
- ```bash
76
- claude mcp add node /path/to/bolna-mcp/dist/index.js --env BOLNA_API_KEY=your_api_key_here
77
- ```
78
- Or manually configure it in your `~/.claude.json` configuration file:
79
96
  ```json
80
97
  {
81
98
  "mcpServers": {
82
99
  "bolna": {
83
- "command": "node",
84
- "args": ["/path/to/bolna-mcp/dist/index.js"],
100
+ "command": "npx",
101
+ "args": ["-y", "@abhinavyadav/bolna-mcp"],
85
102
  "env": {
86
103
  "BOLNA_API_KEY": "your_api_key_here"
87
104
  }
@@ -90,17 +107,24 @@ Or manually configure it in your `~/.claude.json` configuration file:
90
107
  }
91
108
  ```
92
109
 
93
- ### 3. Antigravity / Codex (Antigravity CLI / IDE)
94
- Antigravity (Codex) loads its configuration from:
95
- - **Path**: `~/.gemini/config/mcp_config.json`
110
+ Get your API key at [bolna.ai](https://bolna.ai) Dashboard → API Keys.
111
+
112
+ ---
113
+
114
+ ## Setup Instructions
115
+
116
+ ### Claude Desktop
117
+
118
+ Config file:
119
+ - **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
120
+ - **Windows**: `%APPDATA%\Claude\claude_desktop_config.json`
96
121
 
97
- Add the server configuration under `mcpServers`:
98
122
  ```json
99
123
  {
100
124
  "mcpServers": {
101
125
  "bolna": {
102
- "command": "node",
103
- "args": ["/path/to/bolna-mcp/dist/index.js"],
126
+ "command": "npx",
127
+ "args": ["-y", "@abhinavyadav/bolna-mcp"],
104
128
  "env": {
105
129
  "BOLNA_API_KEY": "your_api_key_here"
106
130
  }
@@ -109,25 +133,25 @@ Add the server configuration under `mcpServers`:
109
133
  }
110
134
  ```
111
135
 
112
- ### 4. Cursor
113
- 1. Open Cursor and navigate to **Settings** (Gear icon in top right) -> **Features** -> **MCP**.
114
- 2. Click **+ Add New MCP Server**.
115
- 3. Fill out the fields:
136
+ ### Cursor
137
+
138
+ 1. Open **Settings** **Features** → **MCP**
139
+ 2. Click **+ Add New MCP Server**
140
+ 3. Set:
116
141
  - **Name**: `bolna`
117
142
  - **Type**: `command`
118
- - **Command**: `env BOLNA_API_KEY=your_api_key_here node /path/to/bolna-mcp/dist/index.js`
143
+ - **Command**: `env BOLNA_API_KEY=your_api_key_here npx -y @abhinavyadav/bolna-mcp`
144
+
145
+ ### Windsurf
119
146
 
120
- ### 5. Windsurf
121
- Windsurf reads its configuration from:
122
- - **Path**: `~/.codeium/windsurf/mcp_config.json`
147
+ Config file: `~/.codeium/windsurf/mcp_config.json`
123
148
 
124
- Add the server under `mcpServers`:
125
149
  ```json
126
150
  {
127
151
  "mcpServers": {
128
152
  "bolna": {
129
- "command": "node",
130
- "args": ["/path/to/bolna-mcp/dist/index.js"],
153
+ "command": "npx",
154
+ "args": ["-y", "@abhinavyadav/bolna-mcp"],
131
155
  "env": {
132
156
  "BOLNA_API_KEY": "your_api_key_here"
133
157
  }
@@ -136,18 +160,17 @@ Add the server under `mcpServers`:
136
160
  }
137
161
  ```
138
162
 
139
- ### 6. VS Code (via extensions like Cline / Roo Code)
140
- If you use Cline or Roo Code inside VS Code, they read their MCP configurations from:
163
+ ### VS Code (Cline / Roo Code)
164
+
165
+ Config file:
141
166
  - **macOS**: `~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json`
142
- - **Windows**: `%APPDATA%\Code\User\globalStorage\saoudrizwan.claude-dev\settings\cline_mcp_settings.json`
143
167
 
144
- Add the configuration block:
145
168
  ```json
146
169
  {
147
170
  "mcpServers": {
148
171
  "bolna": {
149
- "command": "node",
150
- "args": ["/path/to/bolna-mcp/dist/index.js"],
172
+ "command": "npx",
173
+ "args": ["-y", "@abhinavyadav/bolna-mcp"],
151
174
  "env": {
152
175
  "BOLNA_API_KEY": "your_api_key_here"
153
176
  }
@@ -156,137 +179,36 @@ Add the configuration block:
156
179
  }
157
180
  ```
158
181
 
159
- > [!IMPORTANT]
160
- > Make sure to replace `/path/to/bolna-mcp` with the absolute path where the repository is located on your local machine, and set your real Bolna API key.
161
-
162
- ---
163
-
164
- ## Available Tools
165
-
166
- ### 🤖 Agents
167
- | Tool | Description |
168
- |------|-------------|
169
- | `bolna_create_agent` | Create a new voice AI agent with system prompt and task config |
170
- | `bolna_get_agent` | Retrieve full configuration of an agent by ID |
171
- | `bolna_list_agents` | List all agents in your account (paginated) |
172
- | `bolna_update_agent` | Update an existing agent's config or system prompt |
173
- | `bolna_delete_agent` | Permanently delete an agent |
174
-
175
- ### 📞 Calls
176
- | Tool | Description |
177
- |------|-------------|
178
- | `bolna_make_call` | Initiate an outbound call with optional scheduling and retry logic |
179
- | `bolna_stop_call` | Immediately terminate an active call |
180
-
181
- ### 📋 Batch Campaigns
182
- | Tool | Description |
183
- |------|-------------|
184
- | `bolna_create_batch` | Upload a CSV of phone numbers to create a batch campaign |
185
- | `bolna_schedule_batch` | Schedule a batch to run at a specific datetime |
186
- | `bolna_stop_batch` | Stop a running batch and cancel pending calls |
187
- | `bolna_get_batch` | Get status and call counts for a batch |
188
- | `bolna_list_batches` | List all batches for an agent (paginated) |
189
- | `bolna_get_batch_executions` | List all call executions within a batch |
190
-
191
- ### 📊 Call History (Executions)
192
- | Tool | Description |
193
- |------|-------------|
194
- | `bolna_get_execution` | Get full call details: transcript, recording URL, telephony data |
195
- | `bolna_list_agent_executions` | List all call executions for an agent (paginated) |
196
-
197
- ### 📚 Knowledgebases
198
- | Tool | Description |
199
- |------|-------------|
200
- | `bolna_create_knowledgebase` | Create a knowledgebase from a PDF file (base64) or a web URL |
201
- | `bolna_list_knowledgebases` | List all knowledgebases with status and metadata |
202
- | `bolna_delete_knowledgebase` | Delete a knowledgebase |
182
+ ### Claude Code (CLI)
203
183
 
204
- ### 📱 Phone Numbers
205
- | Tool | Description |
206
- |------|-------------|
207
- | `bolna_search_phone_numbers` | Search available numbers by country, area code, or pattern |
208
- | `bolna_buy_phone_number` | Purchase a phone number for your account |
209
- | `bolna_list_phone_numbers` | List all phone numbers on your account |
184
+ ```bash
185
+ claude mcp add npx -- -y @abhinavyadav/bolna-mcp --env BOLNA_API_KEY=your_api_key_here
186
+ ```
210
187
 
211
188
  ---
212
189
 
213
- ## Example Claude Prompts
190
+ ## Example Prompts
214
191
 
215
- ### 1. Create an agent and make a test call
216
192
  ```
217
- Create a Hindi appointment booking agent for a hospital.
218
- The agent should greet callers warmly, collect their name and preferred appointment time,
219
- and confirm the booking. Then make a test call to +919999999999 using that agent.
193
+ Call +919999999999 using my "Demo Agent" and pass candidate name as "Rahul Sharma", age 25.
220
194
  ```
221
195
 
222
- ### 2. Review batch call results
223
196
  ```
224
- Show me all call executions for agent <agent_id> from the last batch.
225
- Include the transcript and recording URL for any calls that lasted more than 2 minutes.
197
+ Create a Hindi appointment booking agent for a hospital, then make a test call to +919999999999.
226
198
  ```
227
199
 
228
- ### 3. Purchase an Indian phone number
229
200
  ```
230
- Search for available Indian phone numbers with area code 080 (Bangalore).
231
- Show me the top 3 options with their prices, then buy the cheapest one using Twilio as the provider.
201
+ Show me all executions for agent <agent_id>. Include transcripts for calls longer than 2 minutes.
232
202
  ```
233
203
 
234
- ---
235
-
236
- ## Environment Variables
237
-
238
- | Variable | Required | Description |
239
- |----------|----------|-------------|
240
- | `BOLNA_API_KEY` | ✅ Yes | Your Bolna platform API key |
241
-
242
- ---
243
-
244
- ## Development
245
-
246
- ```bash
247
- # Run in development mode (no build step)
248
- BOLNA_API_KEY=your_key npm run dev
249
-
250
- # Build for production
251
- npm run build
252
-
253
- # Run built server
254
- BOLNA_API_KEY=your_key npm start
255
204
  ```
256
-
257
- ---
258
-
259
- ## Testing
260
-
261
- The project ships with a Jest + ts-jest test suite located in `src/__tests__/`. Tests are entirely offline — no real API calls are made; the Bolna client is fully mocked.
262
-
263
- ```bash
264
- # Run all tests
265
- BOLNA_API_KEY=any-value npm test
266
-
267
- # Run with coverage report
268
- BOLNA_API_KEY=any-value npm run test:coverage
205
+ Create a batch campaign for agent <agent_id> and schedule it for tomorrow at 10 AM IST.
269
206
  ```
270
207
 
271
- ### Test Coverage
272
-
273
- | File | Statements | Branches | Functions | Lines |
274
- |------|-----------|----------|-----------|-------|
275
- | `client.ts` | 95% | 78% | 100% | 95% |
276
- | `calls.ts` | 100% | 96% | 100% | 100% |
277
- | `agents.ts` | 33% | 6% | 50% | 33% |
278
-
279
- > **Note**: `agents.ts` coverage is intentionally lower — the test suite focuses on `list`, `get`, and `delete` endpoints (most commonly used). More tool coverage can be added to `src/__tests__/agents.test.ts`.
280
-
281
- ### Test Files
282
-
283
- | File | What's tested |
284
- |------|---------------|
285
- | `src/__tests__/calls.test.ts` | `bolna_make_call` (6 cases) + `bolna_stop_call` (2 cases) |
286
- | `src/__tests__/agents.test.ts` | `bolna_list_agents`, `bolna_get_agent`, `bolna_delete_agent` |
287
- | `src/__tests__/client.test.ts` | `handleAxiosError` (4 cases) + `bolnaClient` factory (3 cases) |
208
+ ```
209
+ Search for Indian phone numbers in area code 080, show the top 3 with prices, then buy the cheapest.
210
+ ```
288
211
 
289
- ---
290
212
 
291
213
  ## License
292
214
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abhinavyadav/bolna-mcp",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "MCP server for the Bolna Voice AI platform — manage agents, calls, batches, knowledgebases, and phone numbers through natural language",
5
5
  "main": "dist/index.js",
6
6
  "bin": {