HM

httpayer/mcp

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

2 stars 0 forks 质量 63 趋势 8NOASSERTION

x402 micropayments for AI agents - no wallets, no blockchain, just credits.

概览

MCP (Model Context Protocol) server for HTTPayer. Lets AI agents call x402-enabled APIs using credit balance — no wallets, no blockchain, no Web3 knowledge required. - Dashboard & API keys: app.httpayer.com - npm: @httpayer/mcp - GitHub: httpayer/mcp Paste this into any MCP-compatible agent (Claude Code, Cursor, Windsurf, OpenCode...): The agent detects your environment and handles everything automatically. Get your API key at app.httpayer.com when prompted. (~/Library/Application Support/Claude/claude_desktop_config.json on macOS, %APPDATA%\Claude\claude_desktop_config.json on Windows): (.cursor/mcp.json), (.windsurf/mcp.json), (.cline/mcp_settings.json): (opencode.json or ~/.config/opencode/config.json):

README

以下为原文 README 节选,完整内容请查看原文。

@httpayer/mcp

MCP (Model Context Protocol) server for HTTPayer. Lets AI agents call x402-enabled APIs using credit balance — no wallets, no blockchain, no Web3 knowledge required.


Quickstart

Paste this into any MCP-compatible agent (Claude Code, Cursor, Windsurf, OpenCode…):

Set up https://httpayer.com/skill.md

The agent detects your environment and handles everything automatically.

Without an agent (manual)

1. Run setup:

npx @httpayer/mcp setup

Get your API key at app.httpayer.com when prompted.

Flags:

Flag Description
--key sk-live-... Provide key non-interactively
--client Target client: claude-code, claude-desktop, cursor, windsurf, opencode, zed, cline, warp, codex
--scope user|project Claude Code scope (default: user)
--yes / -y Skip all prompts
--update-key Replace existing key

2. Add to your client:

Claude Code:

claude mcp add httpayer --scope user -- npx -y @httpayer/mcp@latest

Claude Desktop (~/Library/Application Support/Claude/claude_desktop_config.json on macOS, %APPDATA%\Claude\claude_desktop_config.json on Windows):

{
  "mcpServers": {
    "httpayer": {
      "command": "npx",
      "args": ["-y", "@httpayer/mcp@latest"]
    }
  }
}

Cursor (.cursor/mcp.json), Windsurf (.windsurf/mcp.json), Cline (.cline/mcp_settings.json):

{
  "mcpServers": {
    "httpayer": {
      "command": "npx",
      "args": ["-y", "@httpayer/mcp@latest"]
    }
  }
}

OpenCode (opencode.json or ~/.config/opencode/config.json):

{
  "mcp": {
    "httpayer": {
      "type": "local",
      "command": ["npx", "-y", "@httpayer/mcp@latest"],
      "enabled": true
    }
  }
}

Zed:

{
  "context_servers": {
    "httpayer": {
      "command": {
        "path": "npx",
        "args": ["-y", "@httpayer/mcp@latest"]
      }
    }
  }
}

3. Restart your client and verify:

Ask your agent: “fetch https://api.httpayer.com/demo/v1/base-weather”

A weather response means HTTPayer is working.


How it works

User prompt
    │
    ▼
AI agent (Claude Code, Cursor, Windsurf...)
    │  uses MCP tools + prompts + resources
    ▼
@httpayer/mcp (local MCP server via npx)
    │  REST calls with x-api-key header
    ▼
api.httpayer.com
    │  proxy handles x402 payment to target
    ▼
Target x402-gated API

Runtime flow

  1. Your client launches the MCP server via npx -y @httpayer/mcp@latest on startup (stdio transport).
  2. The server reads the API key from ~/.httpayer/mcp-config.json.
在 GitHub 查看完整 README

安装

npx -y @httpayer/mcp@latest
新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "httpayer": { "command": "npx", "args": ["-y", "@httpayer/mcp@latest"] } } }