PayAgents MCP Server
OfficialEnables AI agents to make Bitcoin Lightning payments for APIs and paywalled resources, automatically resolving L402 payment challenges within configured spending limits.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@PayAgents MCP Server Pay for the API request to https://api.example.com/data"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
PayAgents MCP Server (payagents-mcp)
The official Model Context Protocol (MCP) server for PayAgents. Give your AI agents (Claude Desktop, Cursor, Windsurf, Zed, LangChain, OpenDevin) a policy-controlled wallet to pay for APIs and tools autonomously across Bitcoin Lightning (L402) and Base USDC (x402).
⚡ Quickstart for Claude Desktop
Add payagents-mcp to your claude_desktop_config.json:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"payagents": {
"command": "npx",
"args": ["-y", "payagents-mcp"],
"env": {
"PAYAGENTS_API_KEY": "pa_live_your_api_key_here"
}
}
}
}Restart Claude Desktop, and your AI assistant will automatically have access to PayAgents payment tools!
Related MCP server: token4u-mcp
🛠️ Available MCP Tools
1. payagents_pay_url
Executes an HTTP request to any API endpoint or paywalled resource, automatically resolving and paying HTTP 402 / L402 / x402 payment challenges within your enterprise spending limits.
Parameters:
url(required, string): Target API URL.method(optional, default: "GET"):GET,POST,PUT,DELETE.body(optional, object/string): Request body payload.headers(optional, object): Additional HTTP headers.max_amount(optional, string): Max amount willing to pay (e.g."0.01 USD").
2. payagents_get_balance
Checks the agent's available spending balance, subscription tier, and active spending policies (per-transaction caps and daily limits).
3. payagents_get_transaction
Queries details for a past transaction, showing payment rail, settlement method (🟢 Direct Non-Custodial vs Platform Managed), and cryptographic verification proofs.
💰 Monetizing Your Own MCP Tools
If you are building an MCP server and want to charge micro-fees when other agents call your tools:
npm install payagents-mcp @modelcontextprotocol/sdk zodimport { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
import { mcpCharge } from 'payagents-mcp';
import { z } from 'zod';
const server = new McpServer({ name: 'weather-mcp', version: '1.0.0' });
// Gate your tool behind $0.002 micro-payment
server.tool(
'get_forecast',
'Retrieve real-time radar forecast data',
{ city: z.string() },
mcpCharge({ price: '0.002 USD' }, async ({ city }) => {
return {
content: [{ type: 'text', text: `Forecast data for ${city}` }],
};
})
);🔒 Security & Spending Policies
All agent payments are enforced by your PayAgents Dashboard Policy Engine:
Per-Transaction Limit: Block any individual call exceeding your ceiling (e.g. max $0.01).
Daily Budget Cap: Prevent runaway recursion loops (e.g. max $5.00/day).
Domain Allowlists: Restrict agent spending only to verified domains.
Human Approval Triggers: High-value calls are automatically paused for human approval.
License
MIT © PayAgents
Available Tools
3 toolspayagents_get_balanceA
Retrieve the current PayAgents spending balance, subscription tier, and active enterprise spending policy limits (per-transaction and daily limits).
Inputs: no named parameters.
payagents_get_transactionA
Lookup the status, rail (Lightning / Base USDC), settlement mode (Direct vs Managed), and cryptographic proof for a specific PayAgents transaction ID.
Inputs: transaction_id (required).
payagents_pay_urlA
Execute a request to an HTTP API endpoint or paywalled resource, automatically resolving and paying any HTTP 402 / L402 Lightning or x402 Base USDC micro-payment challenges within your spending policy.
Inputs: url (required), body, method, headers, +1 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 3 tools
Each tool targets a distinct action: payment execution, balance retrieval, and transaction lookup. There is no functional overlap—pay_url performs a side-effectful operation while the other two are read-only queries. An agent can easily distinguish them by purpose.
All tools follow a consistent 'payagents_verb_noun' pattern (pay_url, get_balance, get_transaction). The prefix identifies the server, and the verb/noun structure is uniform across the set, making the naming predictable and clear.
With three tools, the server is at the lower end of the typical range, but it appropriately covers the essential operations for its purpose: making a payment, checking balance, and verifying transaction status. The count feels slightly thin but is justified given the narrow domain.
The tool surface covers the core workflow: pay, check balance, and look up transaction details. Minor gaps exist, such as listing all transactions or managing spending policies directly, but these are unlikely to cause agent failures for the intended use case. The absence of an update/delete pattern is acceptable since payments are immutable.
Related MCP Connectors
Machine-payable API infrastructure for autonomous agents. Per-call x402 settlement in USDC.
Pay-per-call tools for autonomous agents, settled in USDC on Base via x402.
Pay-per-action access to APIs and MCP tools over Lightning L402 and Base USDC x402.
Give AI agents a Bitcoin wallet with Lightning Network payments and L402 support.
Related MCP Servers
AlicenseAqualityBmaintenanceEnables AI agents to call paid APIs and settle HTTP 402 payment challenges with USDC on Base, without private keys ever being involved.7186 npmMIT
token4u-mcpofficial
AlicenseAqualityCmaintenanceEnables AI agents to call LLM APIs via x402 micropayments in USDC on Base network, manage a local wallet, and query consumption records.355 npmMIT- AlicenseNot gradedqualityCmaintenanceEnables AI agents to autonomously pay for metered web APIs on a per-call basis, settling x402 v2 USDC micropayments via EIP-3009 authorization on Base Sepolia without human involvement. Spending is bounded by configurable per-call caps and host restrictions, and exposes tools to fetch paywalled URLs and inspect the agent wallet's address and balance.MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to check their wallet address and USDC balance, preview the cost of an x402 call, and pay for API requests in USDC on Base without an account or API key. Spend caps, allow-lists and blocked contracts are enforced in code before anything is signed, so a prompt injection cannot bypass them.MIT