@aipp/mcp
v0.3.1
Published
MCP server for AgentPay — Lightning Network L402 paywall for AI agents
Downloads
597
Maintainers
Readme
@agentpay/mcp
MCP server for AgentPay — Lightning Network L402 paywall for AI agents.
Give any MCP-compatible client (Claude Desktop, Cursor, Windsurf, custom agents) direct access to AgentPay's payment infrastructure.
Quick Start
# Install
npx @agentpay/mcp
# Or clone & run
git clone https://github.com/aipp/agentpay-mcp.git
cd agentpay-mcp
npm install && npm run buildConfiguration
Set your API key in .env:
AGENTPAY_API_KEY=sg_your_key_here
AGENTPAY_API_URL=https://api.aipp.devDon't have an API key? Use the register tool to get one with 50 free credits.
Tools
| Tool | Description | Auth Required |
|------|-------------|:------------:|
| register | Get an API key + 50 free credits | ❌ |
| get_balance | Check credit balance | ✅ |
| get_client_info | Get profile and payee info | ✅ |
| set_payee | Set Lightning Address for invoices | ✅ |
| spend_credits | Spend credits (idempotent) | ✅ |
| create_paywall_challenge | Create L402 challenge + invoice | ✅ |
| verify_payment | Verify L402 payment & spend credits | ✅ |
| list_plans | List top-up plans | ❌ |
| get_usage_summary | Usage over time window | ✅ |
| get_usage_forecast | Forecast + purchase recommendation | ✅ |
Integration with Claude Desktop
Add to your claude_desktop_config.json:
{
"mcpServers": {
"agentpay": {
"command": "npx",
"args": ["@agentpay/mcp"],
"env": {
"AGENTPAY_API_KEY": "sg_your_key_here"
}
}
}
}Integration with Cursor / Windsurf
# In your project
npx @agentpay/mcp
# Configure in Cursor settings → MCP Servers → Add:
# Command: npx @agentpay/mcp
# Env: AGENTPAY_API_KEY=sg_your_key_hereDevelopment
npm run dev # watch mode
npm run build # production build
npm start # run serverLicense
MIT
