askclaude-mcp
v1.0.0
Published
MCP server for AskClaude — pay-per-query Claude AI via x402 micropayments
Maintainers
Readme
askclaude-mcp
MCP (Model Context Protocol) server for AskClaude — pay-per-query Claude AI via x402 micropayments.
This server exposes AskClaude's paid endpoints as tools that Claude Code (or any MCP client) can call. Each tool call triggers a request to the AskClaude x402 service, where payment is handled in USDC on Base network.
Tools
| Tool | Description | Cost |
|------|-------------|------|
| ask_claude | Ask Claude Haiku/Sonnet/Opus a question | $0.01 / $0.03 / $0.10 |
| summarize | Summarize text (articles, docs, whitepapers) | $0.02 |
| code_review | Review code with quality score and suggestions | $0.05 |
| translate | Translate text between any languages | $0.02 |
| sentiment | Analyze sentiment of text | $0.01 |
| crypto_analysis | AI crypto analysis with live CoinGecko data | $0.03 |
Installation
Option 1: Add to Claude Code MCP config
Add this to your Claude Code settings (~/.claude/settings.json or project .mcp.json):
{
"mcpServers": {
"askclaude": {
"command": "node",
"args": ["/path/to/askclaude-mcp/index.js"],
"env": {
"ASKCLAUDE_BASE_URL": "https://askclaude.shop"
}
}
}
}Option 2: Run with npx (after publishing)
{
"mcpServers": {
"askclaude": {
"command": "npx",
"args": ["askclaude-mcp"],
"env": {
"ASKCLAUDE_BASE_URL": "https://askclaude.shop"
}
}
}
}Option 3: Run manually
cd askclaude-mcp
npm install
node index.jsEnvironment Variables
| Variable | Description | Default |
|----------|-------------|---------|
| ASKCLAUDE_BASE_URL | AskClaude service URL | Cloudflare tunnel URL |
| ASKCLAUDE_API_KEY | Optional API key for authenticated access | (none) |
How x402 Payment Works
- You call a tool (e.g.,
ask_claudewith prompt "What is Bitcoin?") - The MCP server sends the request to the AskClaude service
- The service is gated by x402 — it requires USDC payment on Base network
- If payment is configured (via x402 client wallet), it's handled automatically
- The AI response is returned as the tool result
For the payment flow to work end-to-end, the AskClaude service handles x402 negotiation. Users interact with the service through this MCP layer — the x402 payment middleware on the server side validates payments before processing requests.
Usage Examples
Once configured in Claude Code, you can use natural language:
- "Use askclaude to ask opus: what are the implications of quantum computing on cryptography?"
- "Summarize this article using askclaude"
- "Review this Python code with askclaude"
- "Translate 'hello world' to Japanese using askclaude"
- "What's the sentiment of this tweet? Use askclaude"
- "Get crypto analysis for ethereum using askclaude"
Development
# Install dependencies
npm install
# Test locally (stdio mode)
echo '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"test","version":"1.0.0"}}}' | node index.js
# Point to local service
ASKCLAUDE_BASE_URL=http://localhost:4021 node index.jsArchitecture
Claude Code --(MCP/stdio)--> askclaude-mcp --(HTTP/x402)--> AskClaude Service
(user) (this package) (askclaude.shop)
|
Claude API (Anthropic)
CoinGecko (prices)License
MIT
