ต้นแบบ · รุ่นทดลอง: มีทุก server ในทะเบียนทางการ อัปเดตทุก 30 นาที รีวิวและบัญชีผู้ใช้จะมาในขั้นถัดไป
PopNx MCPที่รวม MCP สำหรับคนใช้ AI · อธิบายเป็นภาษาคน

x402 Trinity

โดย devmsterรุ่น 0.2.4i★ –iรันบนเครื่อง
ชื่อใน registryio.github.devmster/x402-trinity

ติดตั้ง

ภาพรวม

คำอธิบายจากผู้ทำ (ภาษาอังกฤษตามต้นฉบับ)

Give an agent a wallet. Pays for x402 resources within hard limits. Base + USDC, gasless.

สามเสาของ PopNx MCP

สามเรื่องนี้ไม่รวมเป็นคะแนนเดียว เพราะความเห็น การวัด และความนิยม เป็นคนละเรื่องกัน

ใช้ทำอะไรได้

ตัวนี้ยังไม่ได้เรียบเรียงเป็นภาษาไทย ด้านล่างคือข้อเท็จจริงที่เราอ่านจาก registry

  • การเชื่อมต่อ: รันบนเครื่อง
  • ช่องทาง (transport): stdio
  • หมวด: อื่น ๆ
  • ต้องใส่ค่าเหล่านี้: X402_PRIVATE_KEY, X402_MAX_PER_REQUEST, X402_TOTAL_BUDGET

ติดตั้ง

เลือกโปรแกรม AI ที่คุณใช้ แล้วคัดลอกค่าตั้งไปวาง

ก่อนติดตั้ง

  • ผลตรวจเบื้องต้น: ผ่าน 1 จาก 1 ข้อ
  • รันในเครื่องคุณด้วยสิทธิ์ของผู้ใช้คุณ (ไฟล์ อินเทอร์เน็ต แอปต่าง ๆ)
  • ค่าที่คุณต้องใส่เอง: X402_PRIVATE_KEY, X402_MAX_PER_REQUEST, X402_TOTAL_BUDGET, X402_BUDGET_FILE, X402_ALLOW_HOSTS, X402_NETWORKS

ค่าที่ติดป้ายความลับคือกุญแจของบัญชีคุณ อย่าส่งให้ใคร และอย่าวางในแชต

ต้องเตรียมก่อน

  • npmติดตั้ง Node.js (มีคำสั่ง npx) ในเครื่อง

คุณใช้แอปไหน

เลือกแอปด้านบน เราจำไว้ให้ ครั้งหน้าปุ่มจะขึ้นว่า “ติดตั้งลง …”

เปิด Claude Desktop → Settings → Developer → Edit Config แล้ววางค่านี้ในไฟล์ claude_desktop_config.json

{
  "mcpServers": {
    "x402-trinity": {
      "command": "npx",
      "args": [
        "-y",
        "x402-trinity"
      ],
      "env": {
        "X402_PRIVATE_KEY": "ใส่ค่าของคุณ",
        "X402_MAX_PER_REQUEST": "ใส่ค่าของคุณ",
        "X402_TOTAL_BUDGET": "ใส่ค่าของคุณ",
        "X402_BUDGET_FILE": "ใส่ค่าของคุณ",
        "X402_ALLOW_HOSTS": "ใส่ค่าของคุณ",
        "X402_NETWORKS": "ใส่ค่าของคุณ"
      }
    }
  }
}

พิมพ์คำสั่งนี้ใน Terminal

claude mcp add x402-trinity --env X402_PRIVATE_KEY='ใส่ค่าของคุณ' --env X402_MAX_PER_REQUEST='ใส่ค่าของคุณ' --env X402_TOTAL_BUDGET='ใส่ค่าของคุณ' --env X402_BUDGET_FILE='ใส่ค่าของคุณ' --env X402_ALLOW_HOSTS='ใส่ค่าของคุณ' --env X402_NETWORKS='ใส่ค่าของคุณ' -- npx -y x402-trinity

เติมค่าที่เว้นว่างไว้ก่อนรัน

เปิดใน Cursor

หรือคัดลอกค่าตั้งเอง

วางในไฟล์ .cursor/mcp.json ของโปรเจกต์ หรือ ~/.cursor/mcp.json

