@nordsym/apiclaw 1.4.2 โ†’ 1.4.3

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 (48) hide show
  1. package/AGENTS.md +115 -0
  2. package/CHANGELOG.md +78 -0
  3. package/CONTRIBUTING.md +84 -0
  4. package/README.md +178 -438
  5. package/convex/_generated/api.d.ts +4 -0
  6. package/convex/adminActivate.ts +54 -0
  7. package/convex/mou.ts +74 -0
  8. package/convex/schema.ts +20 -0
  9. package/convex/workspaces.ts +76 -0
  10. package/landing/.env.local.stripe +2 -0
  11. package/landing/package-lock.json +916 -2
  12. package/landing/package.json +2 -0
  13. package/landing/public/.well-known/ai-plugin.json +17 -0
  14. package/landing/public/llms-full.txt +322 -0
  15. package/landing/public/llms.txt +61 -72
  16. package/landing/public/robots.txt +28 -0
  17. package/landing/src/app/admin/page.tsx +1 -1
  18. package/landing/src/app/api/auth/magic-link/route.ts +1 -1
  19. package/landing/src/app/api/auth/session/route.ts +1 -1
  20. package/landing/src/app/api/auth/verify/route.ts +1 -1
  21. package/landing/src/app/api/billing/checkout/route.ts +1 -1
  22. package/landing/src/app/api/billing/payment-method/route.ts +1 -1
  23. package/landing/src/app/api/billing/portal/route.ts +1 -1
  24. package/landing/src/app/api/mou/sign/route.ts +314 -0
  25. package/landing/src/app/api/stripe/webhook/route.ts +1 -1
  26. package/landing/src/app/api/workspace-auth/magic-link/route.ts +1 -1
  27. package/landing/src/app/api/workspace-auth/session/route.ts +1 -1
  28. package/landing/src/app/api/workspace-auth/verify/route.ts +1 -1
  29. package/landing/src/app/auth/verify/page.tsx +1 -1
  30. package/landing/src/app/mou/[partnerId]/page.tsx +424 -0
  31. package/landing/src/app/mou/coaccept/page.tsx +416 -0
  32. package/landing/src/app/page.tsx +35 -7
  33. package/landing/src/app/providers/dashboard/[apiId]/actions/[actionId]/edit/page.tsx +1 -1
  34. package/landing/src/app/providers/dashboard/[apiId]/actions/new/page.tsx +1 -1
  35. package/landing/src/app/providers/dashboard/[apiId]/actions/page.tsx +1 -1
  36. package/landing/src/app/providers/register/page.tsx +2 -2
  37. package/landing/src/app/upgrade/page.tsx +1 -1
  38. package/landing/src/app/workspace/chains/page.tsx +1 -1
  39. package/landing/src/app/workspace/page.tsx +1 -1
  40. package/landing/src/components/EarnCreditsTab.tsx +1 -1
  41. package/landing/src/components/HeroTabs.tsx +2 -2
  42. package/landing/src/lib/convex-client.ts +1 -1
  43. package/landing/src/lib/pdf.ts +24 -0
  44. package/landing/src/lib/stats.json +3 -2
  45. package/landing/src/middleware.ts +1 -1
  46. package/landing/vercel.json +8 -0
  47. package/package.json +2 -2
  48. package/scripts/activate-hivr-workspace.ts +20 -0
package/README.md CHANGED
@@ -1,365 +1,282 @@
1
1
  # ๐Ÿฆž APIClaw
2
2
 
3
- > **The API layer for AI agents.** 22,000+ APIs indexed. Direct Call execution. Zero config.
3
+ The API layer for AI agents. 18 providers โ†’ 1000s of capabilities. Workspace โ†’ Dashboard โ†’ Ship.
4
4
 
