x402-data-mcp
# x402-data-mcp
<!-- mcp-name: io.github.ucsandman/x402-data-mcp -->
An MCP server that gives your agent 23 pay-per-call data tools: company enrichment by domain, Google News, YouTube
channels, Telegram channels, Shopify and WooCommerce products, Google Play reviews, Google Trends, company job boards,
website contacts, clean web pages, wallet balances, transactions, contracts, ENS, NFTs, gas, Chainlink prices, FX rates
and weather.
Each call costs $0.002 to $0.02 in USDC on Base, paid with [x402](https://x402.org). No account, no API key, no
subscription. Your own wallet pays; the key never leaves your machine.
## Install
Claude Desktop, one click: download `x402-data-mcp.mcpb` from the
[latest release](https://github.com/ucsandman/x402-data-mcp/releases/latest), open it, and paste your wallet key into
the extension settings.
Claude Code:
```bash
claude mcp add x402-data -e X402_PRIVATE_KEY=0xYOUR_BASE_WALLET_KEY -- npx -y github:ucsandman/x402-data-mcp
```
Claude Desktop (`claude_desktop_config.json`) or Cursor (`~/.cursor/mcp.json`):
```json
{
"mcpServers": {
"x402-data": {
"command": "npx",
"args": ["-y", "github:ucsandman/x402-data-mcp"],
"env": { "X402_PRIVATE_KEY": "0xYOUR_BASE_WALLET_KEY" }
}
}
}
```
Without `X402_PRIVATE_KEY` the server still starts: `list_tools_and_prices` works and every paid tool answers with
its price and setup steps instead of data. Use a separate wallet that holds only a few dollars of USDC on Base.
| env var | default | meaning |
|---|---|---|
| `X402_PRIVATE_KEY` | unset | private key of your Base wallet; signs one USDC payment per paid call |
| `X402_MAX_USD` | `0.05` | highest price the server will pay for one call |
## Tools
`list_tools_and_prices` is free. Every other tool is one paid HTTP route; the price is in its description.
| tool | price | returns | required |
|---|---|---|---|
| `get_balances` | $0.002 | Wallet balances on five EVM chains | address |
| `get_transaction` | $0.002 | Transaction status and receipt by hash, chain auto-detected | hash |
| `inspect_contract` | $0.002 | Is it a contract, a proxy or a token, on five chains | address |
| `resolve_ens` | $0.003 | ENS / Basename to address, or address to primary name | (none) |
| `get_company_jobs` | $0.004 | Open jobs at one company, from its applicant tracking system | board |
| `get_website_contacts` | $0.003 | Emails, phones and social profiles from a company website | url |
| `enrich_company` | $0.01 | Company enrichment by domain: firmographics, contacts, socials, tech stack, email setup and domain age in one call | domain |
| `get_google_trends` | $0.02 | Google Trends for up to 5 keywords: over time, by region, related | keyword |
| `search_google_news` | $0.003 | Google News articles for any search or topic, with publisher URLs | (none) |
| `get_youtube_channel_videos` | $0.003 | A YouTube channel's latest videos, shorts or streams with views, likes, dates and subscriber count | channel |
| `get_telegram_channel_posts` | $0.004 | Recent posts from a public Telegram channel: text, views, reactions, media, links | channel |
| `get_store_products` | $0.003 | Products, prices, stock and variants from any Shopify or WooCommerce store by domain | url |
| `get_google_play_app` | $0.009 | Google Play app details and up to 100 reviews by package id or link | app |
| `get_chain_head` | $0.003 | Latest block and its age on five EVM chains | (none) |
| `get_gas_prices` | $0.003 | Gas tiers and transfer cost in USD on five EVM chains, cheapest first | (none) |
| `get_nft_holdings` | $0.002 | Token ids an address holds in one ERC-721 collection | owner, contract |
| `get_nft_metadata` | $0.002 | Resolved metadata JSON, image and attributes for any ERC-721 or ERC-1155 token | contract, tokenId |
| `get_nft_owner` | $0.003 | Current owner of an ERC-721 token | contract, tokenId |
| `get_erc1155_balance` | $0.003 | ERC-1155 balances of an address for up to 50 token ids | owner, contract, ids |
| `get_crypto_prices` | $0.003 | Live Chainlink oracle prices for up to 20 crypto assets in USD | symbols |
| `read_web_page` | $0.003 | Fetch a public web page and return clean markdown or plain text with its title and metadata | url |
| `get_weather` | $0.003 | Current weather and a 3-day forecast for a place name or latitude and longitude | (none) |
| `get_exchange_rates` | $0.003 | Latest or historic ECB reference exchange rates with optional amount conversion | (none) |
The routes are served by [Data for Agents](https://x402-wallet-balances.vercel.app) and
[x402 Toolbox](https://x402-toolbox.vercel.app); each has a docs page, `/openapi.json` and `/llms.txt`.
## How payment works
1. The tool sends a normal GET to the route. The route answers HTTP 402 with its price.
2. The server checks the request against its own catalog: exact amount, USDC on Base, the listed receiving wallet.
Anything else is refused and nothing is signed.
3. It signs one USDC transfer authorization for that amount with your key (`@x402/fetch`, `@x402/evm`) and retries.
4. You are charged only when the route answers with data. Bad input (400), not found (404) and upstream errors (502)
are not charged.
## Develop
```bash
npm install
npm test # offline: MCP surface, payment signing against a fake 402, refusal cases
npm run test:live # unpaid GETs to the live routes: each must answer 402 at the catalog price
npm run sync # regenerate src/catalog.ts from the live openapi.json files
npm run build
npm run mcpb # build x402-data-mcp.mcpb for a release
```
MIT license.
TDQS
Scored across 24 tools
Most tools target a clearly distinct resource+action (balances vs. transaction vs. contract inspect vs. gas vs. chain head), so an agent can pick confidently. The main overlap is get_website_contacts vs. enrich_company, which both take a domain and return emails/phones/socials, and the NFT family (holdings/metadata/owner/erc1155 balance) requires reading descriptions closely to separate ERC-721 from ERC-1155 cases.
Every name is snake_case with a leading verb (get_, list_, search_, inspect_, resolve_, enrich_, read_) followed by the resource. Verb variation is meaningful rather than arbitrary, and no naming style is mixed.
24 tools sits at the heavy end of the acceptable band, and the surface splits into two loosely related halves (on-chain crypto data vs. web-scraping data), making the set feel like a marketplace catalog rather than one coherent server. Each tool is individually justified as a paid endpoint, but the total is more than an agent can comfortably scan.
Coverage is broad with no obvious dead ends: wallet/balances, tx status, contract inspection, ENS, gas, chain head, NFT reads, prices, plus a large web-data wing. Gaps are minor (no block-by-number/timestamp lookup, no token transfer history, no general web search, no address transaction list), and agents can work around them via get_transaction or read_web_page.