{
  "mcpServers": {
    "x402-trinity": {
      "command": "npx",
      "args": [
        "-y",
        "x402-trinity"
      ],
      "env": {
        "X402_PRIVATE_KEY": "ใส่ค่าของคุณ",
        "X402_MAX_PER_REQUEST": "ใส่ค่าของคุณ",
        "X402_TOTAL_BUDGET": "ใส่ค่าของคุณ",
        "X402_BUDGET_FILE": "ใส่ค่าของคุณ",
        "X402_ALLOW_HOSTS": "ใส่ค่าของคุณ",
        "X402_NETWORKS": "ใส่ค่าของคุณ"
      }
    }
  }
}

เบราว์เซอร์จะถามก่อนเปิดแอป จากนั้นแอปแสดงค่าตั้งให้ตรวจแล้วกดยืนยัน ช่อง key เว้นว่างไว้ให้คุณใส่เอง

เปิดใน VS Code

หรือคัดลอกค่าตั้งเอง

วางในไฟล์ .vscode/mcp.json ของโปรเจกต์

{
  "servers": {
    "x402-trinity": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "x402-trinity"
      ],
      "env": {
        "X402_PRIVATE_KEY": "ใส่ค่าของคุณ",
        "X402_MAX_PER_REQUEST": "ใส่ค่าของคุณ",
        "X402_TOTAL_BUDGET": "ใส่ค่าของคุณ",
        "X402_BUDGET_FILE": "ใส่ค่าของคุณ",
        "X402_ALLOW_HOSTS": "ใส่ค่าของคุณ",
        "X402_NETWORKS": "ใส่ค่าของคุณ"
      }
    }
  }
}

เบราว์เซอร์จะถามก่อนเปิดแอป จากนั้นแอปแสดงค่าตั้งให้ตรวจแล้วกดยืนยัน ช่อง key เว้นว่างไว้ให้คุณใส่เอง

ตัวนี้รันในเครื่องคุณ แต่ ChatGPT ต่อได้เฉพาะ server บนอินเทอร์เน็ต ลองเลือกแอปอื่น

ตัวเลือกเก็บในคุกกี้บนเครื่องนี้ ไม่ต้องมีบัญชี

ค่าที่ต้องใส่เอง

  • X402_PRIVATE_KEY ความลับ จำเป็น env
    Private key of the wallet that pays. Use a dedicated wallet holding only what you would accept losing. The server refuses to start without it.
  • X402_MAX_PER_REQUEST จำเป็น env
    Hard ceiling for a single payment, in atomic units (USDC has 6 decimals, so 50000 is $0.05). Required: a model decides when payments happen, so the cap cannot come from the model.
  • X402_TOTAL_BUDGET จำเป็น env
    Lifetime ceiling across all payments, in atomic units. Required for the same reason as the per-request cap.
  • X402_BUDGET_FILE env
    Path to a file that makes the lifetime budget survive restarts. Without it the total resets every time the server starts.
  • X402_ALLOW_HOSTS env
    Comma-separated hosts that may be paid. Anything else is refused however convincing the challenge looks.
  • X402_NETWORKS env
    Networks to accept. Defaults to base.

ค่าตั้งนี้สร้างจากข้อมูลใน registry ของผู้ทำ ถ้าไม่ตรงกับ README ให้เชื่อ README

ทำอะไรได้บ้าง

รันในเครื่องคุณ รายการเครื่องมือจะขึ้นในแอป AI หลังติดตั้ง

ผลตรวจเบื้องต้นi

เราตรวจจากข้อมูลที่ใครก็เปิดดูได้ ยังไม่ได้อ่านโค้ด ข้อที่ไม่เกี่ยวกับตัวนี้ไม่นับในตัวหาร · ตรวจเมื่อ 6 พ.ย. 2569

  • ✓ ผ่าน

    ตัวตนผู้ทำตรงกับ repo

    ชื่อใน registry ยืนยันด้วยบัญชี GitHub devmster ซึ่งเป็นเจ้าของ repo

  • … ยังไม่ตรวจ

    ยังมีคนดูแล

    ยังไม่ได้อ่านข้อมูล repo จาก GitHub

  • … ยังไม่ตรวจ

    มีสัญญาอนุญาต (license)

    ยังไม่ได้อ่านข้อมูล repo จาก GitHub

  • – ไม่เกี่ยว

    endpoint ตอบ

    ตัวนี้รันบนเครื่องคุณ ไม่มี endpoint บนอินเทอร์เน็ต

  • – ไม่เกี่ยว

    ล็อกอินแบบ OAuth

    ตัวนี้รันบนเครื่อง ใช้ค่าที่ตั้งในเครื่องแทน

  • … ยังไม่ตรวจ

    คำอธิบายเครื่องมือไม่มีคำสั่งแอบแฝง

    รันในเครื่องคุณ เราอ่านรายการเครื่องมือได้เฉพาะตัวที่มี endpoint บนอินเทอร์เน็ต

