Skip to main content
Glama
kevmoz

com.macaroonnetwork/mcp-server

macaroonnetwork-mcp

MCP client for Macaroon Network — a marketplace where AI agents discover, pay for (Bitcoin/Lightning via L402), and buy live data.

What this does

Four tools:

  • macaroons_search — semantic search over the live marketplace registry by natural-language intent. Free.

  • macaroons_metadata — free freshness/content-hash metadata for a feed target, before deciding whether to buy. Free.

  • macaroons_purchase / macaroons_execute — pay via Lightning L402 and receive the real, predicate-verified result. See "Paying" below — by default this package holds no wallet and doesn't attempt payment for you.

Related MCP server: mcpSovereign SDK

Paying

This package never holds a private key or wallet credential by default. When a purchase/execute call needs payment, it returns a payment_required result instead of failing:

{
  "payment_required": true,
  "invoice": "lnbc...",
  "macaroon": "eyJ...",
  "amount_msat": 250000,
  "instructions": "Pay this BOLT11 invoice with your own Lightning wallet, then call this same tool again with identical arguments PLUS resume_macaroon set to the macaroon above."
}

Pay the invoice with whatever Lightning wallet you actually have, then call the same tool again with resume_macaroon set to the macaroon above. A plain retry without resume_macaroon mints a brand-new invoice instead of resuming the one you just paid — always pass it back.

If you run your own real LND node and want this package to auto-pay from it instead of returning payment_required, set:

MACAROONS_BUYER_LND_MODE=external
LND_BUYER_HOST=your-node:10009
LND_BUYER_TLS=/path/to/tls.cert
LND_BUYER_MACAROON=/path/to/admin.macaroon

This shells out to a real lncli binary on your machine — install LND's lncli separately, it isn't bundled here.

Install

pip install macaroonnetwork-mcp

Use with an MCP client

{
  "mcpServers": {
    "macaroonnetwork": {
      "command": "macaroonnetwork-mcp"
    }
  }
}

Talks to https://api.macaroonnetwork.com by default. Override with MACAROONS_REGISTRY_URL / MACAROONS_FEED_URL env vars to point at a local dev stack instead. MACAROONS_SESSION_BUDGET_SATS (default 1000) caps total spend per server process; each tool call also takes a max_spend_sats per-call cap (default 100).

License

MIT

Available Tools

4 tools
macaroons_executeA

Execute a paid marketplace capability by capability_id. Pays via Lightning L402 against a hold invoice — payment only settles if the acceptance predicate passes against the bridge response; bridge errors and predicate failures refund. If no wallet is configured (the default), returns payment_required with a real invoice for you to pay yourself.

ParametersJSON Schema
NameRequiredDescriptionDefault
inputYesCapability input payload matching the listing input_schema.
predicateNoOptional acceptance predicate. Defaults to the listing's sample_predicate when omitted.
capability_idYesRegistry capability_id, e.g. 'polymathica-heated-channel-v1'.
max_spend_satsNoHard per-call spend cap in satoshis.
resume_macaroonNoOnly set this after a prior call returned payment_required and you've since paid that invoice with your own wallet — set it to the macaroon that call returned. Omit on a first attempt.

TDQS

A4.6/5.0
Behavior5/5

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

With no annotations, the description carries the full burden, and it delivers: it explains the hold-invoice settlement condition, refund on bridge errors or predicate failures, and the no-wallet default that returns payment_required with a real invoice. This is unusually concrete about payment behavior and error paths.

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?

Three dense sentences with the main action first, followed by payment mechanics and the default no-wallet behavior. Every sentence adds information and none repeats schema content.

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?

The complex payment flow, refund behavior, and no-wallet fallback are well covered. However, since there is no output schema, the description could be more explicit about the success return shape and how refund/error responses are surfaced; it only details the payment_required return path.

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%, but the description adds workflow-level meaning around predicate (settlement condition) and resume_macaroon (usable only after a prior payment_required) beyond the parameter descriptions. It still leaves max_spend_sats to the schema, which is acceptable because the schema already documents it.

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 names a specific verb ('Execute') and resource ('paid marketplace capability by capability_id'), and the payment mechanism makes it distinct from sibling search/metadata/purchase tools. It is immediately clear what operation the tool performs.

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 makes the tool's role clear—executing a paid capability and paying via L402—but does not explicitly state when to prefer it over macaroons_purchase or search. Context implies it, but no direct exclusions or alternatives are named.

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

macaroons_metadataA

Get free metadata for a feed target before purchasing. Returns freshness and content_hash. No payment required.

ParametersJSON Schema
NameRequiredDescriptionDefault
target_idYesThe feed target id (e.g. 'runpod').

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations, the description carries the burden of behavioral disclosure. It does well by stating the operation is free, requires no payment, and returns specific fields. It could have been more explicit that it performs no purchase or execution, but the 'Get' and 'before purchasing' framing strongly implies a read-only, non-destructive action.

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 tight sentences, front-loaded with the main action and outcome. Every sentence adds value: what it does, what it returns, and that no payment is required. No filler.

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

Completeness5/5

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

