Back to Browse

X402 Ads MCP Server

Developer ToolsUse Caution4.8MCP RegistryLocal
Free

Server data from the Official MCP Registry

x402 ad recommendations, intent analytics, and machine-commerce demand reports.

About

x402 ad recommendations, intent analytics, and machine-commerce demand reports.

Security Report

4.8
Use Caution4.8High Risk

Well-architected MCP server for x402 machine-commerce analytics with proper credential handling and authentication design. The codebase demonstrates thoughtful security patterns: private keys never leave the machine, payments are signed locally, optional auth enables challenge-first payment flows, and environment-based configuration prevents accidental exposure. Minor code quality observations around error handling breadth and input validation do not materially impact security posture. Supply chain analysis found 3 known vulnerabilities in dependencies (0 critical, 3 high severity). Package verification found 1 issue.

6 files analyzed · 9 issues found

Security scores are indicators to help you make informed decisions, not guarantees. Always review permissions before connecting any MCP server.

Permissions Required

This plugin requests these system permissions. Most are normal for its category.

HTTP Network Access

Connects to external APIs or services over the internet.

env_vars

Check that this permission is expected for this type of plugin.

What You'll Need

Set these up before or after installing:

Optional dedicated low-balance Base wallet private key for settling paid x402 analytics calls. Without it, paid tools return the x402 payment challenge instead of settling.Required

Environment variable: WALLET_PRIVATE_KEY

Optional publisher key from ads.forgemesh.io. Makes get_intent_report free for your registered services.Required

Environment variable: X402_ADS_PUBLISHER_KEY

Optional intent network base URL. Defaults to https://ads.forgemesh.io.Optional

Environment variable: X402_ADS_BASE_URL

Optional Base mainnet RPC URL. Defaults to https://mainnet.base.org.Optional

Environment variable: BASE_RPC_URL

How to Install

Add this to your MCP configuration file:

{
  "mcpServers": {
    "io-github-forgemeshlabs-x402-ads-mcp": {
      "env": {
        "BASE_RPC_URL": "your-base-rpc-url-here",
        "X402_ADS_BASE_URL": "your-x402-ads-base-url-here",
        "WALLET_PRIVATE_KEY": "your-wallet-private-key-here",
        "X402_ADS_PUBLISHER_KEY": "your-x402-ads-publisher-key-here"
      },
      "args": [
        "-y",
        "@forgemeshlabs/x402-ads-mcp"
      ],
      "command": "npx"
    }
  }
}

Documentation

View on GitHub

From the project's GitHub README.

@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.

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-terms

One $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

ToolPriceWhat it returns
get_network_countersfreeLive network totals: 402s observed, agent-class requests, recommendations served
preview_recommendationsfreeThe exact recommendations block the middleware injects into a 402
get_termsfreeCanonical terms + complete data-collection disclosure
get_network_stats$0.005Network totals + monitor/indexer/agent classification split
get_intent_trends$0.01Top endpoints & categories autonomous agents request
get_category_demand$0.02Demand depth for one category: volume, buyer share, price points
get_intent_report$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

VariableRequiredPurpose
WALLET_PRIVATE_KEYnoBase mainnet wallet holding USDC; enables automatic settlement of paid tools
X402_ADS_PUBLISHER_KEYnoPublisher key from ads.forgemesh.io; free lane for your own reports
X402_ADS_BASE_URLnoOverride the network base URL (default https://ads.forgemesh.io)
BASE_RPC_URLnoOverride the Base RPC (default https://mainnet.base.org)

Use a dedicated hot wallet holding only small working balances. 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 above

No 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

Reviews

No reviews yet

Be the first to review this server!