Run the MCP Server Locally
Run the CaptchaSonic MCP server on your own machine over stdio with npx — for clients that only support local MCP servers.
Use the local server when your client only supports local (stdio) MCP servers, such as Claude Desktop or some agent frameworks. It has the same tools as the hosted server at https://mcp.captchasonic.com and calls the same API. If your client supports remote servers, the hosted server is simpler.
Requires Node.js 20.3 or newer.
Claude Code
claude mcp add captchasonic --env SONIC_API_KEY=sonic_xxx -- npx -y @captchasonic/mcp-server
JSON config
Works for Claude Desktop, Cursor, Windsurf, Antigravity and any client that takes an mcpServers block:
{
"mcpServers": {
"captchasonic": {
"command": "npx",
"args": ["-y", "@captchasonic/mcp-server"],
"env": { "SONIC_API_KEY": "sonic_xxx" }
}
}
}
Environment variables
| Variable | Description | Default |
|---|---|---|
SONIC_API_KEY | Your CaptchaSonic API key. | required for solving |
SONIC_BASE_URL | Solving API URL. | https://api.captchasonic.com |
Updating
npx may reuse a cached copy. To always run the newest release, use @captchasonic/mcp-server@latest in the command; to pin one, use @captchasonic/[email protected].
Version 2.0.0 replaced the old health_check and solve_captcha tools with solve_token_captcha, solve_image_captcha, get_task_result, get_balance and list_captcha_types. See the Tools reference.