APIClaw

APIClaw

The API layer for AI agents. World's biggest API index with 22,000+ APIs and growing. Agents discover and call APIs at runtime with semantic search, structured metadata, and 18 Direct Call APIs including AI providers.

Category
访问服务器

README

🦞 APIClaw

The API layer for AI agents. 22,000+ APIs indexed. Direct Call execution. Zero config.

npm version npm downloads License: MIT MCP

APIs Indexed: 22,392 • Open APIs: 1,636 • Direct Call Providers: 18


Quick Start

# Install APIClaw into Claude Desktop or Claude Code
npx @nordsym/apiclaw mcp-install

# That's it! Restart your AI assistant and ask:
# "List available APIs" or "Send an SMS via 46elks"

APIClaw automatically detects Claude Desktop and Claude Code — then configures itself as an MCP server in seconds. Works with any MCP-compatible agent.


What is APIClaw?

The API layer for AI agents. APIClaw is an MCP server that gives any MCP-compatible agent access to real-world APIs:

  • 📱 SMS & Voice — 46elks, Twilio
  • 📧 Email — Resend, SendGrid
  • 💳 Payments — Stripe
  • 🔍 Search — Brave Search
  • 🤖 AI — OpenRouter, ElevenLabs
  • ...and 100+ more — growing weekly

Instead of manually configuring API keys and reading documentation, just tell your AI: "Send a confirmation SMS to +46701234567" — and it works.


Installation

Option 1: MCP Install (Recommended)

npx @nordsym/apiclaw mcp-install

This will:

  1. 🔍 Detect Claude Desktop or Claude Code
  2. 📝 Add APIClaw to the MCP config
  3. ✅ Verify the setup

Option 2: Manual Installation

npm install -g @nordsym/apiclaw
apiclaw setup

Option 3: Use npx (No Install)

Just use npx @nordsym/apiclaw anywhere — it downloads on demand.


Commands

mcp-install

Simple, focused installation for Claude Desktop and Claude Code.

# Auto-detect and install
npx @nordsym/apiclaw mcp-install

# Install to specific client
npx @nordsym/apiclaw mcp-install --client claude-desktop
npx @nordsym/apiclaw mcp-install --client claude-code

# Preview changes without applying
npx @nordsym/apiclaw mcp-install --dry-run

setup

Full-featured setup with support for all MCP clients.

# Auto-detect and configure all clients
npx @nordsym/apiclaw setup

# Configure specific client
npx @nordsym/apiclaw setup --client claude-desktop
npx @nordsym/apiclaw setup --client cursor
npx @nordsym/apiclaw setup --client windsurf
npx @nordsym/apiclaw setup --client cline
npx @nordsym/apiclaw setup --client continue

# Custom config path
npx @nordsym/apiclaw setup --config /path/to/config.json

# Link a workspace
npx @nordsym/apiclaw setup --workspace ws_abc123

# Preview changes without applying
npx @nordsym/apiclaw setup --dry-run

# Force overwrite existing config
npx @nordsym/apiclaw setup --force

# Interactive mode
npx @nordsym/apiclaw setup --wizard

doctor

Diagnose your APIClaw setup.

npx @nordsym/apiclaw doctor

Output:

🔍 APIClaw Health Check
========================

System:
  ✓ Node.js v20.11.0
  ✓ npm 10.2.4
  ✓ npx available

MCP Clients:
  ✓ Claude Desktop - Configured ✓
  ✓ Cursor - Configured ✓
  ✗ Windsurf - Not installed

Connectivity:
  ✓ api.apiclaw.com reachable

Status: All systems operational ✓

restore

Restore config from backup.

# Restore most recent backup
npx @nordsym/apiclaw restore

# List available backups
npx @nordsym/apiclaw restore --list

# Restore specific backup
npx @nordsym/apiclaw restore --backup config.backup.1709150400.json

uninstall

Remove APIClaw from all configured clients.

npx @nordsym/apiclaw uninstall

# Remove from specific client
npx @nordsym/apiclaw uninstall --client cursor

Options

