Skip to main content
Glama
baskcart

W3 Ledger MCP Server

by baskcart

W3Ledger MCP Server

A self-verifying ledger for AI agents — every transaction is cryptographically signed and chain-linked.

W3Ledger (Rolledge) is an MCP (Model Context Protocol) server that gives AI agents the ability to check token balances, create and claim gift cards, create and claim sponsor cards, and process dual-signed purchases — all secured by cryptographic signatures.

Every write operation requires dual signatures (sender + receiver/distribution). The server-side Lambda functions verify all signatures and enforce chain continuity. The MCP server is a thin HTTP client — it cannot bypass security.


⚡ Quick Start

No installation required — just configure your AI client:

Claude Desktop (claude_desktop_config.json):

{
  "mcpServers": {
    "w3ledger": {
      "command": "npx",
      "args": ["-y", "w3ledger-mcp-server"]
    }
  }
}

Cursor (.cursor/mcp.json):

{
  "mcpServers": {
    "w3ledger": {
      "command": "npx",
      "args": ["-y", "w3ledger-mcp-server"]
    }
  }
}

VS Code (.vscode/mcp.json):

{
  "servers": {
    "w3ledger": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "w3ledger-mcp-server"]
    }
  }
}

Prerequisites

  • Node.js 18+

  • No external database or cloud credentials required — the server connects to the W3Ledger API


Related MCP server: Beeper MCP Server

🛠️ Tools (6 total)

🟢 Read (Safe)

Tool

Description

check_balance

Check DAH, DAHYM, DAHLOR, and W3SH token balances for a public key. Includes loyalty tier (Seed → Joist) with cashback rates.

🟡 Write (Requires Dual Signatures)

Tool

Description

create_gift_card

Create a gift card by debiting the customer's DAH balance. Requires customer signature + distribution co-signature.

claim_gift_card

Claim an ISSUED gift card and credit the claimer's DAH balance.

create_sponsor_card

Create a location-based sponsor card with GPS coordinates. Requires dual signatures.

claim_sponsor_card

Claim an ISSUED sponsor card near the sponsor's location.

purchase_product

Purchase a product by debiting sender and crediting receiver (merchant). Requires sender + receiver dual signatures.

❌ Excluded (Intentionally)

Tool

Reason

fund_account

Uses server-side distribution keys. Too dangerous for MCP — could credit arbitrary accounts.


🔐 Security Model

W3Ledger implements a self-verifying chain — every transaction is cryptographically linked to the previous one:

┌──────────────────────────────────────────────────────────┐
│  AI Agent (Claude / Cursor / VS Code)                    │
│  "Purchase a VR session for 35 DAH"                      │
└──────────────────┬───────────────────────────────────────┘
                   │ MCP Protocol (stdio)
┌──────────────────▼───────────────────────────────────────┐
│  W3Ledger MCP Server (thin HTTP client)                  │
│  • Forwards tool calls to API Gateway                    │
│  • Does NOT verify signatures (server does)              │
│  • Does NOT access database directly                     │
│  • Equivalent security to curl                           │
└──────────────────┬───────────────────────────────────────┘
                   │ HTTPS
┌──────────────────▼───────────────────────────────────────┐
│  API Gateway → Lambda Functions (server-side)            │
│                                                          │
│  ✅ Validates both signatures (sender + receiver)        │
│  ✅ Verifies chain continuity (prev_balance linkage)     │
│  ✅ Verifies previous transaction's signature            │
│  ✅ Checks balance sufficiency                           │
│  ✅ Enforces timestamp window (5 min)                    │
│  ✅ Atomic DynamoDB transactWrite (all-or-nothing)       │
└──────────────────────────────────────────────────────────┘

Supported Signature Schemes

Scheme

Use Case

EVM (secp256k1)

Ethereum/MetaMask wallets (personal_sign)

Ed25519 (Curve25519)

Solana, Cardano, Stellar, NEAR, Algorand, Aptos, Cosmos, TON wallets

ML-DSA-65

Post-quantum signatures (NIST standard)

SLH-DSA

Stateless hash-based post-quantum signatures


⚙️ Configuration

Environment Variables

Variable

Required

Default

Description

ROLLEDGE_API_URL

No

W3Ledger API

Base URL for the Rolledge API Gateway

ROLLEDGE_API_KEY

No

Optional API key for authenticated access

MCP_LOG_LEVEL

No

info

Logging level: debug, info, warn, error

