@opspawn/x402-tools
MCP server providing AI-powered tools via x402 micropayments. Pay-per-use screenshot capture, code security scanning, AI analysis, PDF generation, and dependency auditing.
Tools
| Tool | Description | Cost |
|---|---|---|
x402_screenshot |
Capture a screenshot of any URL (PNG). Includes AI analysis via Gemini. | $0.01 USDC |
x402_code_scan |
Scan source code for security vulnerabilities (SQLi, XSS, secrets, etc.) | $0.05 USDC |
x402_ai_analysis |
AI-powered text analysis and summarization via Gemini 2.0 Flash | $0.01 USDC |
x402_markdown_to_pdf |
Convert markdown to PDF documents | $0.01 USDC |
x402_dep_audit |
Audit npm/pip/go dependencies for known CVEs via OSV.dev | $0.05 USDC |
x402_gateway_status |
Check gateway status and pricing (free) | Free |
All paid tools use the x402 protocol for USDC micropayments on Base, SKALE Europa (gasless), or Arbitrum.
Installation
npm install -g @opspawn/x402-tools
Or run directly with npx:
npx @opspawn/x402-tools
Configuration
Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):
{
"mcpServers": {
"x402-tools": {
"command": "npx",
"args": ["-y", "@opspawn/x402-tools"],
"env": {
"X402_PAYMENT_TOKEN": "your-payment-signature"
}
}
}
}
Cline / VS Code
Add to your Cline MCP settings:
{
"mcpServers": {
"x402-tools": {
"command": "npx",
"args": ["-y", "@opspawn/x402-tools"],
"env": {
"X402_PAYMENT_TOKEN": "your-payment-signature"
}
}
}
}
From Source
git clone https://github.com/opspawn/opspawn-mcp-server.git
cd opspawn-mcp-server
npm install
node server.mjs
Environment Variables
| Variable | Default | Description |
|---|---|---|
A2A_GATEWAY_URL |
https://a2a.opspawn.com |
x402 gateway base URL |
X402_PAYMENT_TOKEN |
(empty) | Payment signature for authenticated requests |
REQUEST_TIMEOUT |
30000 |
Request timeout in milliseconds |
How x402 Payments Work
When you call a paid tool without a payment token, the gateway returns a 402 Payment Required response with pricing details. To make paid requests:
- Get a payment signature from the x402 facilitator
- Set
X402_PAYMENT_TOKENin your environment - Tools will automatically include the payment header
Without a payment token, tools will return the payment requirements so you can see pricing and payment instructions.
Gateway
All tools connect to the OpSpawn A2A x402 Gateway at https://a2a.opspawn.com. The gateway is an A2A protocol compliant agent server with x402 V2 payment integration.
- Dashboard: https://a2a.opspawn.com
- API docs: https://a2a.opspawn.com/x402
- Status: https://a2a.opspawn.com/health
License
MIT