Option Description
--client <name> Target specific MCP client
--config <path> Use custom config file path
--workspace <id> Link an APIClaw workspace
--dry-run Preview changes without applying
--force Overwrite existing APIClaw config
--wizard Interactive setup mode
--no-backup Skip creating backup (not recommended)
--verbose Show detailed output
--version Show version number
--help Show help

Supported MCP Clients

Client macOS Windows Linux
Claude Desktop
Cursor
Windsurf
Cline (VS Code)
Continue
Custom

Config Locations

<details> <summary>Claude Desktop</summary>

OS Path
macOS ~/Library/Application Support/Claude/claude_desktop_config.json
Windows %APPDATA%\Claude\claude_desktop_config.json
Linux ~/.config/Claude/claude_desktop_config.json

</details>

<details> <summary>Cursor</summary>

OS Path
macOS ~/Library/Application Support/Cursor/User/globalStorage/cursor.mcp/config.json
Windows %APPDATA%\Cursor\User\globalStorage\cursor.mcp\config.json
Linux ~/.config/Cursor/User/globalStorage/cursor.mcp/config.json

</details>

<details> <summary>Windsurf</summary>

OS Path
macOS ~/.codeium/windsurf/mcp_config.json
Windows %USERPROFILE%\.codeium\windsurf\mcp_config.json
Linux ~/.codeium/windsurf/mcp_config.json

</details>

<details> <summary>Cline</summary>

OS Path
macOS ~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
Windows %APPDATA%\Code\User\globalStorage\saoudrizwan.claude-dev\settings\cline_mcp_settings.json
Linux ~/.config/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json

</details>

<details> <summary>Continue</summary>

OS Path
macOS ~/.continue/config.json
Windows %USERPROFILE%\.continue\config.json
Linux ~/.continue/config.json

</details>


Enterprise Deployment

Deploy APIClaw to your entire development team.

Environment Variables

# Pre-configure workspace for all users
export APICLAW_WORKSPACE="ws_enterprise_123"

# Point to self-hosted instance
export APICLAW_API_URL="https://api.company.com/apiclaw"

# Disable telemetry
export APICLAW_DISABLE_TELEMETRY="true"

npx @nordsym/apiclaw mcp-install

Generate Deployment Script

# Generate cross-platform setup script
npx @nordsym/apiclaw setup --enterprise --output deploy.sh

The generated script handles:

  • OS detection
  • Client detection
  • Config injection
  • Verification
  • Error reporting

MDM/Group Policy

See Enterprise Deployment Guide for:

  • Jamf/Kandji/Mosyle (macOS)
  • Intune/Group Policy (Windows)
  • Ansible/Chef/Puppet (Linux)

Troubleshooting

"Permission denied"

# Option 1: Run with sudo
sudo npx @nordsym/apiclaw mcp-install

# Option 2: Fix permissions
chmod 644 ~/Library/Application\ Support/Claude/claude_desktop_config.json

"Config file not found"

The MCP client hasn't created its config yet:

  1. Open the client (Claude Desktop or Claude Code)
  2. Close it
  3. Try mcp-install again

Or use the full setup command with a custom path:

npx @nordsym/apiclaw setup --config /path/to/config.json

"Invalid JSON"

Your config file has syntax errors:

# Restore from backup
npx @nordsym/apiclaw restore --list
npx @nordsym/apiclaw restore

# Or manually fix the JSON

"Already configured"

APIClaw is already set up. To update:

npx @nordsym/apiclaw setup --force

Still having issues?

# Run diagnostics
npx @nordsym/apiclaw doctor --verbose

# Get help
https://docs.apiclaw.com/setup
https://github.com/nordsym/apiclaw/issues

How It Works

APIClaw modifies your MCP client's config file to register itself as a server:

{
  "mcpServers": {
    "apiclaw": {
      "command": "npx",
      "args": ["-y", "@nordsym/apiclaw"]
    }
  }
}

When your AI assistant starts, it launches APIClaw as an MCP server. APIClaw then:

  1. Exposes available APIs as MCP tools
  2. Handles authentication and rate limiting
  3. Executes API calls on behalf of the AI

Safety Features

Automatic Backups

Before modifying any config, APIClaw creates a timestamped backup:

claude_desktop_config.backup.1709150400.json

