payments-py

module mcp.index

MCP integration entry-point for the Nevermined Payments Python SDK.

This module exposes a class-based API (no dict-like compatibility):


function build_mcp_integration

build_mcp_integration(payments_service: Any)  MCPIntegration

Factory that builds the class-based MCP integration.

Args:

Returns: MCPIntegration instance


class MCPIntegration

Class-based MCP integration for Payments.

Provides a clean methods API to configure paywall, decorate handlers and attach registrations to a server implementation.

method __init__

__init__(payments_service: Any)  None

Initialize the integration with a Payments service instance.

Args:


method attach

attach(server: _AttachableServer)

Attach helpers to a server and return registration methods.

Args:

Returns: An object with methods to register protected handlers on the server


method authenticate_meta

authenticate_meta(extra: Any, method: str)  Dict[str, Any]

Authenticate meta endpoints such as initialize/list.

Args:

Returns: Authentication result dict


method configure

configure(options: Dict[str, Any])  None

Configure shared options such as agentId and serverName.

Args:


method with_paywall

with_paywall(
    handler: Union[Callable[, Awaitable[Any]], Callable[, Any]],
    options: Optional[ToolOptions, PromptOptions, ResourceOptions] = None
)  Callable[, Awaitable[Any]]

Wrap a handler with the paywall protection.

The handler can optionally receive a PaywallContext parameter containing authentication and credit information. Handlers without this parameter will continue to work for backward compatibility.

Args:

Returns: An awaitable handler with paywall applied


This file was automatically generated via lazydocs.