@clawmart/discovery
v1.0.0
Published
MCP server for discovering and calling x402 payment-enabled APIs
Maintainers
Readme
Clawmart Discovery MCP Server
An MCP (Model Context Protocol) server that enables Claude and other AI assistants to discover and call x402 payment-enabled APIs.
How It Works
This MCP supports both:
- Discovery: find the right API by intent, trust score, price
- Execution: call an API with payments handled automatically
Execution behavior (proxy-first):
- Tries Clawmart's proxy first (free trial / platform credits, if available)
- If the proxy returns 402 (credits exhausted), falls back to direct x402 wallet payment
Tools
search_x402_apis
Search for x402 APIs by natural language intent.
Arguments:
query(required) - What API you're looking for (e.g., "get weather data for a city")tags- Filter by category: ai, crypto, data, media, finance, social, devminTrustScore- Minimum trust score (0-100). Recommend 50+ for production.maxPrice- Maximum price in USDC per requestlimit- Number of results (default: 5, max: 20)
Returns: List of endpoints with trust scores, pricing, relevance scores
get_api_details
Get detailed specification for a specific endpoint.
Arguments:
url(required) - The endpoint URL
Returns:
- Request schema (method, input schema, example request)
- Response info (content types, example response)
- Pricing (price in USDC, payTo address)
- Trust metrics (score, success rate, total evaluations)
call_x402_api
Call an x402 endpoint.
Behavior:
- Calls
POST /api/proxyon the configured Clawmart dashboard first. - Falls back to direct x402 payment only when the proxy returns
402.
Arguments:
url(required) - The endpoint URL to callmethod- GET or POSTparams- Query params (GET)body- JSON body (POST)
Returns:
- Response status/body/content-type
- Whether the proxy was used, and whether direct wallet payment was used
- Transaction hash (when direct wallet payment is made)
Installation
For Claude Desktop
Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json):
{
"mcpServers": {
"clawmart-discovery": {
"command": "npx",
"args": ["-y", "@clawmart/discovery"],
"env": {
"X402_DASHBOARD_API_URL": "https://clawmart.xyz",
"X402_WALLET_PRIVATE_KEY": "0x...",
"X402_MAX_PRICE_PER_CALL": "0.01"
}
}
}
}For local development, you can also point Claude Desktop directly at a built file:
{
"mcpServers": {
"clawmart-discovery": {
"command": "node",
"args": ["/absolute/path/to/mcp-server/dist/index.js"],
"env": {
"X402_DASHBOARD_API_URL": "http://localhost:3000",
"X402_WALLET_PRIVATE_KEY": "0x...",
"X402_MAX_PRICE_PER_CALL": "0.01"
}
}
}
}Configuration
| Environment Variable | Description | Default |
|---------------------|-------------|---------|
| X402_DASHBOARD_API_URL | Dashboard API URL | http://localhost:3000 |
| X402_WALLET_PRIVATE_KEY | Wallet key used to sign proxy requests and (if needed) pay directly | null |
| X402_NETWORK | EVM network identifier | eip155:8453 |
| X402_MAX_PRICE_PER_CALL | Refuse direct wallet payment above this price | 0.01 |
Trust Levels
Trust scores are calculated from evaluation data:
- High (75-100) - Reliable, recommended for production
- Medium (50-74) - Usable with caution
- Low (25-49) - Unreliable, may have issues
- Unknown (<25) - Insufficient evaluation data
Example Usage
User: "Find me an API that can get crypto token prices"
Claude uses search_x402_apis with query="crypto token prices"
Result:
- TokenPrice API (trust: 92, $0.001/call) - "Get real-time token prices on Base"
- CryptoData API (trust: 78, $0.002/call) - "Historical and current crypto prices"
User: "Get details on the first one"
Claude uses get_api_details with url="https://tokenprice.example.com/api"
Result includes request schema, example calls, pricing info
User: "Call it to get ETH price"
Claude uses call_x402_api.
It will try the Clawmart proxy first (free trial/credits). If exhausted, it will pay directly with x402.Development
# Install dependencies
npm install
# Run in development mode
npm run dev
# Build
npm run build
# Run built version
npm startLicense
MIT
Related
- x402 Protocol - The payment protocol specification