Non-Destructive

  • Never overwrites existing configurations
  • Deep merges APIClaw into mcpServers
  • Preserves all other settings

Validation

  • Parses JSON before and after modifications
  • Verifies required fields exist
  • Rolls back on any error

Dry-Run Mode

Test API calls without actually executing them. Perfect for debugging, development, and agent testing.

Usage

// In MCP tool call
call_api({
  provider: "46elks",
  action: "send_sms",
  params: {
    to: "+46701234567",
    message: "Hello from dry-run!"
  },
  dry_run: true  // ← No actual API call made
})

Response

{
  "dry_run": true,
  "provider": "46elks",
  "action": "send_sms",
  "would_send": {
    "url": "https://api.46elks.com/a1/sms",
    "method": "POST",
    "headers": {
      "Content-Type": "application/json",
      "Authorization": "Basic [base64(username:password)]"
    },
    "body": {
      "from": "APIClaw",
      "to": "+46701234567",
      "message": "Hello from dry-run!"
    }
  },
  "mock_response": {
    "success": true,
    "data": {
      "id": "mock_sms_123",
      "status": "delivered"
    },
    "estimated_cost": "~0.35-0.52 SEK"
  },
  "notes": [
    "⚠️ DRY-RUN MODE: No actual API call was made",
    "This shows what WOULD be sent if you remove dry_run: true"
  ]
}

Benefits

  • 💰 No cost — Test without burning API credits
  • 🔍 Debug — See exact request that would be sent
  • 🧪 Test — Validate agent workflows before going live
  • 📋 Mock data — Get realistic response shapes for development

Supported Providers

All Direct Call providers support dry-run:

  • 46elks, Twilio (SMS)
  • Resend (Email)
  • Brave Search
  • OpenRouter (LLM)
  • ElevenLabs (TTS)
  • Replicate (AI models)
  • Firecrawl (Web scraping)
  • GitHub
  • E2B (Code sandbox)

Error Handling

APIClaw returns structured error responses across all providers, making it easy to handle failures programmatically.

Error Response Format

All errors follow this structure:

{
  "success": false,
  "provider": "replicate",
  "action": "run",
  "error": "Rate limit exceeded",
  "code": "RATE_LIMITED"
}

Error Codes

Code Description
RATE_LIMITED API rate limit hit (429)
SERVICE_UNAVAILABLE Service temporarily unavailable (502, 503, 504)
UNAUTHORIZED Invalid or missing credentials (401)
FORBIDDEN Access denied (403)
NOT_FOUND Resource not found (404)
BAD_REQUEST Invalid request parameters (400)
TIMEOUT Request timed out
NETWORK_ERROR Network connectivity issue
PROVIDER_ERROR Provider-specific error
INVALID_PARAMS Missing or invalid parameters
NO_CREDENTIALS No credentials configured for provider
UNKNOWN_PROVIDER Provider not available
UNKNOWN_ACTION Action not available for provider
MAX_RETRIES_EXCEEDED All retry attempts failed

Automatic Retry

APIClaw automatically retries transient failures with exponential backoff:

  • Retryable errors: 429 (Rate Limited), 502, 503, 504 (Service Unavailable)
  • Max retries: 3
  • Backoff: Exponential with jitter (1s → 2s → 4s, capped at 30s)
  • Retry-After: Respects Retry-After header when present
// APIClaw handles retries automatically — you just see the final result
const result = await call_api({
  provider: "openrouter",
  action: "chat",
  params: { messages: [...] }
});

if (!result.success) {
  console.log(`Error: ${result.error} (${result.code})`);
  // Handle error based on code
  if (result.code === "RATE_LIMITED") {
    // Wait longer before next request
  }
}

Best Practices

  1. Always check success before accessing data
  2. Use code for programmatic error handling
  3. Use error for human-readable messages
  4. Let APIClaw retry — don't implement your own retry logic for 429/503

Development

# Clone the repo
git clone https://github.com/nordsym/apiclaw.git
cd apiclaw

# Install dependencies
npm install

# Build
npm run build

# Run locally
npm run dev

# Test setup locally
npm run setup:test

License

MIT © NordSym


Links

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选