Verify Installation

List all available tools:

npx w3ledger-mcp-server --list-tools

💡 Example Conversation

You:    "Check my balance"
Claude: [calls check_balance with your public key]
        "Your DAH balance is 1,250.00
         W3SH: 520 (Kindling tier — 10% cashback)
         DAHLOR: 0  |  DAHYM: 0"

You:    "Send a 100 DAH gift card to my friend for coffee"
Claude: [calls create_gift_card — requires your signature]
        "Please sign this transaction with your wallet..."
        [after dual signing]
        "Gift card GC-x8k2 created! Value: 100 DAH
         Your new balance: 1,150.00 DAH"

You:    "Buy a VR session for 35 DAH"
Claude: [calls purchase_product — requires sender + receiver signatures]
        "Transaction confirmed! Order #VR-2026-001
         Spent: 35 DAH  |  New balance: 1,115.00 DAH
         🏅 Cashback: 3.50 W3SH earned (Kindling tier, 10%)"

🏆 W3SH Loyalty Tiers

Purchases automatically earn W3SH cashback based on your tier:

Tier

W3SH Required

Cashback Rate

🌱 Seed

0

0%

🌿 Twig

100

5%

🔥 Kindling

500

10%

🪵 Log

2,000

15%

🏗️ Joist

10,000

20%



📄 License

MIT — see LICENSE

Available Tools

6 tools
check_balanceA

Check the token balances (DAH, DAHYM, DAHLOR, W3SH) for a public key. Returns total balance, per-token breakdown, maturity info, merchant breakdown, and W3SH loyalty tier (Seed/Twig/Kindling/Log/Joist) with cashback rate and progress.

ParametersJSON Schema
NameRequiredDescriptionDefault
player_publickeyYesThe public key (hex) to check balances for.

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden. It extensively discloses return structure including total balance, per-token breakdown, maturity info, merchant breakdown, and specific W3SH loyalty tiers (Seed/Twig/Kindling/Log/Joist) with cashback details. However, it omits operational aspects like rate limits, caching, or authentication requirements.

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 with zero waste: first establishes the action and scope, second details return values. Information is front-loaded with the primary action ('Check') first, and every clause earns its place—particularly the return value details which compensate for the missing output schema.

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 query tool, the description is complete. It explains the input (public key), the action (check balances), and comprehensively describes the return structure (total, breakdowns, maturity, loyalty tiers) despite the absence of an output schema or annotations.

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% with the parameter 'player_publickey' fully documented as 'The public key (hex) to check balances for.' The description mentions 'for a public key' but adds no additional semantic context, examples, or format details beyond what the schema already provides.

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 uses specific verb 'Check' with explicit resource 'token balances' and lists specific tokens (DAH, DAHYM, DAHLOR, W3SH). It clearly distinguishes from transactional siblings (claim_gift_card, purchase_product, etc.) by being a query operation focused on 'public key' lookup.

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?

While the 'Check' verb implies read-only usage versus the transactional siblings (claim/create/purchase), there is no explicit guidance on when to use this tool versus alternatives, prerequisites, or exclusion criteria.

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

claim_gift_cardA

Claim a gift card and credit the claimer's DAH balance. Only cards with status ISSUED can be claimed.

ParametersJSON Schema
NameRequiredDescriptionDefault
player_publickeyYesPublic key of the person claiming the card.
cardInfoYesGift card to claim (must include verification fields).

TDQS

A3.9/5.0
Behavior3/5

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

With no annotations provided, the description carries the full burden. It discloses the mutation effect (crediting DAH) and the state precondition (ISSUED status). However, it omits critical behavioral details: whether the operation is idempotent, what error occurs if already claimed, and what final state the card transitions to.

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 consists of two efficient sentences with zero redundancy. It front-loads the primary action and effect, followed by the constraint, making optimal use of limited space.

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?

For a 2-parameter mutation tool with no output schema, the description covers the core action, side effects, and primary constraint. However, it lacks completeness regarding error scenarios, authorization requirements, and the post-claim card state transition, which are important for a destructive/claim-type 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?

