Skip to main content

@yativo/mcp-server

The Yativo MCP Server exposes Agentic Wallet operations as Model Context Protocol tools. Any MCP-compatible AI agent (Claude, GPT, custom agents) can manage crypto wallets, send payments, and interact with x402-paywalled APIs through a standardized tool interface.
Package: @yativo/mcp-server on npm

Installation

npm install -g @yativo/mcp-server
Or add it to your project:
npm install @yativo/mcp-server

Configuration

The MCP server is configured via environment variables:
VariableRequiredDefaultDescription
YATIVO_API_KEYYesConnector API key (starts with yac_) from your agentic wallet
YATIVO_WALLET_IDNoDefault wallet ID (starts with aw_). Can be overridden per tool call
YATIVO_API_URLNohttps://crypto-api.yativo.com/api/v1API base URL. Change for sandbox testing

Setup with Claude Desktop

Add to your Claude Desktop config (claude_desktop_config.json):
{
  "mcpServers": {
    "yativo-wallet": {
      "command": "npx",
      "args": ["-y", "@yativo/mcp-server"],
      "env": {
        "YATIVO_API_KEY": "yac_your_connector_api_key",
        "YATIVO_WALLET_ID": "aw_your_wallet_id"
      }
    }
  }
}
For sandbox testing, add the sandbox URL:
{
  "mcpServers": {
    "yativo-wallet": {
      "command": "npx",
      "args": ["-y", "@yativo/mcp-server"],
      "env": {
        "YATIVO_API_KEY": "yac_your_sandbox_connector_key",
        "YATIVO_WALLET_ID": "aw_your_sandbox_wallet_id",
        "YATIVO_API_URL": "https://crypto-sandbox.yativo.com/api/v1"
      }
    }
  }
}

Available Tools

get_balance

Check the balance and address of your agentic wallet.
ParameterTypeRequiredDescription
wallet_idstringNoWallet ID (uses YATIVO_WALLET_ID default)
Example prompt: “What’s my wallet balance?”

send_payment

Send a crypto payment with full audit trail fields.
ParameterTypeRequiredDescription
recipient_addressstringYesDestination wallet address
amountnumberYesAmount in USD
assetstringNoAsset to send (default: USDC)
chainstringNoChain override (e.g., base, ethereum)
service_namestringYesName of the service being paid
service_urlstringNoURL of the service
payment_reasonstringYesWhy this payment is being made
payment_categorystringNoCategory: ai_service, subscription, purchase, transfer, etc.
wallet_idstringNoWallet ID (uses default)
Example prompt: “Send $5 USDC to 0x9F8b… for the OpenAI API subscription”

x402_fetch

Fetch a URL with automatic x402 payment support. If the URL returns HTTP 402 (Payment Required), the wallet auto-pays and retries.
ParameterTypeRequiredDescription
urlstringYesURL to fetch
methodstringNoHTTP method (default: GET)
headersobjectNoAdditional request headers
bodyanyNoRequest body for POST/PUT/PATCH
wallet_idstringNoWallet ID (uses default)
Example prompt: “Fetch the premium data from https://api.example.com/data — pay if it requires x402”

get_transactions

Get recent transaction history for the wallet.
ParameterTypeRequiredDescription
wallet_idstringNoWallet ID (uses default)
pagenumberNoPage number (default: 1)
limitnumberNoResults per page (default: 10, max: 100)
Example prompt: “Show me my last 5 transactions”

Resources

The server exposes an MCP resource for wallet information:
Resource URIDescription
wallet://infoJSON snapshot of the default wallet’s balance and address

Running Directly

# Set environment variables
export YATIVO_API_KEY="yac_your_connector_key"
export YATIVO_WALLET_ID="aw_your_wallet_id"

# Run the server
npx @yativo/mcp-server
The server communicates over stdio using the MCP protocol.

Prerequisites

Before using the MCP server, you need:
  1. A Yativo account with an agentic wallet
  2. An activated wallet with at least one connector
  3. The connector’s API key (yac_...)
  4. Funds (USDC) in the wallet
See the Agentic Wallets guide for setup instructions.

Next Steps

Agentic Wallets

Create and configure agentic wallets via the API.

x402 Protocol

Learn more about HTTP-native micropayments.

TypeScript SDK

For programmatic (non-MCP) integration, use the TypeScript SDK.

Sandbox

Test the MCP server against the sandbox environment.