เทียบกับตัวอื่นในหมวด อื่น ๆi

  • ดาวมากกว่า 0% ของอีก 32464 ตัวในหมวดนี้
  • ส่งรุ่นใหม่เข้า registry ล่าสุดกว่า 51% ของอีก 32464 ตัวในหมวดนี้
  • ผลตรวจเบื้องต้นดีกว่าหรือเท่ากับ 100% ของอีก 32464 ตัวในหมวดนี้

เทียบกับทุก server ที่ยังใช้งานในหมวดนี้ทั้งทะเบียน ดาวนับเฉพาะเมื่อผู้ลงทะเบียนเป็นเจ้าของ repo

คำถามที่พบบ่อย

x402 Trinity ปลอดภัยไหม?

จากการตรวจเบื้องต้นของเรา ผ่าน 1 จาก 1 ข้อที่ตรวจได้ เรายังไม่ได้อ่านโค้ด ก่อนใส่กุญแจหรือ token ให้ดูว่า server ขอสิทธิ์อะไร และเลือกกุญแจที่ทำได้เท่าที่จำเป็น

ต้องใช้กุญแจหรือรหัสอะไรบ้าง?

ต้องใส่ค่าเหล่านี้: X402_PRIVATE_KEY, X402_MAX_PER_REQUEST, X402_TOTAL_BUDGET

ตัวนี้รันบนเครื่องหรือบนคลาวด์?

รันบนเครื่องของคุณ โปรแกรม AI จะเปิด server ขึ้นมาเองเมื่อใช้ ข้อมูลไม่ต้องผ่านเซิร์ฟเวอร์ของผู้ทำ (ยกเว้นตัวที่ไปเรียกบริการออนไลน์ต่อ)

ยังมีคนดูแลอยู่ไหม?

repo บน GitHub มีการแก้โค้ดล่าสุด – และส่งรุ่นล่าสุด (0.2.4) เข้า registry 40 วันที่ผ่านมา

ใช้กับโปรแกรมไหนได้บ้าง?

โปรแกรมที่รองรับ MCP เช่น Claude Desktop, Claude Code, Cursor และ VS Code ตัวนี้ต้องมี Node.js ในเครื่องด้วย

มีตัวไหนใช้แทนได้บ้าง?

ในหมวดเดียวกันมี Spec Driven Development, Remote Desktop Commander, yontu

ตัวที่ใช้แทนได้

server หมวดเดียวกันจากผู้ทำคนอื่น เรียงตามดาว

อ่านการ์ด:★ ดาว GitHubiสามเสา: รีวิว · ผลตรวจ · การใช้งานiอัปเดต = วันที่ส่งรุ่นล่าสุดเข้า registryi

Spec Driven Development

โดย formulahendry

MCP Server that facilitates spec-driven development workflows, not just Vibe Coding.

รันบนเครื่อง★ 440MITอัปเดต 14 เดือนที่ผ่านมา
ติดตั้ง

Remote Desktop Commander

โดย desktop-commander

Remote Desktop Commander: use files, terminal and processes on your own computers from any AI app.

รันบนคลาวด์★ 211อัปเดต เมื่อวาน
ติดตั้ง

yontu

โดย senrecep

Türkçe yazı denetimi: TDK kuralları, yapay zekâ izleri, metin türüne göre üslup.

รันบนเครื่องอัปเดต วันนี้
ติดตั้ง

README จากผู้ทำ

เปิดอ่าน README

ส่วนนี้คัดจาก repo ของผู้ทำตามต้นฉบับ PopNx MCP ไม่ได้ตรวจหรือรับรองเนื้อหา ตัด HTML รูปภาพ และสคริปต์ออกแล้ว ลิงก์จะพาออกนอกเว็บ

x402-trinity

