P

Paywall MCP

by llmops-pro · io.github.llmops-pro/paywall-mcp

Generic Lightning-paywall sidecar that wraps any stdio MCP server and requires a paid Lightning invoice (via NWC) before forwarding priced tool calls. Per-tool prices are set via env; includes payment verification, replay protection, and an audit log — the upstream server stays untouched.

npm Local · stdio GlamaOfficial MCP Registry High confidence

Install

Add to ~/Library/Application Support/Claude/claude_desktop_config.json

Windows / Linux path
Windows: %APPDATA%\Claude\claude_desktop_config.json
Linux: ~/.config/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "io-github-llmops-pro-paywall-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "paywall-mcp"
      ],
      "env": {
        "PAYWALL_UPSTREAM_COMMAND": "<VALUE>",
        "PAYWALL_UPSTREAM_ARGS": "<VALUE>",
        "NWC_CONNECTION_STRING": "<YOUR_VALUE>",
        "PAYWALL_DEFAULT_PRICE_SATS": "0",
        "PAYWALL_PRICE_MAP": "{}",
        "PAYWALL_LOG_PATH": "./paywall-mcp.log",
        "PAYWALL_READ_ONLY": "false",
        "PAYWALL_AUDIT_PATH": "./paywall-mcp-audit.log",
        "PAYWALL_UPSTREAM_CWD": "<VALUE>",
        "PAYWALL_UPSTREAM_ENV": "<VALUE>",
        "PAYWALL_INVOICE_TTL_SECONDS": "600",
        "PAYWALL_PRICE_LABEL_TEMPLATE": "(💰 {price} sats)"
      }
    }
  }
}

Restart Claude Desktop to activate the new server.

Add to .cursor/mcp.json (project) or ~/.cursor/mcp.json (global)

Windows / Linux path
Windows: .cursor\mcp.json (project) or %USERPROFILE%\.cursor\mcp.json (global)
Linux: .cursor/mcp.json (project) or ~/.cursor/mcp.json (global)
{
  "mcpServers": {
    "io-github-llmops-pro-paywall-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "paywall-mcp"
      ],
      "env": {
        "PAYWALL_UPSTREAM_COMMAND": "<VALUE>",
        "PAYWALL_UPSTREAM_ARGS": "<VALUE>",
        "NWC_CONNECTION_STRING": "<YOUR_VALUE>",
        "PAYWALL_DEFAULT_PRICE_SATS": "0",
        "PAYWALL_PRICE_MAP": "{}",
        "PAYWALL_LOG_PATH": "./paywall-mcp.log",
        "PAYWALL_READ_ONLY": "false",
        "PAYWALL_AUDIT_PATH": "./paywall-mcp-audit.log",
        "PAYWALL_UPSTREAM_CWD": "<VALUE>",
        "PAYWALL_UPSTREAM_ENV": "<VALUE>",
        "PAYWALL_INVOICE_TTL_SECONDS": "600",
        "PAYWALL_PRICE_LABEL_TEMPLATE": "(💰 {price} sats)"
      }
    }
  }
}

Cursor usually picks up config changes automatically; if the server does not appear, reload the window.

Add to .mcp.json (project) or ~/.claude.json (global)

Windows / Linux path
Windows: .mcp.json (project) or %USERPROFILE%\.claude.json (global)
Linux: .mcp.json (project) or ~/.claude.json (global)
{
  "mcpServers": {
    "io-github-llmops-pro-paywall-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "paywall-mcp"
      ],
      "env": {
        "PAYWALL_UPSTREAM_COMMAND": "<VALUE>",
        "PAYWALL_UPSTREAM_ARGS": "<VALUE>",
        "NWC_CONNECTION_STRING": "<YOUR_VALUE>",
        "PAYWALL_DEFAULT_PRICE_SATS": "0",
        "PAYWALL_PRICE_MAP": "{}",
        "PAYWALL_LOG_PATH": "./paywall-mcp.log",
        "PAYWALL_READ_ONLY": "false",
        "PAYWALL_AUDIT_PATH": "./paywall-mcp-audit.log",
        "PAYWALL_UPSTREAM_CWD": "<VALUE>",
        "PAYWALL_UPSTREAM_ENV": "<VALUE>",
        "PAYWALL_INVOICE_TTL_SECONDS": "600",
        "PAYWALL_PRICE_LABEL_TEMPLATE": "(💰 {price} sats)"
      }
    }
  }
}

The server will be available in the next Claude Code session.

Add to .vscode/mcp.json

