Skip to main content
Delegare provides an official MCP Server that enables LLMs (like Claude or GPT-4) to perform economic actions autonomously using Intent Mandates. The server is available in the packages/mcp-server directory of the Vault repository.

Available Tools

The MCP server exposes the following tools to the agent:

1. setup_spending_mandate

Generates a setup URL for the human user.
  • Input: maxAmountPerTxCents, maxMonthlySpendCents, railPreference
  • Output: A markdown link for the user to authorize.

2. check_mandate_balance

Allows the agent to see how much it can spend.
  • Input: mandateId
  • Output: Remaining monthly balance.

3. authorize_agent_payment

The core tool for making purchases.
  • Input: amountCents, currency, description, recipient
  • Output: A cryptographic Intent Mandate (SD-JWT-VC) or a success receipt if the server handles the execution.

4. delegare_fetch

A tool for scraping or fetching data from third-party APIs that may be monetized.
  • Input: url, method, body
  • Output: The fetched HTTP response content.
  • x402 Auto-Payment: If the target URL returns a 402 Payment Required challenge, this tool intercepts it, automatically signs the payment with the agent’s mandate, and resubmits the request to fetch the data.

MCP Authentication Guard

To prevent unauthorized tool calls, the MCP server implements an mcpAuthGuard.
  • Every tool call must be authorized by an OAuth session.
  • Credentials (merchantId, apiKey) are never exposed to the LLM prompt.
  • The guard injects the required metadata into the tool context based on the bearer token in the request header.

Usage in Claude Desktop

Add Delegare to your claude_desktop_config.json:
{
  "mcpServers": {
    "delegare": {
      "command": "npx",
      "args": ["-y", "@delegare/mcp-tools"],
      "env": {
        "DELEGARE_API_URL": "https://api.sandbox.delegare.dev"
      }
    }
  }
}