PayAgents MCP Server
Enables AI agents to autonomously make policy-controlled payments for APIs and tools via Bitcoin Lightning (L402) and Base USDC (x402), including paying paywalled endpoints, checking balances, and reviewing transactions.
README
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.json - Windows:
%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!
🛠️ 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 zod
import { 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
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.