Windows / Linux path
Windows: .vscode\mcp.json
Linux: .vscode/mcp.json
{
  "servers": {
    "io-github-llmops-pro-paywall-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "paywall-mcp"
      ],
      "env": {
        "PAYWALL_UPSTREAM_COMMAND": "<VALUE>",
        "PAYWALL_UPSTREAM_ARGS": "<VALUE>",
        "NWC_CONNECTION_STRING": "<YOUR_VALUE>",
        "PAYWALL_DEFAULT_PRICE_SATS": "0",
        "PAYWALL_PRICE_MAP": "{}",
        "PAYWALL_LOG_PATH": "./paywall-mcp.log",
        "PAYWALL_READ_ONLY": "false",
        "PAYWALL_AUDIT_PATH": "./paywall-mcp-audit.log",
        "PAYWALL_UPSTREAM_CWD": "<VALUE>",
        "PAYWALL_UPSTREAM_ENV": "<VALUE>",
        "PAYWALL_INVOICE_TTL_SECONDS": "600",
        "PAYWALL_PRICE_LABEL_TEMPLATE": "(💰 {price} sats)"
      }
    }
  }
}

Reload the VS Code window to activate.

Add to ~/.codeium/windsurf/mcp_config.json

Windows / Linux path
Windows: %USERPROFILE%\.codeium\windsurf\mcp_config.json
Linux: ~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "io-github-llmops-pro-paywall-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "paywall-mcp"
      ],
      "env": {
        "PAYWALL_UPSTREAM_COMMAND": "<VALUE>",
        "PAYWALL_UPSTREAM_ARGS": "<VALUE>",
        "NWC_CONNECTION_STRING": "<YOUR_VALUE>",
        "PAYWALL_DEFAULT_PRICE_SATS": "0",
        "PAYWALL_PRICE_MAP": "{}",
        "PAYWALL_LOG_PATH": "./paywall-mcp.log",
        "PAYWALL_READ_ONLY": "false",
        "PAYWALL_AUDIT_PATH": "./paywall-mcp-audit.log",
        "PAYWALL_UPSTREAM_CWD": "<VALUE>",
        "PAYWALL_UPSTREAM_ENV": "<VALUE>",
        "PAYWALL_INVOICE_TTL_SECONDS": "600",
        "PAYWALL_PRICE_LABEL_TEMPLATE": "(💰 {price} sats)"
      }
    }
  }
}

Restart Windsurf (or refresh its MCP servers panel) to activate the new server.

Windsurf Next uses ~/.codeium/windsurf-next/mcp_config.json. Devin Desktop (the Windsurf rebrand) uses ~/.config/devin/mcp_config.json and imports the Windsurf file.

Add to ~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json

Windows / Linux path
Windows: %APPDATA%\Code\User\globalStorage\saoudrizwan.claude-dev\settings\cline_mcp_settings.json
Linux: ~/.config/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
{
  "mcpServers": {
    "io-github-llmops-pro-paywall-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "paywall-mcp"
      ],
      "env": {
        "PAYWALL_UPSTREAM_COMMAND": "<VALUE>",
        "PAYWALL_UPSTREAM_ARGS": "<VALUE>",
        "NWC_CONNECTION_STRING": "<YOUR_VALUE>",
        "PAYWALL_DEFAULT_PRICE_SATS": "0",
        "PAYWALL_PRICE_MAP": "{}",
        "PAYWALL_LOG_PATH": "./paywall-mcp.log",
        "PAYWALL_READ_ONLY": "false",
        "PAYWALL_AUDIT_PATH": "./paywall-mcp-audit.log",
        "PAYWALL_UPSTREAM_CWD": "<VALUE>",
        "PAYWALL_UPSTREAM_ENV": "<VALUE>",
        "PAYWALL_INVOICE_TTL_SECONDS": "600",
        "PAYWALL_PRICE_LABEL_TEMPLATE": "(💰 {price} sats)"
      }
    }
  }
}

Cline reloads cline_mcp_settings.json automatically; if the server does not appear, reload the VS Code window.

Open it from Cline's MCP Servers panel → Configure. Roo Code uses a different file and format.

Configuration

Environment variables this server reads. Secrets stay on your machine.

NameRequiredDescription
PAYWALL_UPSTREAM_COMMAND Yes Executable to spawn as the upstream MCP server (e.g., node).
PAYWALL_UPSTREAM_ARGS Yes JSON array of args passed to the upstream command (e.g., ["/path/to/upstream/dist/index.js"]).
NWC_CONNECTION_STRING secret Yes NIP-47 NWC URI for the seller's RECEIVE wallet. Required when any tool has a non-zero price.
PAYWALL_DEFAULT_PRICE_SATS No Default price for any tool not in the price map. 0 = free passthrough. Default: 0
PAYWALL_PRICE_MAP No JSON object mapping tool names to sat prices. Example: {"premium_compliment":21, "rare_alpha_signal":5000}. Default: {}
PAYWALL_LOG_PATH No Server log path. Default: ./paywall-mcp.log
PAYWALL_READ_ONLY No Disables all paid tool calls. Default: false
PAYWALL_AUDIT_PATH No NDJSON audit log path. Default: ./paywall-mcp-audit.log
PAYWALL_UPSTREAM_CWD No Working directory for the upstream child process.
PAYWALL_UPSTREAM_ENV No JSON object of env-var overrides for the upstream.
PAYWALL_INVOICE_TTL_SECONDS No Invoice TTL in seconds. Default: 600
PAYWALL_PRICE_LABEL_TEMPLATE No Label appended to each priced tool's description. Default: (💰 {price} sats)

Similar servers