For a single-parameter metadata lookup with no output schema, the description provides enough context: when to call it, what it returns, and its cost/behavior. It is sufficient for an agent to select and invoke the tool correctly in the purchase workflow implied by the siblings.

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%: the schema already documents target_id clearly. The description adds only the phrase 'feed target' which aligns with the schema, but does not enrich parameter semantics meaningfully beyond the schema. Baseline 3 applies.

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 states a specific verb ('Get'), a clear resource ('metadata for a feed target'), and concrete outputs ('freshness and content_hash'). It also distinguishes itself from purchase-related siblings by explicitly saying it is for 'before purchasing' and requires no payment.

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 gives clear usage timing: use this when you want free metadata 'before purchasing'. It does not explicitly name alternatives or exclusion conditions, but the 'before purchasing' signal is enough to orient the agent relative to siblings like macaroons_purchase and macaroons_execute.

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

macaroons_purchaseA

Purchase change-events for a feed target. Pays via Lightning L402 against a hold invoice — payment only settles if the acceptance predicate passes against the delivered payload; otherwise it is fully refunded. If no wallet is configured (the default), returns payment_required with a real invoice for you to pay yourself.

ParametersJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum number of change-events to return
sinceNoISO-8601 timestamp — only change-events after this are considered. Defaults to 30 days ago.
predicateYesAcceptance predicate. Payment only settles if this passes against the real delivered payload.
target_idYesThe feed target id from macaroons_metadata
max_spend_satsNoHard per-call spend cap in satoshis.
resume_macaroonNoOnly set this after a prior call returned payment_required and you've since paid that invoice with your own wallet — set it to the macaroon that call returned. Omit on a first attempt.

TDQS

A4.2/5.0
Behavior5/5

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

With no annotations, the description carries full burden and does an excellent job: it discloses hold-invoice settlement, refund-on-failed-predicate, no-wallet default behavior, and the need to pay a returned invoice manually. Nothing important is hidden.

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?

Three tight sentences, with the core purpose first, the payment settlement mechanism second, and the no-wallet fallback last. Every clause earns its place and the unusual L402 behavior is explained compactly.

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?

The description covers the complex payment semantics, refund path, and fallback despite no output schema or annotations. It is slightly incomplete about what a successful paid response contains, but the phrase 'change-events' and rich input schema make the remaining gap minor.

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 baseline is 3. The tool-level description mostly restates what the predicate and resume_macaroon schemas already say, adding no substantive parameter-level insight beyond the structured descriptions.

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 opens with a specific verb and object ('Purchase change-events for a feed target') and names the resource being acted on. The paid/retrieval nature and the feed-target scope distinguish it from search, metadata, and execute siblings.

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?

It explains the payment flow and fallback behavior, and references feed target id from macaroons_metadata, giving some contextual guidance. However, it never explicitly states when to prefer this tool over macaroons_search or macaroons_execute, nor does it give when-not-to-use conditions.

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

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 4 tool updatesv0.2.0
    • First observedmacaroons_execute
    • First observedmacaroons_metadata
    • First observedmacaroons_purchase
    • First observedmacaroons_search

TDQS

A4.1/5.0

Scored across 4 tools

Disambiguation4/5

Each tool targets a distinct stage: search discovers capabilities, metadata inspects a specific feed target pre-purchase, purchase acquires change-events, and execute runs a paid capability. Search and metadata both return freshness, which causes slight overlap, but their inputs and outputs are different enough for an agent to choose correctly.

Naming Consistency4/5

All tools share the macaroons_ prefix and mostly follow a macaroons_<action> pattern. Three are clear verbs (search, purchase, execute), while metadata is a noun rather than get_metadata, creating a minor inconsistency but not a confusing one.

Tool Count5/5

Four tools is well-scoped for this marketplace-focused server: discover, inspect, acquire, and use. Each tool has a clear purpose and none feel redundant or extraneous.

Completeness4/5

The core lifecycle for a paid capability marketplace is covered: find capabilities, inspect feed metadata, purchase change-events, and execute capabilities. A minor gap is the lack of a tool to list previously purchased capabilities or check wallet/payment status, but agents can likely work around that using returned capability IDs.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • -
    license
    Not graded
    quality
    Not graded
    maintenance
    Enables AI agents to discover, purchase, and query blockchain-based datasets using Filecoin/IPFS storage with Ethereum NFT access controls and Lit Protocol encryption. Provides a decentralized marketplace for secure dataset trading with automatic purchase workflows and SQL query capabilities.
    0
    -
  • A
    license
    Not graded
    quality
    Not graded
    maintenance
    A two-sided marketplace that enables AI agents to buy and sell datasets, prompt packs, and MCP tools using Bitcoin Lightning for instant settlement. It provides agents with tools to manage local stores, publish products globally, and earn credits through a specialized economy.
    388
    1
    -
  • A
    license
    A
    quality
    A
    maintenance
    Agent-to-agent commerce over Bitcoin Lightning: buy, sell, list, and discover files, data, APIs, and compute on a public marketplace (or privately by offer id). Non-custodial, buyers pay sellers wallet-to-wallet and a verified payment preimage unlocks the result.
    6
    27
    686
    MIT No Attribution