@x402scan/mcp 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,115 @@
1
+ # x402scan-mcp
2
+
3
+ MCP server for calling [x402](https://x402.org)-protected APIs with automatic payment handling.
4
+
5
+ ## Install
6
+
7
+ ### Claude Code
8
+
9
+ ```bash
10
+ claude mcp add x402scan --scope user -- npx -y x402scan-mcp@latest
11
+ ```
12
+
13
+ ### Codex
14
+
15
+ ```bash
16
+ codex mcp add x402scan -- npx -y x402scan-mcp@latest
17
+ ```
18
+
19
+ ### Cursor
20
+
21
+ [![Install MCP Server](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en/install-mcp?name=x402scan&config=eyJjb21tYW5kIjoiL2Jpbi9iYXNoIiwiYXJncyI6WyItYyIsInNvdXJjZSAkSE9NRS8ubnZtL252bS5zaCAyPi9kZXYvbnVsbDsgZXhlYyBucHggLXkgeDQwMnNjYW4tbWNwQGxhdGVzdCJdfQ%3D%3D)
22
+
23
+ ### Claude Desktop
24
+
25
+ [![Add to Claude](https://img.shields.io/badge/Add_to_Claude-x402scan-blue?logo=anthropic)](https://github.com/merit-systems/x402scan-mcp/raw/main/x402scan.mcpb)
26
+
27
+ <details>
28
+ <summary>Manual installation</summary>
29
+
30
+ **Codex** - Add to `~/.codex/config.toml`:
31
+
32
+ ```toml
33
+ [mcp_servers.x402scan]
34
+ command = "npx"
35
+ args = ["-y", "x402scan-mcp@latest"]
36
+ ```
37
+
38
+ **Cursor** - Add to `.cursor/mcp.json`:
39
+
40
+ ```json
41
+ {
42
+ "mcpServers": {
43
+ "x402scan": {
44
+ "command": "/bin/bash",
45
+ "args": [
46
+ "-c",
47
+ "source $HOME/.nvm/nvm.sh 2>/dev/null; exec npx -y x402scan-mcp@latest"
48
+ ]
49
+ }
50
+ }
51
+ }
52
+ ```
53
+
54
+ **Claude Desktop** - Add to `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS) or `%APPDATA%\Claude\claude_desktop_config.json` (Windows):
55
+
56
+ ```json
57
+ {
58
+ "mcpServers": {
59
+ "x402scan": {
60
+ "command": "/bin/bash",
61
+ "args": [
62
+ "-c",
63
+ "source $HOME/.nvm/nvm.sh 2>/dev/null; exec npx -y x402scan-mcp@latest"
64
+ ]
65
+ }
66
+ }
67
+ }
68
+ ```
69
+
70
+ </details>
71
+
72
+ ## Usage
73
+
74
+ On first run, a wallet is generated at `~/.x402scan-mcp/wallet.json`. Deposit USDC on Base to the wallet address before making paid API calls.
75
+
76
+ **Workflow:**
77
+
78
+ 1. `check_balance` - Check wallet and get deposit address
79
+ 2. `query_endpoint` - Probe endpoint for pricing/schema (optional)
80
+ 3. `execute_call` - Make the paid request
81
+
82
+ ## Tools (4)
83
+
84
+ | Tool | Description |
85
+ | ------------------ | ------------------------------------------------------ |
86
+ | `check_balance` | Get wallet address and USDC balance |
87
+ | `query_endpoint` | Probe x402 endpoint for pricing/schema without payment |
88
+ | `validate_payment` | Pre-flight check if payment would succeed |
89
+ | `execute_call` | Make paid request to x402 endpoint |
90
+
91
+ ## Environment
92
+
93
+ | Variable | Description |
94
+ | ------------------ | --------------------------------- |
95
+ | `X402_PRIVATE_KEY` | Override wallet (optional) |
96
+ | `X402_DEBUG` | Set to `true` for verbose logging |
97
+
98
+ ## Supported Networks
99
+
100
+ Base, Base Sepolia, Ethereum, Optimism, Arbitrum, Polygon (via CAIP-2)
101
+
102
+ ## Develop
103
+
104
+ ```bash
105
+ bun install
106
+
107
+ # Add local server to Claude Code
108
+ claude mcp add x402scan-dev -- bun run /path/to/x402scan-mcp/src/index.ts
109
+
110
+ # Build
111
+ bun run build
112
+
113
+ # Build .mcpb for Claude Desktop
114
+ bun run build:mcpb
115
+ ```