With 100% schema coverage, the baseline is 3. The description adds semantic value by explicitly linking 'player_publickey' to the 'claimer' role ('credit the claimer's DAH balance'), clarifying the relationship between the parameter and the action beyond the schema's mechanical description.

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 specific action ('Claim a gift card'), the resource type, and the side effect ('credit the claimer's DAH balance'). It distinguishes from siblings like claim_sponsor_card by explicitly referencing 'gift card' vs the sibling's 'sponsor card' naming.

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 provides a prerequisite constraint ('Only cards with status ISSUED can be claimed'), which helps determine when the tool is applicable. However, it lacks explicit guidance on when to use this versus claim_sponsor_card, or what to do if the card status is not ISSUED.

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

claim_sponsor_cardA

Claim a sponsor card and credit the claimer's DAH balance. Only cards with status ISSUED can be claimed.

ParametersJSON Schema
NameRequiredDescriptionDefault
player_publickeyYesPublic key of the person claiming the card.
cardInfoYesSponsor card to claim (must include verification fields).

TDQS

A3.7/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It discloses the mutation ('credit...balance') and validation constraint ('ISSUED' status), but omits idempotency guarantees, error scenarios, and whether claiming changes the card's state (e.g., consumes it).

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 with zero waste: the first states purpose and effect, the second states the validation constraint. Information is front-loaded and every sentence earns its place.

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 this is a financial mutation tool with no annotations or output schema, the description adequately covers the core operation and validation rule. However, gaps remain regarding error handling, return values, and post-claim card state.

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%, establishing a baseline of 3. The description adds value by linking 'claimer' to 'player_publickey' and specifying the 'ISSUED' status constraint for 'cardInfo', though the schema already adequately documents both 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 uses specific verbs ('Claim', 'credit') and identifies the exact resource ('sponsor card') and effect ('credit the claimer's DAH balance'). It clearly distinguishes from sibling tool 'claim_gift_card' by specifying 'sponsor card'.

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 provides a clear precondition constraint ('Only cards with status ISSUED can be claimed'), which implies when the tool will fail. However, it lacks explicit guidance on when to use this tool versus 'claim_gift_card' or other alternatives.

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

create_gift_cardA

Create a gift card by debiting the customer's DAH balance. Requires dual signatures (customer + distribution). The card value is escrowed until the recipient claims it.

ParametersJSON Schema
NameRequiredDescriptionDefault
customer_public_keyYesPublic key of the customer funding the gift card.
customer_partyKeyYesParty key identifying the customer.
cardInfoYesGift card details.
signatureYesCustomer transaction signature (EVM personal_sign).
distributionSignatureYesDistribution account co-signature for dual signing.
timestampYesISO 8601 timestamp of the transaction.

TDQS

A3.9/5.0
Behavior4/5

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

With no annotations provided, description carries full burden and successfully discloses financial impact (DAH debit), authorization requirements (dual signatures), and state management (escrow until claimed). Minor gap on error conditions or reversibility.

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 well-structured sentences: action (debit), authorization (dual-sig), and lifecycle (escrow). Every sentence conveys critical behavioral information with zero redundancy.

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?

Adequate for the core transaction flow but missing output description (no output schema exists) and lacks guidance on cardInfo content (schema shows additionalProperties: {} with no constraints).

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 100% description coverage, establishing baseline 3. Description adds value by linking 'dual signatures' to the signature/distributionSignature parameters and explaining the customer funding context, but does not elaborate on the nested cardInfo structure.

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 provides specific verb ('Create') + resource ('gift card') and distinguishes from siblings by specifying 'debiting the customer's DAH balance' (contrasting with create_sponsor_card) and 'escrowed until recipient claims' (contrasting with immediate transfers like purchase_product).

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?

Provides implied usage context through 'Requires dual signatures' and escrow mechanism, but lacks explicit when-to-use guidance or direct comparison to alternatives like create_sponsor_card or purchase_product.

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

create_sponsor_cardA

Create a location-based sponsor card by debiting the sponsor's DAH balance. Requires dual signatures. The card can be claimed by users near the sponsor location.

ParametersJSON Schema
NameRequiredDescriptionDefault
sponsor_public_keyYesPublic key of the sponsor funding the card.
cardInfoYesSponsor card details.
sponsor_locationYesGPS coordinates where the card can be claimed.
signatureYesSponsor transaction signature (EVM personal_sign).
distributionSignatureYesDistribution account co-signature for dual signing.
timestampYesISO 8601 timestamp of the transaction.

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations provided, the description carries full burden and effectively discloses critical behavioral traits: dual signature requirement (security), DAH balance debit (financial impact), and location-proximity claiming mechanism. Minor gap in not describing failure modes or validation errors.

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 tightly constructed sentences with zero waste. Front-loaded with action and cost (DAH debit), followed by critical requirement (dual signatures), then outcome (claiming mechanics). Every sentence 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?

For a 6-parameter financial/crypto tool with nested objects and no output schema, the description adequately covers the core transaction model, security requirements, and claiming behavior. Could be improved by noting validation requirements or error conditions, but the essential complexity is addressed.

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?

While schema has 100% coverage, the description adds valuable semantic context not present in structured data: explicitly linking 'signature' and 'distributionSignature' as 'dual signatures' (workflow context), and explaining the DAH economic model that justifies the 'sponsor_public_key' parameter.

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 uses specific verb 'Create' with clear resource 'location-based sponsor card'. It distinguishes from sibling 'create_gift_card' by specifying sponsor-specific mechanics: DAH balance debit, dual signatures, and location-based claiming.

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?

Provides clear context for when to use (sponsor funding location-based cards requiring dual signatures and DAH debit). While it doesn't explicitly name 'create_gift_card' as an alternative, the sponsor/DAH/location specificity makes the appropriate use case distinct.

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

purchase_productA

Purchase a product by debiting the sender's DAH balance and crediting the receiver (merchant). Requires dual signatures.

ParametersJSON Schema
NameRequiredDescriptionDefault
sender_public_keyYesPublic key of the buyer.
receiver_public_keyYesPublic key of the merchant receiving payment.
orderDetailsYesOrder information.
sender_signatureYesBuyer's transaction signature.
receiver_signatureYesMerchant's co-signature for dual signing.
timestampYesISO 8601 timestamp.

TDQS

A3.9/5.0
Behavior3/5

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

No annotations provided, so description carries full burden. Discloses critical auth requirement (dual signatures) and economic mechanism (balance transfer), but omits reversibility, error conditions (insufficient funds), return value structure, and idempotency expectations for this financial mutation.

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 efficient sentences with zero waste. Front-loaded with action verb, mechanism explanation follows immediately. No redundant filler despite covering complex financial operation.

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?

Minimum viable for a 6-parameter financial transaction tool. With no output schema and no annotations, the description covers core functionality but should ideally address success indicators, failure modes (insufficient balance), or transaction finality given the monetary stakes.

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%, establishing baseline 3. Description adds semantic value by mapping sender→buyer and receiver→merchant, and explicitly connecting the 'dual signatures' requirement to the sender_signature and receiver_signature parameters, clarifying their relational purpose.

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?

Specific verb ('Purchase') + resource ('product') + mechanism ('debiting sender's DAH balance and crediting receiver'). Clearly distinguishes from siblings like check_balance (read-only lookup) and create/claim_gift_card (card management vs direct purchase).

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?

Implies usage through mechanism description (debit/credit flow) and prerequisite ('Requires dual signatures'), but lacks explicit when-to-use guidance versus alternatives like claim_gift_card or when purchasing is preferable to other payment methods in the sibling set.

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. Dates show when Glama detected each change.

  1. 6 tool updatesv1.0.0
    • First observedcheck_balance
    • First observedclaim_gift_card
    • First observedclaim_sponsor_card
    • First observedcreate_gift_card
    • First observedcreate_sponsor_card
    • First observedpurchase_product

TDQS

A4.2/5.0
Disambiguation5/5

Each tool has a clearly distinct purpose with no overlap: check_balance for viewing balances, claim_gift_card and claim_sponsor_card for claiming different card types, create_gift_card and create_sponsor_card for creating different card types, and purchase_product for product transactions. The descriptions specify unique actions and contexts, making misselection unlikely.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern (e.g., check_balance, claim_gift_card, create_sponsor_card) with clear, descriptive terms. There are no deviations in style or convention, making the set predictable and easy to understand.

Tool Count5/5

With 6 tools, the server is well-scoped for its ledger and token management domain. Each tool serves a specific, necessary function (balance checking, card creation/claiming, and product purchases), and none feel redundant or missing, fitting typical tool counts for such a purpose.

Completeness4/5

The tool set covers core operations for token balances, gift/sponsor card lifecycle, and product purchases, with clear CRUD-like actions (create/claim for cards, check for balances, purchase for transactions). A minor gap exists in lacking update or delete operations for cards or balances, but agents can likely work around this given the escrow and dual-signature constraints described.

Maintenance

ActivityInactive
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

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/baskcart/w3ledger-mcp-server'

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