A drop-in `fetch` replacement that lets an AI agent pay for things by itself — with hard spending limits, no hosted wallet service, and no changes to the agent's own code.

Zero runtime dependencies. 7 KB gzipped. Buyer *and* seller in TypeScript; buyer in Python.

npm install x402-trinity

Copy-paste setup

A ready-made brief for your coding agent. Paste it in and it does the install, the wallet, your spending limits, the price check and the purchase — you just say what you are buying and what it may spend.

→ [Standard Purchase Harness](https://x402trinity.com/purchase)

Buying from a paid API, a dataset, a file, or another agent's service — anything that answers HTTP 402.

More setups, and a marketplace for you to earn for your products or buy from the marketplace, at [x402trinity.com](https://x402trinity.com).

Why

When an agent hits a paid resource it gets 402 Payment Required. Without something to handle that, the request simply fails.

x402-trinity handles it: reads the challenge, checks it against limits you set, signs, retries. All of it locally — no hosted wallet service, no third-party API, and the key never leaves your process.

Gas exists but the payer doesn't pay it — under EIP-3009 the facilitator submits the transfer, so an agent's wallet only ever needs USDC.


Buy (agent pays for things)

import { createX402Fetch } from 'x402-trinity';

const x402Fetch = createX402Fetch({ privateKey: process.env.X402_PRIVATE_KEY, // never hardcode policy: { maxAmountPerRequest: '5000', // 0.005 USDC max per call (REQUIRED) totalBudget: '1000000', // 1.00 USDC lifetime (REQUIRED) allowHosts: ['api.example.com'], allowPayTo: ['0x...'], }, });

const r = await x402Fetch('https://api.example.com/data'); // 402 handled, returns 200

Or patch the global so unmodified code pays automatically:

import { installX402 } from 'x402-trinity';

const uninstall = installX402(cfg); // globalThis.fetch now pays 402s

Confirm which wallet will pay before funding anything:

X402_PRIVATE_KEY=0x... npx x402-trinity-whoami

It prints the address and its balance on every chain, and never prints the key. If the address is not the wallet you meant, stop before sending anything.

Sell (charge for a resource, get paid)

import { createX402Seller } from 'x402-trinity/seller';

import { createFileNonceStore } from 'x402-trinity/budget-file';

const seller = createX402Seller({ payTo: '0xYourWallet', // 100% of every payment lands here price: '10000', // 0.01 USDC, atomic units network: 'base', facilitator: 'https://your-facilitator.example', // REQUIRED — no default exists nonceStore: createFileNonceStore('./.x402-nonces.json'), // REQUIRED — see below });

// in any fetch-style handler: const gate = await seller.guard(request); if (gate.response) return gate.response; // unpaid or refused — hand back the 402 return new Response(yourData, { headers: seller.receiptHeader(gate.settlement) });

Both required fields are deliberate. There is no default facilitator because settling is someone's real money and guessing an endpoint is not a default. And the replay guard has to outlive the process: an in-memory one forgets every settled payment on restart, so a buyer could re-present a spent authorization and get the resource again for free. The constructor throws rather than let either be implicit.

The seller never holds a private key and never touches funds. It quotes a price and asks a facilitator to verify and settle; money moves buyer → you directly on-chain.

This release ships Base + USDC only. Any other EVM chain works through customChains;

your address is the same on all of them.


What it does

Protocolsx402 v1 and v2, detected per response. Unknown versions and MPP challenges declined with a clear reason, never guessed
ChainsBase mainnet + USDC, shipped as the default. Any other EVM chain via customChains
Networksshort names *and* CAIP-2 (eip155:8453)
CustodyprivateKey, additive shards, or remoteSign (HSM/MPC) — your choice, not the architecture's
Speed3.2 µs warm / 1.0 ms cold (TypeScript); 1.2 µs / 1.7 ms (Python)
Runtimeauto-detects Cloudflare Workers and changes strategy; also Node, Bun, Deno
Safetymandatory caps, allowlists, never-pay-twice reconciliation, timing-hardened signing
Another chain

Base is the default. The signing is chain-agnostic, so add whatever you need — including a testnet to rehearse on:

const fetch2 = createX402Fetch({

privateKey: process.env.X402_PRIVATE_KEY, maxAmountPerRequest: '10000', totalBudget: '100000', customChains: { 'base-sepolia': { id: 84532, asset: '0x036cbd53842c5426634e7929541ec2318f3dcf7e', name: 'USDC', version: '2' }, }, });

Verify the entry against the deployed contract first: call DOMAIN_SEPARATOR() and check it equals what this library computes. A wrong name or version produces a signature that looks valid and the contract rejects.

It deliberately will not

Broadcast to a chain · hold funds · need gas or an RPC · take a cut of a payment (structurally impossible — EIP-3009 has one recipient) · require a hosted signer · pay without limits · guess at a protocol it doesn't speak.


Safety — read this before real money

Caps are mandatory. maxAmountPerRequest and totalBudget have no defaults; the wrapper refuses to construct without them. An auto-payer without limits is a money leak controlled by whoever runs the server.

`totalBudget` alone is per-instance. It is an in-memory counter that resets on restart, on a new client, and on every Cloudflare Worker isolate — which is per request. On mainnet that turns a lifetime cap into a per-request cap. Mainnet therefore requires a durable `budgetStore`, or an explicit acknowledgeEphemeralBudget: true:

import { createFileBudgetStore } from 'x402-trinity/budget-file';

createX402Fetch({ ..., budgetStore: createFileBudgetStore('./.x402-budget.json'), // survives restarts });

The key is in the process. That is the trade for having no hosted signer. Bound it: use a dedicated wallet holding only what you would accept losing, set allowPayTo so an exfiltrated key still cannot pay a stranger through this wrapper, and use remoteSign if you need enclave-grade custody.

Timing hardening is hardening, not a proof. Secret scalars use blinding plus always-add-and-double, which cut the timing spread from 99.6% to 12% (Python: 99.9% → 1.1%). BigInt arithmetic is itself variable-time and no pure-JS implementation removes that.


MCP server — give an agent a wallet

MCP is how an assistant gets tools. This exposes three:

tool
check_pricewhat a resource costs, without paying
pay_and_fetchfetch it, paying if it is within your limits
wallet_statusaddress, balance, spent, remaining
{

"mcpServers": { "x402-trinity": { "command": "npx", "args": ["-y", "x402-trinity-mcp"], "env": { "X402_PRIVATE_KEY": "0x...", "X402_MAX_PER_REQUEST": "50000", "X402_TOTAL_BUDGET": "1000000", "X402_BUDGET_FILE": "./.x402-budget.json", "X402_ALLOW_HOSTS": "api.example.com", "X402_NETWORKS": "base" } } } }

A model decides when these run. It cannot be reasoned with about budgets, and a paywalled page can claim any price it likes. So the limits are not parameters the model can set — they come from the environment, and the server refuses to start without X402_PRIVATE_KEY, X402_MAX_PER_REQUEST and X402_TOTAL_BUDGET.

Set X402_BUDGET_FILE too, or the lifetime ceiling resets every restart. Set X402_ALLOW_HOSTS and nothing else can be paid, however convincing the challenge looks. Use a wallet holding only what you would accept losing.


Python

Same protocol, standard library only. Buyer only — to charge for a resource, use the TypeScript seller. Aimed at long-lived processes: on-body agents, robotics controllers, harvesting scripts.

from x402_trinity import X402Client, Policy

client = X402Client( private_key=os.environ["X402_PRIVATE_KEY"], policy=Policy(max_amount_per_request=5000, total_budget=1_000_000, allow_hosts=["api.example.com"]), ) body = client.urlopen("https://api.example.com/data").read()

Or as a decorator, so payment-unaware code just works:

from x402_trinity import x402_telemetry

@x402_telemetry(private_key=KEY, policy=Policy(...)) def harvest(): return urllib.request.urlopen("https://sensor.local/v1/lidar").read()

The warm path is 1.1 µs — a long-lived controller is warm after its first payment.


Development

npm install

npm run build # dist/*.js + *.min.js + *.d.ts

esbuild, typescript and wrangler are dev dependencies only, used for building. The shipped package has zero runtime dependencies.

License

Business Source License 1.1. The source is open to read, modify and use non-commercially; production use is granted except as a hosted or managed service offering its functionality to third parties. It converts to MIT on 2029-08-25. See LICENSE.

This software moves money — read the additional notice there, and set your spending caps.

Convenience fee: 0.1% per transaction and 1 cent every 100 transactions.

ถาม PopNx