npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@autopayprotocol/mcp

v0.1.2

Published

MCP server for AutoPay Protocol — lets AI agents manage crypto subscriptions via tool calls

Downloads

32

Readme

@autopayprotocol/mcp

Model Context Protocol server that gives AI agents (Claude, Cursor, Windsurf) the ability to manage USDC subscriptions on AutoPay Protocol. Zero-code integration — just add to your MCP config.

Install

npm install -g @autopayprotocol/mcp

Setup

Add to your MCP configuration file:

Claude Code (~/.claude/settings.json)

{
  "mcpServers": {
    "autopay": {
      "command": "npx",
      "args": ["-y", "@autopayprotocol/mcp"],
      "env": {
        "AUTOPAY_PRIVATE_KEY": "0x...",
        "AUTOPAY_CHAIN": "base"
      }
    }
  }
}

Cursor (.cursor/mcp.json)

{
  "mcpServers": {
    "autopay": {
      "command": "npx",
      "args": ["-y", "@autopayprotocol/mcp"],
      "env": {
        "AUTOPAY_PRIVATE_KEY": "0x...",
        "AUTOPAY_CHAIN": "base"
      }
    }
  }
}

Environment Variables

| Variable | Required | Description | |----------|----------|-------------| | AUTOPAY_PRIVATE_KEY | Yes | Agent wallet private key (0x...) | | AUTOPAY_CHAIN | No | Chain to use: base (default), flowEvm, baseSepolia | | AUTOPAY_RPC_URL | No | Override the default public RPC URL |

Aliases: AGENT_PRIVATE_KEY (for AUTOPAY_PRIVATE_KEY), CHAIN (for AUTOPAY_CHAIN).

Tools

| Tool | Description | |------|-------------| | autopay_balance | Check wallet USDC and gas token balance | | autopay_subscribe | Create an on-chain subscription (first payment immediate) | | autopay_unsubscribe | Cancel a subscription by revoking the policy | | autopay_get_policy | Read on-chain policy details (status, amount, cap, etc.) | | autopay_fetch | Fetch a URL with auto-subscription on HTTP 402 | | autopay_approve_usdc | Pre-approve USDC spending to PolicyManager | | autopay_bridge_usdc | Bridge USDC from another chain via LiFi | | autopay_swap_native_to_usdc | Swap native tokens (ETH, FLOW) to USDC |

Tool Details

autopay_subscribe

| Input | Type | Description | |-------|------|-------------| | merchant | string | Merchant EVM address | | amount | number | USDC per billing cycle | | interval | string \| number | Preset (monthly, weekly, etc.) or seconds | | spendingCap? | number | Max total spend. Default: amount * 30 | | metadataUrl? | string | Optional plan metadata URL |

autopay_fetch

| Input | Type | Description | |-------|------|-------------| | url | string | URL to fetch | | method? | string | HTTP method (GET, POST, etc.) | | headers? | object | Request headers | | body? | string | Request body |

If the server returns HTTP 402 with an AutoPay discovery body, the tool automatically subscribes and retries with authentication.

autopay_bridge_usdc

| Input | Type | Description | |-------|------|-------------| | fromChainId | number | Source chain ID | | amount | number | USDC amount to bridge | | sourceRpcUrl | string | RPC URL for the source chain | | slippage? | number | Slippage tolerance in %. Default: 0.5 |

Supported source chains: Ethereum (1), Optimism (10), Polygon (137), Arbitrum (42161), Avalanche (43114), BSC (56), Base (8453), Flow EVM (747).

How It Works

  1. Agent starts the MCP server with a funded wallet
  2. When the agent encounters a paid API, it uses autopay_fetch or autopay_subscribe
  3. The server creates an on-chain subscription policy (first charge immediate)
  4. Subsequent requests reuse cached subscriptions automatically
  5. The agent can check status with autopay_get_policy and cancel with autopay_unsubscribe

Links