mcpField
G
GrindFree Agent Security

GrindFree Agent Security

ローカル
github.com/ronin93その他0今日更新

GrindFree Agent Security について

GrindFree Agent Security は、Base 上の有料エージェントセキュリティ API 向け MCP サーバーとクライアントコード例です。ルールベースでプロンプト、文書、メモリー、ツール呼び出し、コマンド、URL、送信内容を検査しますが、助言的な判定の適用は呼び出し側が担います。

主な機能

  1. 01プロンプトインジェクション検査とテキスト整形
  2. 02URL のクロールポリシー確認
  3. 03ツール呼び出し前のポリシー判定
  4. 04シェルコマンドと SQL の検査
  5. 05メモリーと送信内容の検査
  6. 06文書内の隠れた指示のスキャン

活用シーン

  1. 01エージェント処理前のプロンプト検査
  2. 02実行前のコマンドと SQL の確認
  3. 03エージェントのメモリー保存前の内容確認
  4. 04文書や出力に含まれる隠れた指示や漏えいの検査

MCP 対応

GrindFree セキュリティ API の検査、ポリシー判定、文書スキャン、無料のディスカバリープローブを MCP ツールとして提供します。呼び出しは x402 v2 を介して Base 上で USDC により支払います。

設定

ローカルサーバーの設定はどのクライアントでも共通です。コピーしてクライアントの MCP 設定ファイルに貼り付けてください。

mcp.json · 共通設定
{
"mcpServers": {
"ronin93-grindfree-agent-security": {
"command": "npx",
"args": [
"-y",
"@grindfree/agent-security-mcp"
],
"env": {
"X402_PRIVATE_KEY": "<X402_PRIVATE_KEY>"
}
}
}
}
起動コマンドnpx -y @grindfree/agent-security-mcp
設定が必要な環境変数
X402_PRIVATE_KEYシークレットCaller's own Base USDC EVM private key (0x…). Used only by the local MCP host to settle x402 payments. Never a GrindFree key; never commit this value.

ローカルサーバーにはマシン上の実行環境(Node.js 18 以上など)が必要です。設定ファイルの場所はクライアントごとに異なります。

パッケージ
npm@grindfree/agent-security-mcp0.2.0

ツール

ツール一覧はまだ取得されていません

ローカルサーバーのツールはマシン上で起動して初めて取得できます。メンテナーはまだツール一覧を提供していません。

README(原文)English

プロジェクトの README より

この README の日本語訳はまだありません。以下は英語の原文です。日本語の紹介はページ上部をご覧ください。

GrindFree Agent Security

MCP server + client snippets for GrindFree’s pay-per-call agent security APIs on Base:

ServiceEndpointPriceWhat it does
PromptShieldPOST https://promptshield.grindfree.net/v1/screen · /v1/clean$0.002Prompt-injection screen + HTML→LLM clean text
CrawlSafePOST https://crawlsafe.grindfree.net/v1/check$0.002robots.txt / X-Robots-Tag crawl gate (SSRF-guarded; not malware scanning)
ToolGuardPOST https://toolguard.grindfree.net/v1/evaluate$0.002Pre-tool-call allow | review | deny policy gate
CommandGuardPOST https://commandguard.grindfree.net/v1/command · /v1/sql$0.001Shell command + SQL check before execution: allow | warn | block
MemoryGuardPOST https://memoryguard.grindfree.net/v1/screen$0.002Screen content before it is written to agent memory (planted instructions, persistence, secrets/PII)
WireShieldPOST https://wireshield.grindfree.net/v1/scan$0.002Outbound leak check on agent output (zero-click image exfil, URL smuggling, canaries, prompt leakage)
DocShieldPOST https://docshield.grindfree.net/v1/scan$0.004Hidden instructions in PDF / DOCX / XLSX / PPTX / HTML / Markdown before the agent reads them

Price: per call in USDC (table above) on Base (eip155:8453) via x402 v2.
Wallet: the caller’s Base USDC wallet pays. This repo never ships GrindFree keys.

Contact: [email protected] · @grindfreelabs


Install / run the MCP server (stdio)

git clone https://github.com/ronin93/grindfree-agent-security.git
cd grindfree-agent-security/mcp-server
npm install

Set the caller’s funded Base USDC key in the MCP host env (never commit it):

export X402_PRIVATE_KEY=0xYOUR_BASE_USDC_PRIVATE_KEY
# PRIVATE_KEY is also accepted
node src/index.js

Claude Desktop / Cursor-style config:

{
  "mcpServers": {
    "grindfree-agent-security": {
      "command": "node",
      "args": ["/absolute/path/to/grindfree-agent-security/mcp-server/src/index.js"],
      "env": {
        "X402_PRIVATE_KEY": "0xYOUR_KEY"
      }
    }
  }
}
MCP tools
  • promptshield_screen / promptshield_clean
  • crawlsafe_check
  • toolguard_evaluate — your agent must enforce allow/review/deny before executing the tool; this API cannot stop a bypass
  • commandguard_command / commandguard_sql — check shell commands and SQL before running them
  • memoryguard_screen — check content before saving it to long-term memory
  • wireshield_scan — check agent output before rendering/sending it
  • docshield_scan — check a local file (path), base64 bytes, or HTML/Markdown for hidden instructions (max 3 MB)
  • grindfree_discovery — unpaid 402 / discovery probe (no spend)

HTTP snippets (no MCP)

  • examples/typescript-x402-fetch.ts — official @x402/fetch + @x402/evm
  • examples/python-x402.py — unpaid probes + paid hook
  • examples/langchain-tool.py — LangChain-style wrappers

Unpaid challenge (no wallet):

curl -sS -D - -o /tmp/ps402.json -X POST https://promptshield.grindfree.net/v1/screen \
  -H 'content-type: application/json' \
  -d '{"content":"hi","format":"text"}'
# Expect HTTP 402 + PAYMENT-REQUIRED

Honest limits

  • Heuristic / policy layers — not a full security program.
  • CrawlSafe is not malware, phishing, or legal/ToS advice.
  • All guards are deterministic rule packs (no LLM), so they are fast and cheap but can miss novel phrasing; decisions are advisory and your code must enforce block/deny.
  • DocShield parses structure and text; it does not OCR images or render pages, and legacy .doc/.xls/.ppt return 415 (not charged).
  • ToolGuard returns a decision; the caller/adapter must enforce it before tool execution. Missing policy → review. Not an exfiltration guarantee.
  • ToolGuard: always enforce allow|review|deny in your adapter before tool execution (the API cannot stop a bypass). GrindFree has confirmed funded settlement + HTTP 200 delivery on /v1/evaluate via a self-funded Base USDC test; still verify with your own wallet in production.

License

MIT — see LICENSE.

コメント

MCP は初めてですか?

プロトコルの概要から最初のサーバーの導入まで、よくある疑問にまとめて答えます。

AI アプリケーションが外部のツールやデータソースに統一的な方法で接続するためのオープンなプロトコルです。クライアントはモデルとの対話を担い、MCP サーバーはツール・リソース・プロンプトテンプレートを提供します。標準メッセージでやり取りするため、1 つのサーバーを複数のクライアントで再利用できます。