x402 Ads MCP
This server gives agents and builders access to ForgeMesh's x402 machine-commerce analytics network — free network counters and recommendation previews, plus paid demand/intent reports settled in USDC on Base via x402.
Get network counters (free) — live totals for 402s observed, agent-class requests, recommendations served, services reporting, and indexed x402 services.
Preview recommendations (free) — see the exact recommendations block the middleware would inject into a 402 for a given service, category, and endpoint.
Get terms & data disclosure (free) — canonical terms and full data-collection disclosure.
Get network stats ($0.005) — network-wide intent stats with monitor/indexer/agent classification split and ad activity.
Get intent trends ($0.01) — top endpoints and categories requested by autonomous agents, filterable by time window and result limit.
Get category demand ($0.02) — demand depth for one category: probe volume, distinct sources, buyer-class share, price points, and daily series.
Get intent report ($0.05, or free with publisher key) — why-agents-didn't-buy funnel for a service: bounce funnel, traffic classes, abandoned endpoints, retry signals.
Payment flexibility — without
WALLET_PRIVATE_KEY, paid tools return the x402 payment challenge instead of settling; with a wallet they settle automatically.Publisher free lane — set
X402_ADS_PUBLISHER_KEYto get free reports for your registered services.Bonus CLI registration — register a service as a publisher directly via
npx ... register, with a one-time $0.10 USDC payment.
@forgemeshlabs/x402-ads-mcp
Install one middleware. Monetize unused 402 responses with recommendations, discovery, and machine commerce analytics.
This is the MCP side of that network: what autonomous agents probe, want, and abandon across the x402 ecosystem — as tools for your agent.
Wraps the ForgeMesh x402 Ads & Intent Network. Paid tools settle per call in USDC on Base mainnet over the x402 protocol — no account, no API key; your wallet is the login. Publishers get reports on their own services free.
Install
{
"mcpServers": {
"intent": {
"command": "npx",
"args": ["-y", "@forgemeshlabs/x402-ads-mcp"],
"env": {
"WALLET_PRIVATE_KEY": "0x... (optional — enables paid analytics)",
"X402_ADS_PUBLISHER_KEY": "pub_... (optional — free reports on your own services)"
}
}
}
}Both env vars are optional. With neither set, free tools work fully and paid tools return the x402 payment challenge (price, network, payTo) instead of settling — useful for inspection before spending anything.
Related MCP server: affiliate-router-mcp
Bonus: one-command publisher registration
This package doubles as the signup CLI for API operators (no MCP client needed):
# read the terms first: https://ads.forgemesh.io/terms
WALLET_PRIVATE_KEY=0xYOUR_WALLET npx -y @forgemeshlabs/x402-ads-mcp register \
--url https://api.your-service.com --accept-termsOne $0.10 USDC payment on Base; the paying wallet becomes your identity and your publisher key is printed once. Invalid requests are rejected before payment — you can't pay for a doomed registration.
Tools
Tool | Price | What it returns |
| free | Live network totals: 402s observed, agent-class requests, recommendations served |
| free | The exact recommendations block the middleware injects into a 402 |
| free | Canonical terms + complete data-collection disclosure |
| $0.005 | Network totals + monitor/indexer/agent classification split |
| $0.01 | Top endpoints & categories autonomous agents request |
| $0.02 | Demand depth for one category: volume, buyer share, price points |
| $0.05 / free* | Why-agents-didn't-buy funnel for one service |
* get_intent_report is free with X402_ADS_PUBLISHER_KEY for services you contribute events to — the data co-op rule: your own data is free, forever.
Environment
Variable | Required | Purpose |
| no | Base mainnet wallet holding USDC; enables automatic settlement of paid tools |
| no | Publisher key from ads.forgemesh.io; free lane for your own reports |
| no | Per-call price cap in USD; can only LOWER the built-in cap ($0.05, or $0.10 for |
| no | Cumulative cap per process; can only LOWER the built-in $10 |
The backend URL is fixed to https://ads.forgemesh.io (the publisher key is only ever sent there). The server refuses to sign for any payee other than the ForgeMesh Ads wallet, any network other than Base mainnet, any asset other than USDC, or any amount over the cap. Use a dedicated, low-balance wallet. The key never leaves your machine — payments are signed locally (EIP-3009) and settle on-chain.
Ready-made configs live in examples/: a Claude Desktop mcpServers block and a commented env-var template.
Testing (safe by construction)
npm test # smoke: MCP boots over stdio and lists its 7 tools
npm run test:free # free tools against the live network
npm run test:challenge # every paid tool returns an x402 challenge — no wallet, nothing can spend
npm run test:all # all of the aboveNo test settles a payment. The challenge test deletes the payment env vars before loading, so it cannot move funds even if your shell has a wallet configured.
The network in one sentence
We measure machine commerce, not API content — publishers running the @forgemeshlabs/x402-ads middleware contribute anonymized 402 probe metadata; this MCP sells the aggregate demand signal back to agents and builders.
Full disclosure of what publishers send (and never send): https://ads.forgemesh.io/terms
License
MIT © ForgeMesh
Available Tools
7 toolsget_category_demandGet Category DemandA
Paid, $0.02 USDC on Base via x402. Demand depth for one category: probe volume, distinct sources, buyer-class share, price points probed, daily series. Without WALLET_PRIVATE_KEY, returns the x402 payment challenge instead of settling.
| Name | Required | Description | Default |
|---|---|---|---|
| window | No | Time window: 24h, 7d, 30d, or all (default 30d) | |
| category | Yes | Category to measure, e.g. finance, blockchain, images, tts |
get_intent_reportGet Intent ReportA
Why-agents-didn't-buy funnel for one service: bounce funnel, traffic classes, top abandoned endpoints, retry signals. FREE with X402_ADS_PUBLISHER_KEY for your registered services (the service id is bound to your key at registration); otherwise $0.05 USDC on Base via x402. Without a publisher key or WALLET_PRIVATE_KEY, returns the x402 payment challenge.
| Name | Required | Description | Default |
|---|---|---|---|
| window | No | Time window: 24h, 7d, 30d, or all (default 30d) | |
| service | Yes | Service identifier to report on |
get_intent_trendsGet Intent TrendsA
Paid, $0.01 USDC on Base via x402. Google-Trends-for-agents: top requested x402 endpoints and categories by autonomous agents, split by traffic class. Without WALLET_PRIVATE_KEY, returns the x402 payment challenge instead of settling.
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Max rows, 1-100 (default 20) | |
| window | No | Time window: 24h, 7d, 30d, or all (default 7d) |
get_network_countersGet Network CountersB
Free. Live totals for the ForgeMesh machine-commerce network: 402 responses observed, agent-class requests, recommendations served, services reporting, and x402 services indexed.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
get_network_statsGet Network StatsA
Paid, $0.005 USDC on Base via x402. Network-wide intent stats: total events, services, monitor/indexer/agent traffic classification split, and ad activity. Without WALLET_PRIVATE_KEY, returns the x402 payment challenge instead of settling.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
get_termsGet Terms & Data DisclosureA
Free. The network's canonical terms of service and complete data-collection disclosure: exactly what the middleware sends and never sends.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
preview_recommendationsPreview RecommendationsA
Free. See the exact typed recommendations block (sponsored + similar x402 services) that the @forgemeshlabs/x402-ads middleware would inject into a 402 response for a given endpoint and category.
| Name | Required | Description | Default |
|---|---|---|---|
| service | No | Your service identifier, used only for self-exclusion in results | |
| category | No | Category to match recommendations against, e.g. finance, blockchain, images | |
| endpoint | No | The probed endpoint path, e.g. /api/forecast |
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
7 tool updates
v1.0.0- First observed
get_category_demand - First observed
get_intent_report - First observed
get_intent_trends - First observed
get_network_counters - First observed
get_network_stats - First observed
get_terms - First observed
preview_recommendations
TDQS
Scored across 7 tools
Tools are mostly distinct: one for category demand, two for intent data (funnel vs trends), two for network-level stats (live counters vs detailed stats), plus terms and preview. Some overlap between get_network_counters and get_network_stats, but they target different aspects.
Almost all tools use 'get_' prefix with underscore-separated nouns, consistent and readable. The exception is 'preview_recommendations' which uses 'preview' instead of 'get', but still follows the same structure.
7 tools is well-scoped for an ads/marketplace analytics server. Each tool provides a distinct value without overwhelming the user.
Covers key analytics areas: demand, intent, network stats, terms, and ad preview. Minor gap: no tool for managing or creating ads, but that may be out of scope for this server's purpose.
Maintenance
Related MCP Connectors
AI agents publish bounties for real-world tasks. Gasless USDC payments via x402.
Give your AI agent an x402 wallet: discover and pay for services in USDC, or earn from your own.
Pay-per-call APIs for AI agents: queries, storage, ads. Billed in USDC via x402.
Machine-payable API infrastructure for autonomous agents. Per-call x402 settlement in USDC.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to discover and pay for x402-enabled services using natural language, with multi-chain support for Solana and EVM payments.26 npm1MIT
- AlicenseAqualityBmaintenanceVendor-neutral MCP server that discovers, routes, and attributes revenue across paid APIs, referral links, and affiliate programs for agent tools.8358 npmMIT
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to make micropayments using USDC on Solana via the x402 protocol, supporting payment requests, on-chain verification, and revenue tracking.MIT

@hpp-io/x402-mcp-bridgeofficial
AlicenseNot gradedqualityBmaintenanceEnables AI agents to autonomously pay for and discover services using HPP USDC.e over the x402 protocol, without API keys or manual signing.421 npmApache 2.0