@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.
- package/AGENTS.md +115 -0
- package/CHANGELOG.md +78 -0
- package/CONTRIBUTING.md +84 -0
- package/README.md +178 -438
- package/convex/_generated/api.d.ts +4 -0
- package/convex/adminActivate.ts +54 -0
- package/convex/mou.ts +74 -0
- package/convex/schema.ts +20 -0
- package/convex/workspaces.ts +76 -0
- package/landing/.env.local.stripe +2 -0
- package/landing/package-lock.json +916 -2
- package/landing/package.json +2 -0
- package/landing/public/.well-known/ai-plugin.json +17 -0
- package/landing/public/llms-full.txt +322 -0
- package/landing/public/llms.txt +61 -72
- package/landing/public/robots.txt +28 -0
- package/landing/src/app/admin/page.tsx +1 -1
- package/landing/src/app/api/auth/magic-link/route.ts +1 -1
- package/landing/src/app/api/auth/session/route.ts +1 -1
- package/landing/src/app/api/auth/verify/route.ts +1 -1
- package/landing/src/app/api/billing/checkout/route.ts +1 -1
- package/landing/src/app/api/billing/payment-method/route.ts +1 -1
- package/landing/src/app/api/billing/portal/route.ts +1 -1
- package/landing/src/app/api/mou/sign/route.ts +314 -0
- package/landing/src/app/api/stripe/webhook/route.ts +1 -1
- package/landing/src/app/api/workspace-auth/magic-link/route.ts +1 -1
- package/landing/src/app/api/workspace-auth/session/route.ts +1 -1
- package/landing/src/app/api/workspace-auth/verify/route.ts +1 -1
- package/landing/src/app/auth/verify/page.tsx +1 -1
- package/landing/src/app/mou/[partnerId]/page.tsx +424 -0
- package/landing/src/app/mou/coaccept/page.tsx +416 -0
- package/landing/src/app/page.tsx +35 -7
- package/landing/src/app/providers/dashboard/[apiId]/actions/[actionId]/edit/page.tsx +1 -1
- package/landing/src/app/providers/dashboard/[apiId]/actions/new/page.tsx +1 -1
- package/landing/src/app/providers/dashboard/[apiId]/actions/page.tsx +1 -1
- package/landing/src/app/providers/register/page.tsx +2 -2
- package/landing/src/app/upgrade/page.tsx +1 -1
- package/landing/src/app/workspace/chains/page.tsx +1 -1
- package/landing/src/app/workspace/page.tsx +1 -1
- package/landing/src/components/EarnCreditsTab.tsx +1 -1
- package/landing/src/components/HeroTabs.tsx +2 -2
- package/landing/src/lib/convex-client.ts +1 -1
- package/landing/src/lib/pdf.ts +24 -0
- package/landing/src/lib/stats.json +3 -2
- package/landing/src/middleware.ts +1 -1
- package/landing/vercel.json +8 -0
- package/package.json +2 -2
- package/scripts/activate-hivr-workspace.ts +20 -0
package/README.md
CHANGED
|
@@ -1,365 +1,282 @@
|
|
|
1
1
|
# ๐ฆ APIClaw
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
The API layer for AI agents. 18 providers โ 1000s of capabilities. Workspace โ Dashboard โ Ship.
|
|
4
4
|
|
|
5
5
|
[](https://www.npmjs.com/package/@nordsym/apiclaw)
|
|
6
6
|
[](https://www.npmjs.com/package/@nordsym/apiclaw)
|
|
7
7
|
[](LICENSE)
|
|
8
8
|
[](https://modelcontextprotocol.io)
|
|
9
9
|
|
|
10
|
-
|
|
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
|
-
|
|
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
|
|
38
|
+
## What You Get
|
|
29
39
|
|
|
30
|
-
|
|
40
|
+
### Instant API Access
|
|
41
|
+
Tell your agent what to do. APIClaw handles auth, rate limits, and execution.
|
|
31
42
|
|
|
32
|
-
|
|
33
|
-
|
|
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
|
-
|
|
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
|
-
##
|
|
57
|
+
## 18 Direct Call Providers
|
|
44
58
|
|
|
45
|
-
|
|
59
|
+
Pre-configured, production-ready APIs. Just call them.
|
|
46
60
|
|
|
47
|
-
|
|
48
|
-
npx @nordsym/apiclaw mcp-install
|
|
49
|
-
```
|
|
61
|
+
### ๐ค AI & LLM
|
|
50
62
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
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
|
-
###
|
|
73
|
+
### ๐ค Voice
|
|
57
74
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
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
|
-
###
|
|
108
|
+
### ๐ ๏ธ Dev
|
|
64
109
|
|
|
65
|
-
|
|
110
|
+
| Provider | Capability |
|
|
111
|
+
|----------|------------|
|
|
112
|
+
| **GitHub** | GitHub API โ repos, issues, PRs, actions |
|
|
66
113
|
|
|
67
114
|
---
|
|
68
115
|
|
|
69
|
-
##
|
|
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
|
-
|
|
146
|
+
---
|
|
147
|
+
|
|
148
|
+
## Installation
|
|
72
149
|
|
|
73
|
-
|
|
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
|
-
|
|
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
|
|
165
|
+
# Preview without applying
|
|
84
166
|
npx @nordsym/apiclaw mcp-install --dry-run
|
|
85
167
|
```
|
|
86
168
|
|
|
87
|
-
###
|
|
88
|
-
|
|
89
|
-
Full-featured setup with support for all MCP clients.
|
|
169
|
+
### Global Install
|
|
90
170
|
|
|
91
171
|
```bash
|
|
92
|
-
|
|
93
|
-
|
|
172
|
+
npm install -g @nordsym/apiclaw
|
|
173
|
+
apiclaw setup
|
|
174
|
+
```
|
|
94
175
|
|
|
95
|
-
|
|
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
|
-
|
|
103
|
-
npx @nordsym/apiclaw setup --config /path/to/config.json
|
|
178
|
+
## Commands
|
|
104
179
|
|
|
105
|
-
|
|
106
|
-
|
|
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
|
-
|
|
109
|
-
npx @nordsym/apiclaw setup --dry-run
|
|
188
|
+
### setup
|
|
110
189
|
|
|
111
|
-
|
|
112
|
-
npx @nordsym/apiclaw setup --force
|
|
190
|
+
Full-featured setup for any MCP client.
|
|
113
191
|
|
|
114
|
-
|
|
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
|
-
###
|
|
200
|
+
### doctor
|
|
119
201
|
|
|
120
|
-
|
|
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
|
-
###
|
|
222
|
+
### restore
|
|
148
223
|
|
|
149
|
-
Restore
|
|
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
|
-
###
|
|
231
|
+
### uninstall
|
|
163
232
|
|
|
164
|
-
Remove APIClaw
|
|
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
|
-
##
|
|
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**
|
|
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>
|
|
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
|
-
|
|
239
|
-
|
|
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
|
-
|
|
242
|
-
|
|
243
|
-
|
|
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
|
-
|
|
265
|
+
**Windsurf**
|
|
266
|
+
- All: `~/.codeium/windsurf/mcp_config.json`
|
|
248
267
|
|
|
249
|
-
|
|
250
|
-
|
|
268
|
+
**Cline**
|
|
269
|
+
- macOS: `~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json`
|
|
251
270
|
|
|
252
|
-
|
|
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
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
##
|
|
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
|
-
|
|
569
|
-
|
|
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)
|