AIクライアントによる決済のプリフライトチェック、未決済の承認状況の監視、およびHIP-3取引注文のローカルポリシーへの適合性評価を可能にします。
別名 base-buzz/paystage, mcp, @paystage/mcp
- スター
- 5
- ツール
- —
- ダウンロード数(30日間)
- —
- 最新バージョン
- 0.3.2
- 最終コミット
- 2026年11月14日
- ライセンス
- MIT
PayStage MCPとは
PayStageはMCPサーバーです。 AIクライアントによる決済のプリフライトチェック、未決済の承認状況の監視、およびHIP-3取引注文のローカルポリシーへの適合性評価を可能にします。.
プロジェクトのREADMEから生成された概要
PayStage MCP server について
PayStageは、AIエージェント内から財務上の安全性と取引コンプライアンスを管理することを可能にします。開発者はこの統合MCP serverを使用して、x402決済やHIP-3取引注文がローカルの支出ルールに適合しているか、プリフライトチェックを行うことができます。これはローカルポリシーのゲートとして機能し、実際の注文実行や特定の取引推奨を行うことなく、allow(許可)、review(要確認)、do not trade(取引不可)といった判定を提供します。
ユーザーはnpxまたはnpm経由でサーバーをセットアップし、stdio接続を通じて設定を行います。サーバーは環境変数を使用してカスタマイズ可能です。PAYSTAGE_POLICY_PATHを使用して支出ルールを記述したローカルのpolicy.jsonファイルを指定したり、PAYSTAGE_RPC_URLを使用してBaseのRPC URLを上書きしたりできます。未決済のERC-20、Permit2、EIP-3009の承認一覧を表示するツールや、承認済みでありながら決済されていない承認をフラグ立てするツールを提供します。
単純なチェックにとどまらず、このシステムは署名済みレシートの検証をサポートしており、決定内容が改ざんされていないことを保証します。これにより、ローカルのポリシーファイルや支出パターンへの厳格な準拠が必要なエージェントを構築する開発者に適しています。
できること
- 1提案された決済の検証署名を行う前に、提案されたx402決済がローカルの支出ポリシーに準拠しているかAIに確認させます。
- 2保留中の承認の監視エージェントに、対応が必要な未決済のERC-20またはPermit2の承認を特定させます。
- 3取引注文の監査エージェントを使用して、HIP-3取引注文を特定のTradePolicyと照らし合わせ、実行すべきかどうかを評価します。
- 4決定の整合性の検証署名済みレシートを確認し、ポリシーの判定が真正であり、改ざんされていないことを確認します。
プロジェクトの README から作成されています。すべてのユースケースは、その引用と照らし合わせて確認されています。
PayStage MCPのインストール方法
フォーマット検証日 2026年11月10日Cursor に追加Gooseに追加Claude CodeにPayStage MCPをインストール
$ claude mcp add mcp -- npx -y @paystage/mcpCursorにPayStage MCPをインストール
~/.cursor/mcp.json
{
"mcpServers": {
"mcp": {
"command": "npx",
"args": [
"-y",
"@paystage/mcp"
]
}
}
}VS CodeにPayStage MCPをインストール
.vscode/mcp.json
{
"servers": {
"mcp": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@paystage/mcp"
]
}
}
}VS Code CLIにPayStage MCPをインストール
$ code --add-mcp '{"name":"mcp","type":"stdio","command":"npx","args":["-y","@paystage/mcp"]}'Claude DesktopにPayStage MCPをインストール
claude_desktop_config.json
{
"mcpServers": {
"mcp": {
"command": "npx",
"args": [
"-y",
"@paystage/mcp"
]
}
}
}CodexにPayStage MCPをインストール
$ codex mcp add mcp -- npx -y @paystage/mcpCodex config.tomlにPayStage MCPをインストール
~/.codex/config.toml
[mcp_servers.mcp] command = "npx" args = ["-y", "@paystage/mcp"]
Gemini CLIにPayStage MCPをインストール
$ gemini mcp add -s user mcp npx -- -y @paystage/mcpGemini settings.jsonにPayStage MCPをインストール
~/.gemini/settings.json
{
"mcpServers": {
"mcp": {
"command": "npx",
"args": [
"-y",
"@paystage/mcp"
]
}
}
}設定
PAYSTAGE_POLICY_PATHPath to policy.json spending rules
PAYSTAGE_RPC_URLBase RPC URL override
| 名前 | 説明 | 種類 |
|---|---|---|
| PAYSTAGE_POLICY_PATH | Path to policy.json spending rules | |
| PAYSTAGE_RPC_URL | Base RPC URL override |
自動チェック
実行日 2026年11月13日完全なレポート →自動チェックに合格しました。これはセキュリティ監査ではありません。コードを読み、サーバーに必要最小限のアクセス権を与えてください。 チェックの仕組み
- ソースリポジトリがリンクされており、アクセス可能合格
- オープンソースライセンス (OSI)合格
- 過去1年以内にコミットまたはリリースあり合格
- パッケージ名が有名なパッケージに酷似していない合格
- リモートエンドポイントがHTTPSを使用未チェック
- 破壊的なツールがラベル付けされている未チェック
- モデルへの隠れた指示がない合格
- パッケージおよびその依存関係に重大な勧告なし合格
README
GitHubで見る@paystage/mcp
PayStage umbrella MCP server: payment preflight, auth watch, HIP-3 trade preflight, and velocity checks.
Not financial advice. The trade preflight tool is a local policy gate only — it does not place orders or recommend trades.
Published on npm as @paystage/mcp — see the npm page for the current version rather than a number here that can go stale.
What a valid receipt means
paystage-verify returning exit 0 means the key it verified against signed this receipt
and it has not been altered. That is all it means — and which key that was matters:
key_source: "published"→ PayStage's published key: the issuer signed it.key_source: "supplied"(you passed--keyor--key-url) → the key you named signed it, which is a weaker claim and not evidence about PayStage at all. Exit 0 on that path says nothing more than that the holder of that key produced the receipt.
It does not mean the payment happened — settlement is a separate on-chain event. It does not mean the verdict was correct — a receipt records a decision, not the soundness of the policy behind it. And it does not identify the caller; no caller identity is bound into the payload, by design.
Two narrower points a careful reader should know:
key_sourcetells you where the verifying key came from:published(PayStage's endpoint) orsupplied(someone passed--key). A receipt verified against a supplied key proves only that the holder of that key signed it.- A receipt with
signed: falseis still useful: the request and policy digests are checkable, so "over these inputs" survives even when provenance does not. --max-ageis your policy, not the issuer's. Nothing in the signed payload says how long a verdict is meant to hold, so a freshness bound is set by the verifier. If "this verdict is good for 24 hours" ever becomes the issuer's promise it has to be signed, and that is a format change.
Install
npx -y -p @paystage/mcp paystage-mcp
The server waits silently for an agent app to connect. That's normal; press Ctrl+C to exit. To try the tools without an app, run npx @modelcontextprotocol/inspector npx -y -p @paystage/mcp paystage-mcp.
Or:
npm install @paystage/mcp
The package exposes a stdio MCP server (bin: paystage-mcp).
MCP configuration
{
"mcpServers": {
"paystage": {
"command": "npx",
"args": ["-y", "-p", "@paystage/mcp", "paystage-mcp"],
"env": {
"PAYSTAGE_POLICY_PATH": "./policy.json"
}
}
}
}
Environment variables (all optional):
PAYSTAGE_POLICY_PATH— path topolicy.jsonspending rulesPAYSTAGE_RPC_URL— Base RPC URL override
Tools
evaluate_mcp_payment — Available now
Evaluates a proposed x402 payment against a local policy file and returns a verdict before the agent signs anything.
list_outstanding_auths — Available now
Lists outstanding ERC-20, Permit2, and EIP-3009 authorizations.
evaluate_outstanding_auths — Available now
Flags outstanding authorizations that need attention (e.g. authorized but never settled).
evaluate_hip3_trade — Available now
Evaluates a proposed HIP-3 / trade.xyz order against a local TradePolicy and returns a
decision: allow | review | do_not_trade.
Backed by @paystage/trade-preflight
(published separately), which can also be run standalone:
npx -y @paystage/trade-preflight
The policy is passed as a tool argument; no extra environment variables are required for this tool.
Packages
| Package | Version | Purpose |
|---|---|---|
@paystage/mcp |
Umbrella server (5 tools) | |
@paystage/preflight |
x402 payment preflight | |
@paystage/auth-watch |
Outstanding-auth tools | |
@paystage/trade-preflight |
HIP-3 / trade.xyz trade preflight | |
@paystage/velocity |
Rate / spend-pattern checks | |
@paystage/policy |
Shared policy schema + loader |
Verify a receipt
Every verdict can carry a signed receipt. paystage-verify checks one without trusting
us — it fetches the published key and verifies the signature over the canonical payload.
npx -y -p @paystage/mcp paystage-verify receipt.json
cat receipt.json | npx -y -p @paystage/mcp paystage-verify -
Exit codes are distinct on purpose:
| Code | Meaning |
|---|---|
| 0 | signature matches the payload |
| 1 | invalid — altered, or signed by a different key |
| 2 | unsigned — a record of the decision, with no proof of who made it |
| 3 | unverifiable — the key could not be fetched, or an input file could not be read, so nothing can be checked |
| 4 | inputs-mismatch — the receipt is genuine but does not cover the --request/--policy you supplied |
| 5 | stale — the receipt is genuine but older than --max-age allows |
"Invalid" and "could not check" are different facts and must not collapse into one
failure. --key <file> verifies against a local JWK for point-in-time checks.
Supply chain and access
This is the umbrella, so its install tree is wider than any single tool and Socket flags it accordingly. What it actually contains:
| Flag | Where it comes from |
|---|---|
| Network access, URL strings | @paystage/auth-watch (Base RPC reads) and @paystage/trade-preflight (one Hyperliquid info query). |
| Filesystem access | @paystage/policy reading your policy file. |
| Environment variable access | PAYSTAGE_POLICY_PATH, PAYSTAGE_RPC_URL. |
| "AI-detected code anomaly" | The official @modelcontextprotocol/server SDK's bundled JSON-schema validator, not PayStage code. |
The umbrella itself is ~16 KB with no network, no filesystem and no eval — the
capability lives in the dependencies, because that is what the tools are for.
Install a narrower surface if you only need part of it: @paystage/preflight and
@paystage/policy make no network calls at all.
Full table: SECURITY.md.
Links
-
Verify receipts:
npx -y -p @paystage/mcp paystage-verify <receipt.json> -
Website: paystage.xyz
-
HIP-3 context: docs.trade.xyz
-
Source: github.com/base-buzz/paystage
License
MIT
PayStage MCPのよくある質問
PayStage MCPをClaude Codeに追加するには
ターミナルでclaude mcp add mcp -- npx -y @paystage/mcpを実行します。すべてのプロジェクトで利用するには--scope userを追加します。
PayStage MCPをCursorに追加するには
~/.cursor/mcp.jsonを開き、上記のインストールセクションに示すCursor設定を使ってmcpServersの下にサーバーを追加します。
取引のプリフライトツールは、実際の取引を実行しますか?
いいえ、このツールはローカルポリシーのゲートとしてのみ機能し、注文の実行や取引の推奨を行うことはありません。
決定のレシートを検証するにはどうすればよいですか?
paystage-verifyコマンドを使用して、署名済みのレシートを公開鍵と照合することで、改ざんされていないことを確認できます。