mcp.indexMCP integration entry-point for the Nevermined Payments Python SDK.
This module exposes a class-based API (no dict-like compatibility):
MCPIntegration: Main integration surface with methods
configure(options): Set shared configuration such as agentId/serverNamewith_paywall(handler, options): Decorate a handler with paywallattach(server): Returns an object with registerTool, registerResource, registerPromptauthenticate_meta(extra, method): Authenticate meta operations like initialize/listbuild_mcp_integration(payments_service): Factory returning an MCPIntegration instance.build_mcp_integrationbuild_mcp_integration(payments_service: Any) → MCPIntegration
Factory that builds the class-based MCP integration.
Args:
payments_service: The initialized Payments clientReturns: MCPIntegration instance
MCPIntegrationClass-based MCP integration for Payments.
Provides a clean methods API to configure paywall, decorate handlers and attach registrations to a server implementation.
__init____init__(payments_service: Any) → None
Initialize the integration with a Payments service instance.
Args:
payments_service: The initialized Payments clientattachattach(server: _AttachableServer)
Attach helpers to a server and return registration methods.
Args:
server: An object exposing registerTool/registerResource/registerPromptReturns: An object with methods to register protected handlers on the server
authenticate_metaauthenticate_meta(extra: Any, method: str) → Dict[str, Any]
Authenticate meta endpoints such as initialize/list.
Args:
extra: Extra request metadata containing headersmethod: The meta method nameReturns: Authentication result dict
configureconfigure(options: Dict[str, Any]) → None
Configure shared options such as agentId and serverName.
Args:
options: Configuration dictionary with keys like agentId and serverNamewith_paywallwith_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:
handler: The tool/resource/prompt handler to protect. Can optionally accept a PaywallContext parameter as the last argument.options: The paywall options including kind, name and creditsReturns: An awaitable handler with paywall applied
This file was automatically generated via lazydocs.