Skip to main content
The Payo SDK enables MCP tool providers to charge for tool calls. Wrap your server with withPayments() and the SDK handles authentication, charging, and error handling automatically.

Installation

Requirements

  • Node.js 18+
  • @modelcontextprotocol/sdk - The MCP SDK (peer dependency)
  • Provider API key - From your Payo dashboard

Quick Example

Exports

The SDK exports the following:

Main Function

Types

Utilities

TypeScript Support

The SDK is written in TypeScript with full type definitions:

Architecture

The SDK:
  1. Proxies your server to intercept handler registration
  2. Wraps tool handlers with payment logic
  3. Calls the Payo platform API for charges
  4. Executes your handler only after successful payment

Next Steps

withPayments()

Full API documentation

Configuration

All configuration options

Error Codes

Error types and handling

Examples

Complete code examples