gatefareio/mcp-server
Official@gatefare/mcp
AIエージェントにウォレットとマーケットプレイスを持たせましょう。
@gatefare/mcpは、Claude Desktop、Cursor、またはMCP互換エージェントをGatefareの有料HTTP APIカタログに接続するModel Context Protocolサーバーです。支払いはオープンなx402標準に基づき、Base上のUSDCで決済されます。SaaSキーやサブスクリプション、エスクローは不要です。ノンカストディアル方式のため、署名はローカルで行われ、秘密鍵がマシンから出ることはありません。

┌─────────────┐ ┌──────────────┐ ┌─────────────────┐
│ Claude / │ MCP stdio │ @gatefare/mcp│ HTTP + x402 │ gatefare.io │
│ Cursor / │ ─────────────► │ (this repo)│ ─────────────► │ proxy + │
│ your agent │ │ │ │ catalog │
└─────────────┘ └──────┬───────┘ └─────────────────┘
│
│ EIP-3009 sign
▼
┌─────────────┐
│ Base USDC │
└─────────────┘クイックスタート
1. クライアントへの導入
Claude Desktop — ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) または %APPDATA%\Claude\claude_desktop_config.json (Windows):
{
"mcpServers": {
"gatefare": {
"command": "npx",
"args": ["-y", "@gatefare/mcp"]
}
}
}Cursor — ~/.cursor/mcp.json またはプロジェクトレベルの .cursor/mcp.json:
{
"mcpServers": {
"gatefare": {
"command": "npx",
"args": ["-y", "@gatefare/mcp"]
}
}
}クライアントを再起動します。これでエージェントは5つの読み取り専用ツール(検索と安全性)を利用できるようになります。試してみましょう:
"Search Gatefare for weather APIs." (Gatefareで天気APIを検索して)
2. ウォレットを追加して有料コールを行う
同じ設定ファイルに env を追加します:
{
"mcpServers": {
"gatefare": {
"command": "npx",
"args": ["-y", "@gatefare/mcp"],
"env": {
"WALLET_PRIVATE_KEY": "0xYOUR_KEY",
"WALLET_BUDGET_USD": "5.00"
}
}
}
}購入者用ツール(call_api、get_wallet_balance、estimate_cost)が利用可能になります。WALLET_BUDGET_USD の上限は実行時のセーフティネットです。厳密な上限を設定したい場合は、使っても良い金額だけをウォレットに入金してください。
"What's London's weather right now? Spend up to $0.001." (今のロンドンの天気は?0.001ドルまで使って)
3. (オプション) 自分のAPIを公開する
gatefare.io/dashboard/tokens でPATを取得し、以下を追加します:
"env": {
"GATEFARE_PAT": "gfpat_..."
}公開者用ツール(register_api、list_my_apis、update_api、get_revenue、distribute)が表示されます。
"Publish my API at https://api.example.com/sentiment for $0.001 per call." (私のAPI https://api.example.com/sentiment を1コール0.001ドルで公開して)
Related MCP server: GoldBean
ツール
4つのドメインにわたる13のツール。ツールは設定された環境変数に基づいて自動的に登録されるため、エージェントが使えないツールを見ることはありません。
検索 — 常に利用可能
ツール | 説明 |
| フィルター(価格、カテゴリ、並び替え)を使用したカタログの全文検索 |
| スラッグまたは |
| API数を含む全カテゴリ |
| クエリ文字列のオートコンプリート候補 |
購入者 — WALLET_PRIVATE_KEY が必要
ツール | 説明 |
| 有料コールを実行。402 → 署名 → 再試行を自動的に処理 |
| Base上のUSDC + ETH、および残りの実行予算 |
| N回のコール計画に対する合計コストの見積もり |
公開者 — GATEFARE_PAT が必要
ツール | 説明 |
| 新しい有料APIの公開 |
| 統計情報を含む公開済みAPIの一覧 |
| メタデータ、価格、ターゲットURLの編集 |
| 収益の時系列データと合計 |
| オンチェーンの |
安全性 — 常に利用可能
ツール | 説明 |
| 悪意のある/盗用されたAPIの報告(DMCA、詐欺、マルウェアなど) |
設定
変数 | デフォルト | 必須条件 |
|
| — (セルフホスト時に上書き) |
| — | 購入者用ツール全般 |
| 無制限 | オプションの支出上限 |
|
| Sepoliaテストネットの場合は |
| — | 公開者用ツール全般 |
|
| 詳細なstderr出力には |
例
検索と購入を一度に行う (Claude Desktop)
あなた: Find me a sub-$0.001 weather API and call it for "Tokyo". (0.001ドル以下の天気APIを探して、「東京」でコールして)
Claude: Calling
gatefare.search_apiswithmax_price: 0.001… Founddemo-weatherby @alice at $0.001/call. Callinggatefare.call_apiwithslug: "demo-weather",query: {city: "Tokyo"}… Tokyo is 22°C, partly cloudy. Paid 0.001 USDC. Receipt:settled-tx-0x9a…(東京は22度、曇り時々晴れ。0.001 USDCを支払いました。領収書:settled-tx-0x9a…)
プログラムによる利用 — Pythonエージェント
from mcp import ClientSession, StdioServerParameters
from mcp.client.stdio import stdio_client
server = StdioServerParameters(
command="npx",
args=["-y", "@gatefare/mcp"],
env={"WALLET_PRIVATE_KEY": "0x...", "WALLET_BUDGET_USD": "1.00"},
)
async with stdio_client(server) as (r, w):
async with ClientSession(r, w) as s:
await s.initialize()
result = await s.call_tool(
"gatefare.call_api",
arguments={"slug": "demo-weather", "query": {"city": "Tokyo"}},
)
print(result.content[0].text)実行可能なバリエーション(Claude Desktop、Cursor、Python、TypeScript、および純粋な検索のチュートリアル)については examples/ を参照してください。
AIエージェントを構築していない場合 — 適切なツールの選択
バックエンドからx402 APIの支払いを行いたい場合(エージェントなし)、Coinbaseの公式x402 SDK(x402-python (PyPI)、coinbase/x402/go、…/java、または @x402/fetch)を使用してください。これらは支払いフローを処理するため、このMCPサーバーは不要です。
任意の言語からGatefareカタログを閲覧したい場合は、REST APIを直接叩いてください: gatefare.io/api/catalog (OpenAPI 3.1仕様)。
どのツールがどのユースケースに適しているかの詳細な内訳は docs/integrations.md を参照してください。
直接CLI (デバッグ用)
# Run the server in foreground; talks JSON-RPC over stdio.
npx -y @gatefare/mcp
# In another terminal, send a frame:
echo '{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}' | \
npx -y @gatefare/mcpエラー
ツールの結果には isError: true と構造化されたボディ { error: <code>, message: <human>, details?: <any> } が含まれます。コードは固定されているため、エージェントはそれに基づいて再試行や表示ロジックを切り替えることができます。
コード | 意味 |
| 入力がzodバリデーションに失敗 |
| 購入者用ツールには |
| 公開者用ツールには |
| 実行時の予算上限に達しました |
| ウォレットのUSDC残高が不足しています |
| サーバーの価格が設定した |
| スラッグが存在しないか、停止されています |
| 有料APIが2xx以外のレスポンスを返したか、402が不正でした |
| Gatefareがリクエストをレート制限しました |
| Gatefareに到達できませんでした |
| Gatefareが4xx / 5xxを返しました |
仕組み (30秒解説)
エージェントが
gatefare.call_api { slug: "demo-weather", … }を呼び出します。GET https://gatefare.io/p/demo-weatherを実行します(まだ支払いは発生しません)。Gatefareプロキシが
accepts: [{network, payTo, maxAmountRequired, …}]を含む 402 Payment Required を返します。設定されたネットワーク上で、その正確な金額と受取人に対して EIP-3009
transferWithAuthorizationに署名します。署名済みの
X-Paymentヘッダー(base64エンコードされたJSON、x402 v2)を付けてリクエストを再試行します。Gatefareが署名を検証し、USDC送金を決済し、アップストリームAPIへリクエストをプロキシします。
アップストリームのレスポンス(および支払い領収書)をエージェントに返します。
署名は使い捨てで時間制限があり、この特定の payTo への送金以外の目的でマシンから出ることはありません。秘密鍵がログに記録されることもありません。
セキュリティ
ノンカストディアル。 秘密鍵は環境変数内に存在し、署名はローカルで行われるため、Gatefareサービスが鍵を見ることはありません。
ネットワーク混同への耐性。 Sepolia専用の要件をメインネットユーザーに返す悪意のあるゲートウェイは拒否されます。ユーザーが設定していないチェーンに対して署名することはありません。
暗号学的にランダムなナンス。
Date.now()ベースの衝突はありません。有効期限は最大1時間。 サーバーがそれ以上を要求しても制限されます。
厳格な入力バリデーション。 スラッグは
^[a-z0-9_-]+$に制限され、URLエンコードされます。パス・トラバーサルは発生しません。targetUrlは登録時にfile://、localhost、クラウドメタデータIP、.local、.internalホストをブロックします。シークレットの保護。 テストにより、秘密鍵とPATがstderr/stdoutに決して表示されないことが保証されています。
開発
git clone https://github.com/gatefareio/mcp-server.git
cd mcp-server
npm install
npm run typecheck
npm test # 138 unit tests
npm run test:e2e # 10 e2e tests against live gatefare.io (set GATEFARE_E2E=1)
npm run buildクライアント設定でローカルのチェックアウトを使用する場合:
npm link
# in claude_desktop_config.json:
# "command": "gatefare-mcp"アーキテクチャ
src/
├── index.ts # entry — wires stdio transport
├── server.ts # McpServer instance + tool registration
├── config.ts # env parsing, capability detection
├── client.ts # REST client (wraps fetch)
├── x402.ts # 402 parsing + EIP-3009 signing
├── types.ts # shared types + GatefareError
└── tools/
├── discovery.ts # search_apis, get_api, list_categories, suggest
├── buyer.ts # call_api, get_wallet_balance, estimate_cost
├── publisher.ts # register_api, list_my_apis, update_api, get_revenue, distribute
└── safety.ts # report_abuseテスト構成
tests/
├── config.test.ts # env parsing edges
├── client.test.ts # HTTP client error mapping
├── x402.test.ts # signing + parsing primitives
├── x402-flow.test.ts # full 402 → sign → retry handshake (mocked fetch)
├── server.test.ts # capability-driven tool registration
├── init.test.ts # subprocess: bootstrap, env crashes, secret leakage
├── stdio-protocol.test.ts # stdout pollution + recovery from tool errors
├── stability.test.ts # 100 concurrent calls, memory baseline, ReDoS
├── tools/
│ ├── discovery.test.ts
│ ├── buyer.test.ts
│ ├── buyer-flow.test.ts
│ ├── publisher.test.ts
│ └── safety.test.ts
└── integration/
└── e2e.test.ts # real gatefare.io, gated by GATEFARE_E2E=1貢献
IssueやPRを歓迎します。ワークフロー、スタイルガイド、新しいツールの追加方法については CONTRIBUTING.md を参照してください。
ライセンス
MIT © Gatefare
リンク
🌐 マーケットプレイス: gatefare.io
📚 APIドキュメント: gatefare.io/docs
🤖 LLMコンテキスト (単一ファイル): gatefare.io/llms-full.txt
📐 OpenAPI仕様: gatefare.io/openapi.json
🐦 Twitter: @Gatefareio
🔌 Model Context Protocol: modelcontextprotocol.io
💸 x402標準: x402.org
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseAqualityDmaintenanceMCP server for pay-per-call DeFi and crypto data via x402 micropayments on Base. 8 endpoints: token prices, TVL, funding rates, token security, gas tracker, whale monitoring, wallet profiling, and yield scanning.846MIT
- AlicenseCqualityCmaintenancex402 Micropaid MCP Server — 120+ paid API endpoints for AI Agents. Pay per call with USDC on Base network. No signup, no API key needed.551MIT
- AlicenseNot gradedqualityBmaintenance55+ pay-per-call tools for AI agents over MCP: live telemetry, blockchain/on-chain checks, environmental, transit, finance, and network utilities. No API key or signup — agents pay per request with x402 USDC micropayments (Base and Solana).MIT

oom-x402-mcpofficial
FlicenseNot gradedqualityBmaintenanceMCP server exposing 1,000+ pay-per-call API endpoints across agent infrastructure (memory, coordination, secrets, verification), data, compute, finance, weather, geography, and reference categories — payments via x402 protocol in USDC on Base.
Related MCP Connectors
Pay for HTTP APIs and charge for your own: x402 micropayments in USDC on Base.
Metered MCP tools: free discovery over MCP; per-call execution settled in USDC via x402 v2.
Monetize any MCP server: x402 paywall, pay-per-call billing in USDC on Base, agent marketplace.
Appeared in Searches
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/gatefareio/mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server