Gate402 Mcp

io.github.pgalyen1987由 GitHub 账号 pgalyen1987 发布v0.8.1更新于 Oct 24, 2026

x402 pay-per-call agent APIs: LLM inference, Base trading data, SEC filings & scraping

概览

AI 生成的概览

Gate402 的本地 MCP 服务器,按次付费调用 x402 接口:LLM 推理、网页抓取、Base 链上与 DEX 数据、SEC 文件,以及免费本地工具。

可以做什么
  • 运行开源模型 LLM 推理和按秒计费的 GPU/CPU 容器任务,并返回签名用量凭证
  • 把公开网址抓取为干净的 Markdown,另有使用住宅代理与验证码破解的隐身模式
  • 查询 Base 链上钱包与代币信息、DEX 价格与流动性、代币风险与动量信号、最优兑换路径以及新代币发行
  • 获取某只股票的最新新闻情绪和 SEC EDGAR 文件
  • 压缩文本、做语义去重查询,以及浏览 GPU 市场或申请成为提供方
  • 使用免费本地工具:估算 token 数、HTML 转 Markdown、修复 JSON
适用场景
适合需要按次付费获取 LLM 推理、网页抓取、Base 加密数据或 SEC 文件、又不想注册账号的智能体,也适合想在同一服务器里附带几个离线文本工具的场景。
运行要求
通过 npm(npx gate402-mcp)或全局安装以 stdio 在本地运行,需要 Node.js。无需注册:首次使用会自动领取免费额度密钥并缓存到 ~/.gate402-mcp。可选 GATE402_API_KEY 使用已充值账户,GATE402_BASE_URL 覆盖网关地址,GATE402_CONFIG_DIR 更改缓存目录。付费工具需要网络访问。
安装前请注意
多数工具每次调用都会从预付余额扣费,市场推理工具按次在链上结算。首次运行会在 ~/.gate402-mcp 写入密钥文件。抓取与隐身工具会把目标网址发送给第三方网关和代理。计算工具目前返回 503。成为提供方涉及链上 USDC 收款。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Gate402 Mcp,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

gate402-mcp

[x402 trust]

MCP server for Gate402 — pay-per-call agent APIs over HTTP 402 (x402 / USDC on Base). Gives any MCP client a full toolkit with no signup and a free tier on first runs — GPU/CPU compute, open-model LLM inference, a GPU marketplace, a complete Base trading loop (discover → vet → read → execute), and web tools:

ToolWhat it doesPrice
gate402_inferOpen-model LLM inference (Llama 3.1 8B/70B, Qwen 2.5, Mistral); billed on actual tokens, signed usage receiptper-token (from $0.05/1M in)
gate402_computeMetered GPU/CPU for a container job, with a signed execution receipt. Not available yet: answers 503 until a compute provider is connectedper-second
gate402_scrapeFetch any public URL, render JS, strip nav/ads → clean LLM-ready Markdown$0.002
gate402_scrape_stealthCloudflare/anti-bot fetch via residential proxies + CAPTCHA solving → clean Markdown$0.05
gate402_minifyCompress text to cut downstream LLM token spend (~40%)$0.005 / 10k tok
gate402_dedupSemantic vector-cache lookup (exact + cosine)$0.001 hit / $0.003 miss
gate402_onchainOn-chain wallet/token intel on Base (balances, EOA/contract, tx count, token metadata)$0.01
gate402_dexLive DEX price / liquidity / 24h volume for a Base token$0.01
gate402_newsRecent news headlines + bull/bear sentiment for a ticker/topic$0.02
gate402_edgarLatest SEC EDGAR filings (10-K/10-Q/8-K) for a US ticker$0.02
gate402_token_riskRug/tradeability verdict for a Base token (score + SAFE/CAUTION/AVOID; liquidity, honeypot sim, holder concentration)$0.03
gate402_momentumMomentum + order-flow signal for a Base token (RISING/FALLING + ACCUMULATION/DISTRIBUTION, honeypot-gated)$0.02
gate402_best_swapBest-execution intel: which DEX pool + estimated price impact for a trade size$0.02
gate402_launchesRadar of the freshest Base token launches, lightly pre-screened$0.02

…plus three free tools that run locally in this process (pure compute — no payment, no key, no network):

ToolWhat it does
gate402_token_countEstimate the token count of a string (budget your context window)
gate402_html_to_mdConvert an HTML string you already have into clean Markdown
gate402_json_repairCoerce malformed / LLM-mangled JSON into valid JSON

GPU marketplace

Gate402 also routes to third-party GPU/compute providers with escrow-on-success — the buyer is charged only if the provider delivers. Providers keep 85% of each call, paid out on-chain in USDC on Base.

ToolWhat it does
gate402_market_inferLLM inference via the marketplace, routed to the cheapest healthy provider. x402-native (settles on-chain per call — needs an x402 client, not the free-tier key)
gate402_providersFree. Browse active providers — model, per-call price, reliability
gate402_become_providerFree. List your own GPU and earn 85%/call — returns the exact sign-message + registration request

How billing works

On first use the server self-claims a free-credit API key from Gate402 and caches it at ~/.gate402-mcp/key.json. Calls draw down that credit. When it runs out, tools return a top-up link instead of failing. To skip the free tier, set GATE402_API_KEY to a funded account (top up).

The payment is the auth — there are no accounts to create.

Install

bash
npm install -g gate402-mcp

Or run without installing via npx gate402-mcp.

Configure your MCP client

Claude Desktop / Claude Code

Add to your MCP config (claude_desktop_config.json, or claude mcp add):

json
{  "mcpServers": {    "gate402": {      "command": "npx",      "args": ["-y", "gate402-mcp"]    }  }}

Cursor / Cline / Windsurf

Same shape — point the MCP server command at npx -y gate402-mcp.

Agent frameworks (LangChain, CrewAI, LlamaIndex)

gate402 is a standard stdio MCP server, so any framework with an MCP adapter can load all 17 tools:

LangChain / LangGraph (langchain-mcp-adapters):

python
from langchain_mcp_adapters.client import MultiServerMCPClientclient = MultiServerMCPClient({"gate402": {"command": "npx", "args": ["-y", "gate402-mcp"], "transport": "stdio"}})tools = await client.get_tools()   # feed into your agent

CrewAI (MCPServerAdapter):

python
from crewai_tools import MCPServerAdapterfrom mcp import StdioServerParametersparams = StdioServerParameters(command="npx", args=["-y", "gate402-mcp"])with MCPServerAdapter(params) as tools:    ...  # pass tools to your Crew

LlamaIndex (McpToolSpec):

python
from llama_index.tools.mcp import BasicMCPClient, McpToolSpectools = McpToolSpec(client=BasicMCPClient("npx", args=["-y", "gate402-mcp"])).to_tool_list()

Once wired, the agent calls the tools autonomously; the free-credit key is claimed on first use, and paid tools draw down from it.

Environment variables

VarDefaultPurpose
GATE402_API_KEY(unset)Use a funded account instead of the free tier.
GATE402_BASE_URLhttps://gate402.appOverride the gateway (self-hosting / testing).
GATE402_CONFIG_DIR~/.gate402-mcpWhere the cached free key is stored.

Develop

bash
npm installnpm run buildnpm start          # or: npm run dev

License

MIT

来源:README.md,提交 01277d6

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

3
  1. v0.8.1最新Sep 19, 2026
  2. v0.8.0Sep 17, 2026
  3. v0.5.0Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分