Skip to main content
Glama

@forgemeshlabs/x402-ads-mcp

M8ven Score

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

Tool

Price

What it returns

get_network_counters

free

Live network totals: 402s observed, agent-class requests, recommendations served

preview_recommendations

free

The exact recommendations block the middleware injects into a 402

get_terms

free

Canonical terms + complete data-collection disclosure

get_network_stats

$0.005

Network totals + monitor/indexer/agent classification split

get_intent_trends

$0.01

Top endpoints & categories autonomous agents request

get_category_demand

$0.02

Demand 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

Variable

Required

Purpose

WALLET_PRIVATE_KEY

no

Base mainnet wallet holding USDC; enables automatic settlement of paid tools

X402_ADS_PUBLISHER_KEY

no

Publisher key from ads.forgemesh.io; free lane for your own reports

X402_ADS_BASE_URL

no

Override the network base URL (default https://ads.forgemesh.io)

BASE_RPC_URL

no

Override 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

Available Tools

7 tools
get_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.

ParametersJSON Schema
NameRequiredDescriptionDefault
windowNoTime window: 24h, 7d, 30d, or all (default 30d)
categoryYesCategory to measure, e.g. finance, blockchain, images, tts

TDQS

A3.7/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden. It discloses the payment mechanism ($0.02 USDC via x402) and the fallback behavior without WALLET_PRIVATE_KEY. However, it does not describe the response structure, error handling, or side effects, leaving gaps.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, no fluff. The first sentence states core functionality, the second adds critical behavioral context. Information is front-loaded and efficient.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (payment, multiple metrics, no output schema), the description is adequate but incomplete. It lists returned data dimensions but not their format, lacks error scenarios, and does not clarify how the payment challenge works in detail. Sibling tools are not referenced for context.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents both parameters. The description repeats the schema examples without adding new meaning. Baseline 3 is appropriate as the description adds no semantic value beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: retrieving demand depth for a category, listing specific metrics (volume, sources, buyer-class share, price points, daily series). It uses a specific verb+resource pattern and distinguishes from siblings like get_intent_reports and get_network_stats.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage when category demand data is needed but lacks explicit when-to-use or when-not-to-use guidance. It mentions payment requirements but does not compare with sibling tools or provide exclusion criteria.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
windowNoTime window: 24h, 7d, 30d, or all (default 30d)
serviceYesService identifier to report on

TDQS

A4.2/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description bears the full burden. It discloses key behaviors: returns a funnel report for a service, and without proper authentication/payment returns a challenge. It does not detail output format but is sufficiently transparent.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, dense sentence that efficiently conveys purpose and payment model. No unnecessary words, well-structured with front-loaded action description.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given only two parameters and no output schema, the description adequately covers what the tool does, its prerequisites (key or payment), and the fallback behavior. It could mention return format but is complete enough for an agent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the schema already documents both parameters. The description adds no additional semantic detail about the 'service' or 'window' parameters beyond what is in the schema, just pricing context about the key binding.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: generating an intent report funnel for a specific service, listing components like bounce funnel, traffic classes, etc. It distinguishes from siblings like get_intent_trends by focusing on a single service's funnel.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explains when to use the tool based on payment model (free with key, otherwise paid) and mentions the alternative of returning a payment challenge without proper credentials. It does not explicitly compare to siblings, but the context is clear enough.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

B3.3/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided, so the description carries full burden. It mentions 'Live' totals and 'Free', but does not disclose idempotency, authentication needs, rate limits, or other behavioral traits.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is short but includes a specific number ('402 responses observed') that may be confusing as a static example rather than a live value. It could be more general.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Without an output schema, the description should explain the return structure. It lists counters but does not clarify if these are all fields or just a sample, leaving ambiguity.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema has zero parameters, so the description adds value by listing the specific counters returned (responses observed, agent-class requests, etc.), providing context beyond the empty schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states it provides 'live totals for the ForgeMesh machine-commerce network' and lists specific counters, distinguishing it from sibling tools like get_network_stats.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this tool versus alternatives. The only contextual clue is 'Free', but no mention of recommended use cases or prerequisites.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A3.7/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so description carries full burden. It discloses the paid nature ($0.005 USDC via x402) and the conditional behavior that without WALLET_PRIVATE_KEY it returns a payment challenge instead of data. This is valuable beyond basic stats listing.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences: first covers payment and stats content, second explains alternative behavior. No redundant information, every sentence adds value.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no output schema and no nested objects, description adequately covers the key aspects: payment, data content, and conditional behavior. Misses rate limits or update frequency, but overall complete for a simple read operation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Input schema has zero parameters with 100% coverage, so baseline is 4. Description adds meaning by stating it returns 'network-wide' stats, confirming no filtering parameters are needed. No additional parameter details required.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description clearly states it retrieves network-wide intent stats including total events, services, traffic classification, and ad activity. While it doesn't explicitly differentiate from sibling tools like get_category_demand or get_intent_report, the specific resource 'network stats' and mention of payment model make the purpose distinct enough.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this tool versus alternatives. It mentions payment and behavior without wallet key, but does not specify context prerequisites or scenarios for choosing this over sibling tools.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations exist, so description carries full burden. It mentions the tool is free and returns canonical terms and complete disclosure. However, it lacks details on authentication, rate limits, or response format. Adequate for a simple read-only tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two concise sentences (20 words) with no filler. Front-loaded with 'Free.' First sentence gives core info, second adds precision. Every word earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Tool is extremely simple (0 params, no output schema, no annotations). Description fully captures what it does. Could hint at response format, but is complete enough for an agent to invoke correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema has no properties (100% coverage by default). Description adds no parameter details, but none are needed. Per calibration, high coverage gives baseline 3.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description clearly states verb 'get' and resource 'terms of service and complete data-collection disclosure'. It distinguishes itself from sibling tools like 'get_category_demand' and 'get_network_stats' by focusing on legal/informational content.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Although no explicit alternatives or exclusions are mentioned, the tool's unique purpose (terms & data disclosure) makes its usage self-evident. The 'Free.' tag hints at no cost for invocation. Sibling tools are clearly different in domain.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
serviceNoYour service identifier, used only for self-exclusion in results
categoryNoCategory to match recommendations against, e.g. finance, blockchain, images
endpointNoThe probed endpoint path, e.g. /api/forecast

TDQS

A3.8/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, and the description only mentions 'Free.' and the output composition ('sponsored + similar x402 services'). It does not disclose behavioral traits such as side effects, authorization needs, rate limits, or read-only nature. This is insufficient for a tool with no annotation support.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise, consisting of two sentences that front-load the key information (free, purpose, inputs). Every word earns its place; no redundant or vague phrasing.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has full schema coverage, no output schema, and no annotations, the description provides sufficient clarity on purpose and inputs. It mentions the output composition but lacks details on the exact format. It is adequate for a low-complexity tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% with each parameter described. The description adds context beyond the schema (e.g., self-exclusion for service, sponsored + similar for category/endpoint). It slightly improves the understanding of parameters.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly identifies the tool's purpose: to preview the recommendations block for the x402-ads middleware. It specifies the action ('See'), the resource ('typed recommendations block'), and the inputs ('endpoint and category'). It distinguishes itself from sibling tools which are analytics/reporting tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage when wanting to preview recommendations, but does not provide explicit guidance on when to use this tool versus alternatives (e.g., get_category_demand). No exclusions or prerequisites are mentioned.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

TDQS

A3.8/5.0
Disambiguation4/5

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.

Naming Consistency4/5

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.

Tool Count5/5

7 tools is well-scoped for an ads/marketplace analytics server. Each tool provides a distinct value without overwhelming the user.

Completeness4/5

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

ActivityMaintained
ResponsivenessSyncing

Related MCP Connectors

Related MCP Servers

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/forgemeshlabs/x402-ads-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server