5
5
  [![npm version](https://img.shields.io/npm/v/@nordsym/apiclaw.svg)](https://www.npmjs.com/package/@nordsym/apiclaw)
6
6
  [![npm downloads](https://img.shields.io/npm/dw/@nordsym/apiclaw.svg)](https://www.npmjs.com/package/@nordsym/apiclaw)
7
7
  [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
8
8
  [![MCP](https://img.shields.io/badge/MCP-Compatible-blue)](https://modelcontextprotocol.io)
9
9
 
10
- **APIs Indexed:** 22,392 โ€ข **Open APIs:** 1,636 โ€ข **Direct Call Providers:** 18
10
+ ---
11
+
12
+ ## The Platform
13
+
14
+ **[apiclaw.com](https://apiclaw.com)** โ€” Your workspace for API-powered agents.
15
+
16
+ | Layer | What You Get |
17
+ |-------|--------------|
18
+ | **Workspace** | Manage API keys, team access, usage analytics |
19
+ | **Dashboard** | Real-time logs, cost tracking, rate limit monitoring |
20
+ | **18 Direct Call Providers** | 1000+ ML models, 100+ LLMs, voice, SMS, email โ€” zero config |
21
+ | **1,636 Open APIs** | Curated public APIs, instant access |
22
+ | **22,392 Discovery** | Full API index for exploration |
23
+
24
+ One `mcp-install` connects your agent to all of it.
11
25
 
12
26
  ---
13
27
 
14
28
  ## Quick Start
15
29
 
16
30
  ```bash
17
- # Install APIClaw into Claude Desktop or Claude Code
18
31
  npx @nordsym/apiclaw mcp-install
19
-
20
- # That's it! Restart your AI assistant and ask:
21
- # "List available APIs" or "Send an SMS via 46elks"
22
32
  ```
23
33
 
24
- APIClaw automatically detects Claude Desktop and Claude Code โ€” then configures itself as an MCP server in seconds. Works with any MCP-compatible agent.
34
+ That's it. Restart your AI assistant. Ask it to *"Send an SMS"* or *"Generate an image"* โ€” it works.
25
35
 
26
36
  ---
27
37
 
28
- ## What is APIClaw?
38
+ ## What You Get
29
39
 
30
- **The API layer for AI agents.** APIClaw is an MCP server that gives any MCP-compatible agent access to real-world APIs:
40
+ ### Instant API Access
41
+ Tell your agent what to do. APIClaw handles auth, rate limits, and execution.
31
42
 
32
- - **๐Ÿ“ฑ SMS & Voice** โ€” 46elks, Twilio
33
- - **๐Ÿ“ง Email** โ€” Resend, SendGrid
34
- - **๐Ÿ’ณ Payments** โ€” Stripe
35
- - **๐Ÿ” Search** โ€” Brave Search
36
- - **๐Ÿค– AI** โ€” OpenRouter, ElevenLabs
37
- - **...and 100+ more** โ€” growing weekly
43
+ ### 18 Direct Call Providers
44
+ Premium APIs ready for production. Voice, AI, SMS, Email, Search โ€” all pre-configured.
38
45
 
39
- Instead of manually configuring API keys and reading documentation, just tell your AI: *"Send a confirmation SMS to +46701234567"* โ€” and it works.
46
+ ### 1,636 Open APIs
47
+ Public APIs indexed and callable. Weather, crypto, sports, government data.
48
+
49
+ ### 22,392 Discovery APIs
50
+ The full catalog. Search, explore, find the right API for any task.
51
+
52
+ ### Workspace Dashboard
53
+ See every call, track costs, monitor usage. One place for your entire team.
40
54
 
41
55
  ---
42
56
 
43
- ## Installation
57
+ ## 18 Direct Call Providers
44
58
 
45
- ### Option 1: MCP Install (Recommended)
59
+ Pre-configured, production-ready APIs. Just call them.
46
60
 
47
- ```bash
48
- npx @nordsym/apiclaw mcp-install
49
- ```
61
+ ### ๐Ÿค– AI & LLM
50
62
 
51
- This will:
52
- 1. ๐Ÿ” Detect Claude Desktop or Claude Code
53
- 2. ๐Ÿ“ Add APIClaw to the MCP config
54
- 3. โœ… Verify the setup
63
+ | Provider | Capability |
64
+ |----------|------------|
65
+ | **Replicate** | 1,000+ ML models โ€” image gen, video, audio, any model |
66
+ | **OpenRouter** | 100+ LLMs โ€” GPT-4, Claude, Llama, Mistral, unified API |
67
+ | **Groq** | Ultra-fast inference โ€” Llama, Mixtral at 500+ tokens/sec |
68
+ | **Mistral** | Mistral models โ€” Mistral Large, Medium, Small |
69
+ | **Cohere** | Enterprise NLP โ€” embeddings, rerank, generate |
70
+ | **Together AI** | Open models โ€” fine-tuning, fast inference |
71
+ | **Stability AI** | Image generation โ€” Stable Diffusion, SDXL, SD3 |
55
72
 
56
- ### Option 2: Manual Installation
73
+ ### ๐ŸŽค Voice
57
74
 
58
- ```bash
59
- npm install -g @nordsym/apiclaw
60
- apiclaw setup
61
- ```
75
+ | Provider | Capability |
76
+ |----------|------------|
77
+ | **ElevenLabs** | Text-to-speech โ€” 29 languages, voice cloning, realistic voices |
78
+ | **Deepgram** | Speech-to-text โ€” real-time transcription, 36 languages |
79
+ | **AssemblyAI** | Audio intelligence โ€” transcription, summarization, sentiment |
80
+
81
+ ### ๐Ÿ“ฑ SMS
82
+
83
+ | Provider | Capability |
84
+ |----------|------------|
85
+ | **46elks** | Swedish SMS API โ€” simple, reliable, great pricing |
86
+ | **Twilio** | Global SMS โ€” 180+ countries, programmable messaging |
87
+
88
+ ### ๐Ÿ“ง Email
89
+
90
+ | Provider | Capability |
91
+ |----------|------------|
92
+ | **Resend** | Developer email โ€” simple API, great deliverability |
93
+
94
+ ### ๐Ÿ” Search
95
+
96
+ | Provider | Capability |
97
+ |----------|------------|
98
+ | **Brave Search** | Web search โ€” privacy-focused, no tracking |
99
+ | **Firecrawl** | Web scraping โ€” extract content, convert to markdown |
100
+ | **Serper** | Google Search API โ€” SERP data, real-time results |
101
+
102
+ ### ๐Ÿ’ป Code
103
+
104
+ | Provider | Capability |
105
+ |----------|------------|
106
+ | **E2B** | Code sandbox โ€” run any code safely, isolated environments |
62
107
 
63
- ### Option 3: Use npx (No Install)
108
+ ### ๐Ÿ› ๏ธ Dev
64
109
 
65
- Just use `npx @nordsym/apiclaw` anywhere โ€” it downloads on demand.
110
+ | Provider | Capability |
111
+ |----------|------------|
112
+ | **GitHub** | GitHub API โ€” repos, issues, PRs, actions |
66
113
 
67
114
  ---
68
115
 
69
- ## Commands
116
+ ## 1,636 Open APIs
117
+
118
+ Public APIs, instantly callable. No API keys needed.
119
+
120
+ **Categories:**
121
+ - Weather & Environment
122
+ - Finance & Crypto
123
+ - Sports & Entertainment
124
+ - Government & Public Data
125
+ - Transportation
126
+ - Food & Recipes
127
+ - Science & Education
128
+
129
+ Browse at [apiclaw.com/open-apis](https://apiclaw.com/open-apis)
130
+
131
+ ---
132
+
133
+ ## 22,392 Discovery APIs
134
+
135
+ The full index. Every API we've cataloged.
136
+
137
+ Use `discover_apis` to search:
138
+ ```
139
+ "Find APIs for flight tracking"
140
+ "Show me cryptocurrency price APIs"
141
+ "What APIs exist for recipe data?"
142
+ ```
143
+
144
+ Browse at [apiclaw.com/discover](https://apiclaw.com/discover)
70
145
 
71
- ### `mcp-install`
146
+ ---
147
+
148
+ ## Installation
72
149
 
73
- Simple, focused installation for Claude Desktop and Claude Code.
150
+ ### One-Line Install (Recommended)
74
151
 
75
152
  ```bash
76
- # Auto-detect and install
77
153
  npx @nordsym/apiclaw mcp-install
154
+ ```
155
+
156
+ Auto-detects Claude Desktop or Claude Code. Configures MCP. Done.
157
+
158
+ ### Options
78
159
 
79
- # Install to specific client
160
+ ```bash
161
+ # Target specific client
80
162
  npx @nordsym/apiclaw mcp-install --client claude-desktop
81
163
  npx @nordsym/apiclaw mcp-install --client claude-code
82
164
 
83
- # Preview changes without applying
165
+ # Preview without applying
84
166
  npx @nordsym/apiclaw mcp-install --dry-run
85
167
  ```
86
168
 
87
- ### `setup`
88
-
89
- Full-featured setup with support for all MCP clients.
169
+ ### Global Install
90
170
 
91
171
  ```bash
92
- # Auto-detect and configure all clients
93
- npx @nordsym/apiclaw setup
172
+ npm install -g @nordsym/apiclaw
173
+ apiclaw setup
174
+ ```
94
175
 
95
- # Configure specific client
96
- npx @nordsym/apiclaw setup --client claude-desktop
97
- npx @nordsym/apiclaw setup --client cursor
98
- npx @nordsym/apiclaw setup --client windsurf
99
- npx @nordsym/apiclaw setup --client cline
100
- npx @nordsym/apiclaw setup --client continue
176
+ ---
101
177
 
102
- # Custom config path
103
- npx @nordsym/apiclaw setup --config /path/to/config.json
178
+ ## Commands
104
179
 
105
- # Link a workspace
106
- npx @nordsym/apiclaw setup --workspace ws_abc123
180
+ | Command | Description |
181
+ |---------|-------------|
182
+ | `mcp-install` | Quick setup for Claude Desktop/Code |
183
+ | `setup` | Full setup with all MCP client options |
184
+ | `doctor` | Diagnose your APIClaw installation |
185
+ | `restore` | Restore config from backup |
186
+ | `uninstall` | Remove APIClaw from clients |
107
187
 
108
- # Preview changes without applying
109
- npx @nordsym/apiclaw setup --dry-run
188
+ ### setup
110
189
 
111
- # Force overwrite existing config
112
- npx @nordsym/apiclaw setup --force
190
+ Full-featured setup for any MCP client.
113
191
 
114
- # Interactive mode
192
+ ```bash
193
+ npx @nordsym/apiclaw setup --client cursor
194
+ npx @nordsym/apiclaw setup --client windsurf
195
+ npx @nordsym/apiclaw setup --client cline
196
+ npx @nordsym/apiclaw setup --workspace ws_abc123
115
197
  npx @nordsym/apiclaw setup --wizard
116
198
  ```
117
199
 
118
- ### `doctor`
200
+ ### doctor
119
201
 
120
- Diagnose your APIClaw setup.
202
+ Check your setup.
121
203
 
122
204
  ```bash
123
205
  npx @nordsym/apiclaw doctor
124
206
  ```
125
207
 
126
- Output:
127
208
  ```
128
209
  ๐Ÿ” APIClaw Health Check
129
210
  ========================
130
-
131
211
  System:
132
212
  โœ“ Node.js v20.11.0
133
213
  โœ“ npm 10.2.4
134
- โœ“ npx available
135
214
 
136
215
  MCP Clients:
137
216
  โœ“ Claude Desktop - Configured โœ“
138
217
  โœ“ Cursor - Configured โœ“
139
- โœ— Windsurf - Not installed
140
-
141
- Connectivity:
142
- โœ“ api.apiclaw.com reachable
143
218
 
144
219
  Status: All systems operational โœ“
145
220
  ```
146
221
 
147
- ### `restore`
222
+ ### restore
148
223
 
149
- Restore config from backup.
224
+ Restore from backup.
150
225
 
151
226
  ```bash
152
- # Restore most recent backup
153
- npx @nordsym/apiclaw restore
154
-
155
- # List available backups
156
227
  npx @nordsym/apiclaw restore --list
157
-
158
- # Restore specific backup
159
- npx @nordsym/apiclaw restore --backup config.backup.1709150400.json
228
+ npx @nordsym/apiclaw restore
160
229
  ```
161
230
 
162
- ### `uninstall`
231
+ ### uninstall
163
232
 
164
- Remove APIClaw from all configured clients.
233
+ Remove APIClaw.
165
234
 
166
235
  ```bash
167
236
  npx @nordsym/apiclaw uninstall
168
-
169
- # Remove from specific client
170
237
  npx @nordsym/apiclaw uninstall --client cursor
171
238
  ```
172
239
 
173
240
  ---
174
241
 
175
- ## Options
176
-
177
- | Option | Description |
178
- |--------|-------------|
179
- | `--client <name>` | Target specific MCP client |
180
- | `--config <path>` | Use custom config file path |
181
- | `--workspace <id>` | Link an APIClaw workspace |
182
- | `--dry-run` | Preview changes without applying |
183
- | `--force` | Overwrite existing APIClaw config |
184
- | `--wizard` | Interactive setup mode |
185
- | `--no-backup` | Skip creating backup (not recommended) |
186
- | `--verbose` | Show detailed output |
187
- | `--version` | Show version number |
188
- | `--help` | Show help |
189
-
190
- ---
191
-
192
- ## Supported MCP Clients
242
+ ## MCP Clients
193
243
 
194
244
  | Client | macOS | Windows | Linux |
195
245
  |--------|:-----:|:-------:|:-----:|
196
246
  | **Claude Desktop** | โœ… | โœ… | โœ… |
247
+ | **Claude Code** | โœ… | โœ… | โœ… |
197
248
  | **Cursor** | โœ… | โœ… | โœ… |
198
249
  | **Windsurf** | โœ… | โœ… | โœ… |
199
- | **Cline** (VS Code) | โœ… | โœ… | โœ… |
250
+ | **Cline** | โœ… | โœ… | โœ… |
200
251
  | **Continue** | โœ… | โœ… | โœ… |
201
- | **Custom** | โœ… | โœ… | โœ… |
202
-
203
- ### Config Locations
204
-
205
- <details>
206
- <summary>Claude Desktop</summary>
207
-
208
- | OS | Path |
209
- |----|------|
210
- | macOS | `~/Library/Application Support/Claude/claude_desktop_config.json` |
211
- | Windows | `%APPDATA%\Claude\claude_desktop_config.json` |
212
- | Linux | `~/.config/Claude/claude_desktop_config.json` |
213
-
214
- </details>
215
-
216
- <details>
217
- <summary>Cursor</summary>
218
-
219
- | OS | Path |
220
- |----|------|
221
- | macOS | `~/Library/Application Support/Cursor/User/globalStorage/cursor.mcp/config.json` |
222
- | Windows | `%APPDATA%\Cursor\User\globalStorage\cursor.mcp\config.json` |
223
- | Linux | `~/.config/Cursor/User/globalStorage/cursor.mcp/config.json` |
224
-
225
- </details>
226
252
 
227
253
  <details>
228
- <summary>Windsurf</summary>
229
-
230
- | OS | Path |
231
- |----|------|
232
- | macOS | `~/.codeium/windsurf/mcp_config.json` |
233
- | Windows | `%USERPROFILE%\.codeium\windsurf\mcp_config.json` |
234
- | Linux | `~/.codeium/windsurf/mcp_config.json` |
235
-
236
- </details>
254
+ <summary>Config Locations</summary>
237
255
 
238
- <details>
239
- <summary>Cline</summary>
256
+ **Claude Desktop**
257
+ - macOS: `~/Library/Application Support/Claude/claude_desktop_config.json`
258
+ - Windows: `%APPDATA%\Claude\claude_desktop_config.json`
259
+ - Linux: `~/.config/Claude/claude_desktop_config.json`
240
260
 
241
- | OS | Path |
242
- |----|------|
243
- | macOS | `~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json` |
244
- | Windows | `%APPDATA%\Code\User\globalStorage\saoudrizwan.claude-dev\settings\cline_mcp_settings.json` |
245
- | Linux | `~/.config/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json` |
261
+ **Cursor**
262
+ - macOS: `~/Library/Application Support/Cursor/User/globalStorage/cursor.mcp/config.json`
263
+ - Windows: `%APPDATA%\Cursor\User\globalStorage\cursor.mcp\config.json`
246
264
 
247
- </details>
265
+ **Windsurf**
266
+ - All: `~/.codeium/windsurf/mcp_config.json`
248
267
 
249
- <details>
250
- <summary>Continue</summary>
268
+ **Cline**
269
+ - macOS: `~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json`
251
270
 
252
- | OS | Path |
253
- |----|------|
254
- | macOS | `~/.continue/config.json` |
255
- | Windows | `%USERPROFILE%\.continue\config.json` |
256
- | Linux | `~/.continue/config.json` |
271
+ **Continue**
272
+ - All: `~/.continue/config.json`
257
273
 
258
274
  </details>
259
275
 
260
276
  ---
261
277
 
262
- ## Enterprise Deployment
263
-
264
- Deploy APIClaw to your entire development team.
265
-
266
- ### Environment Variables
267
-
268
- ```bash
269
- # Pre-configure workspace for all users
270
- export APICLAW_WORKSPACE="ws_enterprise_123"
271
-
272
- # Point to self-hosted instance
273
- export APICLAW_API_URL="https://api.company.com/apiclaw"
274
-
275
- # Disable telemetry
276
- export APICLAW_DISABLE_TELEMETRY="true"
277
-
278
- npx @nordsym/apiclaw mcp-install
279
- ```
280
-
281
- ### Generate Deployment Script
282
-
283
- ```bash
284
- # Generate cross-platform setup script
285
- npx @nordsym/apiclaw setup --enterprise --output deploy.sh
286
- ```
287
-
288
- The generated script handles:
289
- - OS detection
290
- - Client detection
291
- - Config injection
292
- - Verification
293
- - Error reporting
294
-
295
- ### MDM/Group Policy
296
-
297
- See [Enterprise Deployment Guide](docs/enterprise-deployment.md) for:
298
- - Jamf/Kandji/Mosyle (macOS)
299
- - Intune/Group Policy (Windows)
300
- - Ansible/Chef/Puppet (Linux)
301
-
302
- ---
303
-
304
- ## Troubleshooting
305
-
306
- ### "Permission denied"
307
-
308
- ```bash
309
- # Option 1: Run with sudo
310
- sudo npx @nordsym/apiclaw mcp-install
311
-
312
- # Option 2: Fix permissions
313
- chmod 644 ~/Library/Application\ Support/Claude/claude_desktop_config.json
314
- ```
315
-
316
- ### "Config file not found"
317
-
318
- The MCP client hasn't created its config yet:
319
- 1. Open the client (Claude Desktop or Claude Code)
320
- 2. Close it
321
- 3. Try mcp-install again
322
-
323
- Or use the full setup command with a custom path:
324
- ```bash
325
- npx @nordsym/apiclaw setup --config /path/to/config.json
326
- ```
327
-
328
- ### "Invalid JSON"
329
-
330
- Your config file has syntax errors:
331
- ```bash
332
- # Restore from backup
333
- npx @nordsym/apiclaw restore --list
334
- npx @nordsym/apiclaw restore
335
-
336
- # Or manually fix the JSON
337
- ```
338
-
339
- ### "Already configured"
340
-
341
- APIClaw is already set up. To update:
342
- ```bash
343
- npx @nordsym/apiclaw setup --force
344
- ```
345
-
346
- ### Still having issues?
347
-
348
- ```bash
349
- # Run diagnostics
350
- npx @nordsym/apiclaw doctor --verbose
351
-
352
- # Get help
353
- https://docs.apiclaw.com/setup
354
- https://github.com/nordsym/apiclaw/issues
355
- ```
356
-
357
- ---
358
-
359
278
  ## How It Works
360
279
 
361
- APIClaw modifies your MCP client's config file to register itself as a server:
362
-
363
280
  ```json
364
281
  {
365
282
  "mcpServers": {
@@ -371,215 +288,38 @@ APIClaw modifies your MCP client's config file to register itself as a server:
371
288
  }
372
289
  ```
373
290
 
374
- When your AI assistant starts, it launches APIClaw as an MCP server. APIClaw then:
375
- 1. Exposes available APIs as MCP tools
376
- 2. Handles authentication and rate limiting
377
- 3. Executes API calls on behalf of the AI
378
-
379
- ---
380
-
381
- ## Safety Features
382
-
383
- ### Automatic Backups
384
-
385
- Before modifying any config, APIClaw creates a timestamped backup:
386
- ```
387
- claude_desktop_config.backup.1709150400.json
388
- ```
389
-
390
- ### Non-Destructive
391
-
392
- - Never overwrites existing configurations
393
- - Deep merges APIClaw into `mcpServers`
394
- - Preserves all other settings
395
-
396
- ### Validation
397
-
398
- - Parses JSON before and after modifications
399
- - Verifies required fields exist
400
- - Rolls back on any error
291
+ 1. Your agent launches APIClaw as an MCP server
292
+ 2. APIClaw exposes APIs as callable tools
293
+ 3. Agent calls `send_sms`, `generate_image`, `search_web`
294
+ 4. APIClaw handles auth, rate limits, execution
295
+ 5. Results flow back to the agent
401
296
 
402
297
  ---
403
298
 
404
299
  ## Dry-Run Mode
405
300
 
406
- Test API calls without actually executing them. Perfect for debugging, development, and agent testing.
407
-
408
- ### Usage
301
+ Test without making real API calls.
409
302
 
410
303
  ```javascript
411
- // In MCP tool call
412
304
  call_api({
413
305
  provider: "46elks",
414
306
  action: "send_sms",
415
- params: {
416
- to: "+46701234567",
417
- message: "Hello from dry-run!"
418
- },
419
- dry_run: true // โ† No actual API call made
307
+ params: { to: "+46701234567", message: "Test" },
308
+ dry_run: true
420
309
  })
421
310
  ```
422
311
 
423
- ### Response
424
-
425
- ```json
426
- {
427
- "dry_run": true,
428
- "provider": "46elks",
429
- "action": "send_sms",
430
- "would_send": {
431
- "url": "https://api.46elks.com/a1/sms",
432
- "method": "POST",
433
- "headers": {
434
- "Content-Type": "application/json",
435
- "Authorization": "Basic [base64(username:password)]"
436
- },
437
- "body": {
438
- "from": "APIClaw",
439
- "to": "+46701234567",
440
- "message": "Hello from dry-run!"
441
- }
442
- },
443
- "mock_response": {
444
- "success": true,
445
- "data": {
446
- "id": "mock_sms_123",
447
- "status": "delivered"
448
- },
449
- "estimated_cost": "~0.35-0.52 SEK"
450
- },
451
- "notes": [
452
- "โš ๏ธ DRY-RUN MODE: No actual API call was made",
453
- "This shows what WOULD be sent if you remove dry_run: true"
454
- ]
455
- }
456
- ```
457
-
458
- ### Benefits
459
-
460
- - **๐Ÿ’ฐ No cost** โ€” Test without burning API credits
461
- - **๐Ÿ” Debug** โ€” See exact request that would be sent
462
- - **๐Ÿงช Test** โ€” Validate agent workflows before going live
463
- - **๐Ÿ“‹ Mock data** โ€” Get realistic response shapes for development
464
-
465
- ### Supported Providers
466
-
467
- All Direct Call providers support dry-run:
468
- - 46elks, Twilio (SMS)
469
- - Resend (Email)
470
- - Brave Search
471
- - OpenRouter (LLM)
472
- - ElevenLabs (TTS)
473
- - Replicate (AI models)
474
- - Firecrawl (Web scraping)
475
- - GitHub
476
- - E2B (Code sandbox)
477
-
478
- ---
479
-
480
- ## Error Handling
481
-
482
- APIClaw returns structured error responses across all providers, making it easy to handle failures programmatically.
483
-
484
- ### Error Response Format
485
-
486
- All errors follow this structure:
487
-
488
- ```json
489
- {
490
- "success": false,
491
- "provider": "replicate",
492
- "action": "run",
493
- "error": "Rate limit exceeded",
494
- "code": "RATE_LIMITED"
495
- }
496
- ```
497
-
498
- ### Error Codes
499
-
500
- | Code | Description |
501
- |------|-------------|
502
- | `RATE_LIMITED` | API rate limit hit (429) |
503
- | `SERVICE_UNAVAILABLE` | Service temporarily unavailable (502, 503, 504) |
504
- | `UNAUTHORIZED` | Invalid or missing credentials (401) |
505
- | `FORBIDDEN` | Access denied (403) |
506
- | `NOT_FOUND` | Resource not found (404) |
507
- | `BAD_REQUEST` | Invalid request parameters (400) |
508
- | `TIMEOUT` | Request timed out |
509
- | `NETWORK_ERROR` | Network connectivity issue |
510
- | `PROVIDER_ERROR` | Provider-specific error |
511
- | `INVALID_PARAMS` | Missing or invalid parameters |
512
- | `NO_CREDENTIALS` | No credentials configured for provider |
513
- | `UNKNOWN_PROVIDER` | Provider not available |
514
- | `UNKNOWN_ACTION` | Action not available for provider |
515
- | `MAX_RETRIES_EXCEEDED` | All retry attempts failed |
516
-
517
- ### Automatic Retry
518
-
519
- APIClaw automatically retries transient failures with exponential backoff:
520
-
521
- - **Retryable errors:** 429 (Rate Limited), 502, 503, 504 (Service Unavailable)
522
- - **Max retries:** 3
523
- - **Backoff:** Exponential with jitter (1s โ†’ 2s โ†’ 4s, capped at 30s)
524
- - **Retry-After:** Respects `Retry-After` header when present
525
-
526
- ```javascript
527
- // APIClaw handles retries automatically โ€” you just see the final result
528
- const result = await call_api({
529
- provider: "openrouter",
530
- action: "chat",
531
- params: { messages: [...] }
532
- });
533
-
534
- if (!result.success) {
535
- console.log(`Error: ${result.error} (${result.code})`);
536
- // Handle error based on code
537
- if (result.code === "RATE_LIMITED") {
538
- // Wait longer before next request
539
- }
540
- }
541
- ```
542
-
543
- ### Best Practices
544
-
545
- 1. **Always check `success`** before accessing `data`
546
- 2. **Use `code`** for programmatic error handling
547
- 3. **Use `error`** for human-readable messages
548
- 4. **Let APIClaw retry** โ€” don't implement your own retry logic for 429/503
312
+ Returns the exact request that *would* be sent, with mock response data.
549
313
 
550
314
  ---
551
315
 
552
- ## Development
553
-
554
- ```bash
555
- # Clone the repo
556
- git clone https://github.com/nordsym/apiclaw.git
557
- cd apiclaw
558
-
559
- # Install dependencies
560
- npm install
561
-
562
- # Build
563
- npm run build
564
-
565
- # Run locally
566
- npm run dev
316
+ ## Links
567
317
 
568
- # Test setup locally
569
- npm run setup:test
570
- ```
318
+ - **Platform:** [apiclaw.com](https://apiclaw.com)
319
+ - **Docs:** [docs.apiclaw.com](https://docs.apiclaw.com)
320
+ - **GitHub:** [github.com/nordsym/apiclaw](https://github.com/nordsym/apiclaw)
321
+ - **npm:** [@nordsym/apiclaw](https://www.npmjs.com/package/@nordsym/apiclaw)
571
322
 
572
323
  ---
573
324
 
574
- ## License
575
-
576
325
  MIT ยฉ [NordSym](https://nordsym.com)
577
-
578
- ---
579
-
580
- ## Links
581
-
582
- - **Website:** [apiclaw.com](https://apiclaw.com)
583
- - **Documentation:** [docs.apiclaw.com](https://docs.apiclaw.com)
584
- - **GitHub:** [github.com/nordsym/apiclaw](https://github.com/nordsym/apiclaw)
585
- - **npm:** [@nordsym/apiclaw](https://www.npmjs.com/package/@nordsym/apiclaw)