embed
x402ai embed
Compute a text embedding vector. Costs $0.01 (USDC on Base) per call. Spends real money; subject to a per-payment and per-session cap. Pass the text in `input` (max 3000 chars).
input必填
io.github.ukenal由 GitHub 帳號 ukenal 發布v0.1.1更新於 Oct 26, 2026
Pay-per-call AI tools (embed, summarize, ask) from x402ai, paid in USDC on Base via x402.
本機 MCP 伺服器,讓助理呼叫 x402ai 的付費工具(embed、summarize、ask),每次呼叫以 Base 上的 USDC 計費,並附免費的 x402 端點檢查器。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
參照 儲存庫 中的啟動說明。
A local MCP server that lets AI clients (Claude Desktop, Claude Code, Cursor and others) call the paid x402ai endpoints, paying per call in USDC on Base through the x402 protocol, plus a free inspector for any x402 endpoint.
It runs on your machine over stdio. You give it a buyer key; it answers each HTTP 402 payment challenge by signing a USDC authorization, and returns the result. Nothing is hosted for you and no account is needed.
Paid tools take one input string of up to 3,000 characters. health and inspect need no key.
This server holds a private key that can spend money. Use a new wallet that exists only for this, funded with a few dollars of USDC on Base at most. Payments are gasless for the payer (EIP-3009), so the wallet needs USDC only, no ETH. Never use a wallet that holds anything you can't afford to lose. The wallet balance is your real spending limit.
This server asks for a key that can spend money, and fake "x402 MCP" packages that steal keys have been reported. Don't take this README's word for it: the claims below are meant to be checked.
X402AI_BUYER_PRIVATE_KEY and used only to sign
payment authorizations locally, and it is scrubbed from error messages. It stays in this process's environment and
memory while the server runs, so anything that can read those (other code in this process, other programs running as
your user, your client's config file) can read the key. Clearing the variable inside the process would not change
that, because Linux keeps a process's starting environment readable under /proc.https://api.x402ai.dev: the paid tools and health. Signed authorizations go only here, only for the calling
tool's own route and price, and expire within 300 seconds.https://api.cdp.coinbase.com: only when you run inspect (Coinbase's validator and merchant lookup).inspect: one unpaid request (with a fixed body for POST). Nothing is signed.src/ (about 660 lines), built with tsc into dist/. The published
package contains only dist/, this README, LICENSE and package.json.package-lock.json
records the exact set that was tested. No dependency runs an install script. All dependencies have verified npm
registry signatures (npm audit signatures). The x402 client is @x402/fetch 2.29.0, with a per-payment cap set in
code.How to check: compare the published files with the source (npm pack x402ai-mcp@<version> downloads the exact
tarball for inspection), confirm the package name is exactly x402ai-mcp, and read src/.
Don't run unvetted MCP servers in the same client as a funded key. Any other program running as your user, including another MCP server, can typically read this process's environment and your client's config file, which holds the key in plain text.
Requires Node.js 20 or later. Add it to your MCP client's configuration, for example:
Note that most clients store this file in plain text, so the key sits on disk unencrypted. That is one more reason to use a dedicated low-balance wallet.
To try it without a key or any spending, set X402AI_DRY_RUN=1: paid tools then return the price quote they would
pay, and never sign anything.
The server logs to stderr only (stdout carries the MCP protocol). At startup it prints whether a key is configured, the buyer address and the session cap.
X402AI_MAX_SESSION_USD before signing. Once the cap is
reached, paid tools refuse until the server restarts.250 means $250. The wallet balance is the backstop that always holds.inspect sends the URL you give it to Coinbase's CDP (validator and merchant lookup). Don't inspect URLs you
want to keep private.inspect refuses local and private addresses (loopback, private ranges, link-local, CGNAT, IPv6 ULA, and IPv4
addresses wrapped in IPv6 forms), checked after DNS resolution. It allows https only.
The request to the inspected URL checks the resolved addresses at connect time, in the same lookup the socket
uses, so a DNS answer that changes after the early check cannot reach a local or private address. It follows no
redirects and verifies the TLS hostname. This covers the request to the inspected URL; inspect's calls to
Coinbase go to a fixed host.embed is usually under a second; summarize and ask take about 5-15 seconds (CPU inference).ENABLE_TOOL_SEARCH=false loads them up front.MIT. Not affiliated with Coinbase or the x402 Foundation.
來源:README.md,提交 495a762
x402ai embed
Compute a text embedding vector. Costs $0.01 (USDC on Base) per call. Spends real money; subject to a per-payment and per-session cap. Pass the text in `input` (max 3000 chars).
input必填x402ai summarize
Summarize text. Costs $0.02 (USDC on Base) per call; takes 5-16 s. Spends real money; subject to a per-payment and per-session cap. Pass the text in `input` (max 3000 chars).
input必填x402ai ask
Ask a question and get an answer. Costs $0.04 (USDC on Base) per call; takes 5-16 s. Spends real money; subject to a per-payment and per-session cap. Pass the question in `input` (max 3000 chars).
input必填x402ai health
Free. Check GET /health on api.x402ai.dev and show local session spend. No key needed.
無需輸入參數。
x402 inspect
Free, never signs or pays. Fetch an https URL unpaid, decode its x402 payment-required header, and check it with Coinbase CDP validate and merchant discovery. Sends the URL to api.cdp.coinbase.com.
url必填method已滿足適用檢查項的 90%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
{ "mcpServers": { "x402ai": { "command": "npx", "args": ["-y", "x402ai-mcp"], "env": { "X402AI_BUYER_PRIVATE_KEY": "0x...", "X402AI_MAX_SESSION_USD": "0.25" } } }}