Skip to main content
Glama
Payagents

PayAgents MCP Server

Official
by Payagents

PayAgents MCP Server (payagents-mcp)

npm version License: MIT

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!


Related MCP server: @arispay/payagent-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 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

Available Tools

3 tools
payagents_get_balanceA

Retrieve the current PayAgents spending balance, subscription tier, and active enterprise spending policy limits (per-transaction and daily limits).

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A3.9/5.0
Behavior3/5

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

With no annotations, the description must carry the burden. It states it 'Retrieves' data, indicating a read-only operation. However, it does not describe error cases, rate limits, or potential side effects, though for a simple read this is likely sufficient.

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 is a single, focused sentence that lists exactly what is retrieved. It is concise, well‑structured, and contains no fluff.

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?

Since there is no output schema, the description must explain the return value. It explicitly lists all returned items: spending balance, subscription tier, and active policy limits (per‑transaction and daily). This fully informs the agent of what to expect.

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?

There are no parameters, so schema coverage is trivially 100%. The baseline for high coverage is 3, and the description does not add any parameter‑related semantics because there are none to explain.

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 verb 'Retrieve' and the resource (PayAgents spending balance, tier, and policy limits), making its purpose unambiguous. It also implicitly differentiates from sibling tools like pay_url or get_transaction by focusing on current balance and limits.

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 implies usage (when balance or limit information is needed) but does not explicitly mention when to use this tool over alternatives. No guidance is given for when to choose this over pay_url or get_transaction, leaving some inference to the agent.

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

payagents_get_transactionA

Lookup the status, rail (Lightning / Base USDC), settlement mode (Direct vs Managed), and cryptographic proof for a specific PayAgents transaction ID.

ParametersJSON Schema
NameRequiredDescriptionDefault
transaction_idYesThe transaction ID or hash to look up.

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations, the description must convey behavioral traits. It indicates the tool retrieves and returns transaction details, implying a read-only operation, but it does not explicitly state side effects, error behavior, or required permissions. The description gives a basic understanding but lacks full transparency.

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 is a single, focused sentence with no redundancy. It efficiently lists the key return fields and the target resource, making it easily scannable and understand.

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?

Given the absence of an output schema, the description provides a helpful overview of what the tool returns (status, rail, settlement mode, cryptographic proof). However, it does not describe the exact response structure, potential error cases, or any additional contextual details. It covers the essential information well but leaves some gaps.

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?

The input schema already fully describes the sole parameter (transaction_id) as 'The transaction ID or hash to look up.' The tool description adds the qualifier 'PayAgents' but does not introduce new semantic information. Since schema coverage is 100%, the baseline score of 3 applies.

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 a specific verb ('Lookup') and resource ('PayAgents transaction ID'), and enumerates the fields returned (status, rail, settlement mode, cryptographic proof). This distinct purpose differentiates it from sibling tools like payagents_pay_url (payment creation) and payagents_get_balance (balance retrieval).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description does not provide explicit guidance on when to use this tool versus the sibling tools. It states what the tool does but lacks conditions like 'use when you need transaction details' or 'instead of get_balance for transaction-specific data'. The intended usage remains implicit rather than stated.

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

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
urlYesThe URL of the API endpoint or paywalled resource to access.
bodyNoOptional request payload/body to send with the request.
methodNoHTTP method to use (defaults to GET).GET
headersNoOptional additional HTTP headers.
max_amountNoMaximum USD amount willing to pay for this request (e.g. "0.01 USD" or "0.002"). Prevents unexpected high charges.

TDQS

A4.2/5.0
Behavior4/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 that the tool automatically resolves and pays payment challenges, which is a significant behavioral trait (it will spend money). It also mentions 'within your spending policy' and the max_amount parameter, which adds context about spending limits. However, it doesn't disclose what happens on failure (e.g., if payment fails, if the request fails), or whether the tool modifies state on the target server. The spending behavior is the most critical disclosure and it's present.

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 is a single, well-structured sentence that front-loads the core action (execute request) and then explains the key differentiator (automatic payment resolution). It's concise with no wasted words. The mention of 'within your spending policy' is a useful qualifier that adds context without bloat.

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 tool that executes HTTP requests with payment handling, the description covers the essential context: what it does, how it handles payments, and the spending constraint. It doesn't describe the return format (no output schema), but for an HTTP request tool, the response is typically the HTTP response body, which is somewhat implied. The description could mention error handling or response format, but given the complexity of the tool (payment resolution), the description is reasonably complete. The lack of output schema is a minor gap.

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 description coverage is 100%, so the schema already documents all 5 parameters. The description adds context about max_amount ('Prevents unexpected high charges') and the overall purpose of payment resolution, but doesn't add significant meaning beyond the schema. The description's mention of 'spending policy' and 'max_amount' reinforces the parameter's purpose, but the schema already covers it. Baseline 3 is appropriate.

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 tool's purpose: executing HTTP requests to API endpoints or paywalled resources, with automatic resolution of HTTP 402/L402/x402 payment challenges. It uses specific verbs ('Execute', 'resolving', 'paying') and identifies the resource (HTTP API endpoint or paywalled resource). It distinguishes itself from siblings (get_balance, get_transaction) by focusing on executing requests with payment handling.

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?

The description implies when to use this tool: when accessing an API endpoint or paywalled resource that may require micro-payments. It doesn't explicitly state when NOT to use it or mention alternatives, but the context of payment challenges is clear. Sibling tools are balance and transaction lookups, which are distinct operations, so the usage context is reasonably clear without explicit exclusions.

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. 3 tool updatesv0.1.0
    • First observedpayagents_get_balance
    • First observedpayagents_get_transaction
    • First observedpayagents_pay_url

TDQS

A4/5.0
Disambiguation5/5

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.

Naming Consistency5/5

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.

Tool Count4/5

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.

Completeness4/5

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.

Maintenance

ActivityMaintained
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/Payagents/payagents-mcp'

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