signet
AIエージェントがツールを呼び出しました。その内容を証明できますか?
ほとんどのエージェントスタックは事後にアクションをログ記録しますが、実際に何が送信されたかを検証することはありません。リクエストがリプレイ、改ざん、または偽造された場合、実行側はそれを知る術がありません。
Signetはこれを解決します。各エージェントにEd25519 IDを付与し、すべてのツール呼び出しに署名し、ハッシュチェーン化された監査ログで何が起こったかを記録します。クライアントやサーバーは、信頼する前にリクエストを検証できます。署名に3行、検証に3行。オープンソースです。
Signetが役に立つと感じたら、このリポジトリにスターを付けてより多くのチームに広めてください。
以下のCLIフローから始めて署名の動作を確認し、不正なリクエストの拒否を確認するに進んで、署名なし、改ざん、期限切れ、または宛先不明のリクエストが実行前にサーバーでブロックされる様子をご覧ください。
なぜSignetなのか
Signetは、エージェントのアクションに対して軽量な信頼レイヤーを追加します:
署名: すべてのツール呼び出しをエージェントの暗号鍵で署名
監査: 追記専用のハッシュチェーン化されたローカルログで何が起こったかを記録
検証: ネットワーク不要で、オフラインでアクションレシートを検証
統合: Claude Code、Codex CLI、MCPクライアント/サーバー、Pythonフレームワーク、Vercel AI SDKと統合
30秒で試す
pip install signet-authfrom signet_auth import SigningAgent
agent = SigningAgent.create("my-agent", owner="team")
receipt = agent.sign("github_create_issue", params={"title": "fix bug"})
assert agent.verify(receipt)
print(receipt.id)初めての方は、以下の4つのパスのいずれかから始めてください:
パスを選択
Claude Code: コーディングエージェントで最速の初回実行に最適。Claude Codeで
/plugin install signet@claude-plugins-officialを実行してください。5分で署名付きツール呼び出しと~/.signet/audit/にローカル監査ログが作成されます。Codex CLI: CodexでのBashツール呼び出しの署名に最適。
plugins/codex/を~/.codex/plugins/signetにコピーし、1つのPostToolUseフックを追加してください。5分で同じ監査証跡を使用してCodexで署名付きBashアクションが実行可能になります。MCPクライアント: MCPクライアントまたはトランスポートを制御している場合に最適。
new SigningTransport(inner, secretKey, "my-agent")でトランスポートをラップしてください。5分でparams._meta._signetにレシートを含む署名付きtools/callリクエストが作成されます。MCPサーバー: 実行前に検証を行いたい場合に最適。ツールハンドラー内で
verifyRequest(request, {...})を呼び出してください。5分で実行境界において署名者、鮮度、ターゲットバインディング、ツール/パラメータのチェックが可能になります。
不正なリクエストの拒否を確認する
最短の実行境界デモを実行します:
cd examples/mcp-agent
npm run execution-boundary-demoデモのソースについては、examples/mcp-agent/demo-execution-boundary.mjsを参照してください。
Signetが求められる場面
コーディングエージェント、MCPツール、またはCI自動化のための監査証跡が必要な場合
インシデント発生後に、どのアクションをどのアエージェントが要求したかを証明したい場合
ホストされたサービスに依存せず、オフラインで検証可能なレシートが必要な場合
スタックにプロキシやゲートウェイを追加せずに、署名付きツール呼び出しの証拠が欲しい場合
Signetとは何か、何ではないか
Signetはエージェントアクションの証明レイヤーです:署名、監査、検証を行います
SignetはSDK、プラグイン、MCPミドルウェアを使用して既存のエージェントスタックに適合するように設計されています
Signetはポリシーエンジン、ファイアウォール、またはアクションブロッカーではありません
Signetはゲートウェイの代替ではありません。予防および強制ツールを補完するものです
インストール
# CLI
cargo install signet-cli
# Python
pip install signet-auth
# TypeScript (MCP middleware)
npm install @signet-auth/core @signet-auth/mcp
# TypeScript (MCP server verification)
npm install @signet-auth/mcp-server
# TypeScript (Vercel AI SDK middleware)
npm install @signet-auth/vercel-aiクイックスタート
Claude Codeプラグイン
Claude Codeでのすべてのツール呼び出しを、設定不要で自動署名します:
# Option A: From the official Anthropic plugin marketplace
/plugin install signet@claude-plugins-official
# Option B: Add Signet as a marketplace source, then install
/plugin marketplace add Prismer-AI/signet
/plugin install signet@signetすべてのツール呼び出しはEd25519で署名され、~/.signet/audit/ のハッシュチェーン化された監査証跡に記録されます。
その他のインストール方法:
# From Git
claude plugin add --from https://github.com/Prismer-AI/signet
# Via signet CLI
signet claude installCodexプラグイン
Codex CLIでのすべてのBashツール呼び出しを自動署名します:
git clone https://github.com/Prismer-AI/signet.git
cp -r signet/plugins/codex ~/.codex/plugins/signet次に、~/.codex/hooks.json にフックを追加します:
{
"hooks": {
"PostToolUse": [{
"matcher": "Bash",
"hooks": [{
"type": "command",
"command": "node \"$HOME/.codex/plugins/signet/bin/sign.cjs\"",
"timeout": 5
}]
}]
}
}または、オンデマンド署名ツールとしてMCPサーバーを使用します:
codex mcp add signet -- npx @signet-auth/mcp-toolsCLI
# Generate an agent identity
signet identity generate --name my-agent
# Sign an action
signet sign --key my-agent --tool "github_create_issue" \
--params '{"title":"fix bug"}' --target mcp://github.local
# Verify a receipt
signet verify receipt.json --pubkey my-agent
# Audit recent actions
signet audit --since 24h
# Verify log integrity
signet verify --chainMCPクライアント統合 (TypeScript)
import { Client } from "@modelcontextprotocol/sdk/client/index.js";
import { StdioClientTransport } from "@modelcontextprotocol/sdk/client/stdio.js";
import { generateKeypair } from "@signet-auth/core";
import { SigningTransport } from "@signet-auth/mcp";
// Generate an agent identity
const { secretKey } = generateKeypair();
// Wrap any MCP transport -- all tool calls are now signed
const inner = new StdioClientTransport({ command: "my-mcp-server" });
const transport = new SigningTransport(inner, secretKey, "my-agent");
const client = new Client({ name: "my-agent", version: "1.0" }, {});
await client.connect(transport);
// Every callTool() is now cryptographically signed
const result = await client.callTool({
name: "echo",
arguments: { message: "Hello!" },
});すべての tools/call リクエストには、params._meta._signet に注入された署名付きレシートが含まれます。
MCPサーバー検証
MCPサーバーも制御している場合は、実行前にリクエストを検証します:
import { verifyRequest } from "@signet-auth/mcp-server";
server.setRequestHandler(CallToolRequestSchema, async (request) => {
const verified = verifyRequest(request, {
trustedKeys: ["ed25519:..."],
maxAge: 300,
});
if (!verified.ok) return { content: [{ type: "text", text: verified.error }], isError: true };
console.log(`Verified: ${verified.signerName}`);
// process tool call...
});Vercel AI SDK統合
import { generateText } from "ai";
import { generateKeypair } from "@signet-auth/core";
import { createSignetCallbacks } from "@signet-auth/vercel-ai";
const { secretKey } = generateKeypair();
const callbacks = createSignetCallbacks(secretKey, "my-agent");
const result = await generateText({
model: openai("gpt-4"),
tools: { myTool },
...callbacks,
prompt: "...",
});
// Every tool call is now signed
console.log(callbacks.receipts);リファレンスMCPサーバー
このリポジトリには、@signet-auth/mcp-server を使用したサーバーサイド検証を示す最小限のMCPリファレンスサーバーも含まれています。
cd examples/mcp-agent
npm ci
npm run verifier-server利用可能なツール:
inspect_current_request—params._meta._signetが含まれている場合、現在のMCPツール呼び出しを検証しますverify_receipt— 公開鍵に対して生のSignetレシートを検証しますverify_request_payload— 合成されたMCPtools/callペイロードをオフラインで検証します
環境変数:
SIGNET_TRUSTED_KEYS— カンマ区切りのed25519:<base64>公開鍵SIGNET_REQUIRE_SIGNATURE—trueまたはfalse(デフォルトはfalse)SIGNET_MAX_AGE— レシートの最大有効期間(秒単位、デフォルトは300)SIGNET_EXPECTED_TARGET— オプションの期待されるreceipt.action.target
スタンドアロンMCP署名サーバー
@signet-auth/mcp-tools は、Signetの署名、検証、コンテンツハッシュ計算をMCPツールとして公開します。MCP互換クライアントにプラグインしてください:
npx @signet-auth/mcp-tools利用可能なツール:signet_generate_keypair, signet_sign, signet_verify, signet_content_hash
Python (LangChain / CrewAI / AutoGen + 他6種)
pip install signet-authfrom signet_auth import SigningAgent
# Create an agent identity (saved to ~/.signet/keys/)
agent = SigningAgent.create("my-agent", owner="willamhou")
# Sign any tool call -- receipt is auto-appended to audit log
receipt = agent.sign("github_create_issue", params={"title": "fix bug"})
# Verify
assert agent.verify(receipt)
# Query audit log
for record in agent.audit_query(since="24h"):
print(f"{record.receipt.ts} {record.receipt.action.tool}")LangChain統合
from signet_auth import SigningAgent
from signet_auth.langchain import SignetCallbackHandler
agent = SigningAgent("my-agent")
handler = SignetCallbackHandler(agent)
# Every tool call is now signed + audited
chain.invoke(input, config={"callbacks": [handler]})
# Async chains supported too
from signet_auth.langchain import AsyncSignetCallbackHandlerCrewAI統合
from signet_auth import SigningAgent
from signet_auth.crewai import install_hooks
agent = SigningAgent("my-agent")
install_hooks(agent)
# All CrewAI tool calls are now globally signed
crew.kickoff()AutoGen統合
from signet_auth import SigningAgent
from signet_auth.autogen import signed_tool, sign_tools
agent = SigningAgent("my-agent")
# Wrap a single tool
wrapped = signed_tool(tool, agent)
# Or wrap all tools at once
wrapped_tools = sign_tools([tool1, tool2], agent)LangGraph統合
LangGraphはLangChainのコールバックシステムを使用するため、同じハンドラーが直接機能します:
from signet_auth import SigningAgent
from signet_auth.langgraph import SignetCallbackHandler
agent = SigningAgent("my-agent")
handler = SignetCallbackHandler(agent)
result = graph.invoke(input, config={"callbacks": [handler]})LlamaIndex統合
from signet_auth import SigningAgent
from signet_auth.llamaindex import install_handler
agent = SigningAgent("my-agent")
handler = install_handler(agent)
# All tool call events are now signed
index = ... # your LlamaIndex setup
response = index.as_query_engine().query("What is Signet?")
# Access receipts
print(handler.receipts)Pydantic AI統合
from signet_auth import SigningAgent
from signet_auth.pydantic_ai_integration import SignetMiddleware
agent = SigningAgent("my-agent")
middleware = SignetMiddleware(agent)
@middleware.wrap
def my_tool(query: str) -> str:
return f"result: {query}"Google ADK統合
from signet_auth import SigningAgent
from signet_auth.google_adk import SignetPlugin
agent = SigningAgent("my-agent")
plugin = SignetPlugin(agent)
# Pass as callback to ADK agentSmolagents統合
from signet_auth import SigningAgent
from signet_auth.smolagents import signet_step_callback
agent = SigningAgent("my-agent")
callback = signet_step_callback(agent)
bot = CodeAgent(tools=[...], model=model, step_callbacks=[callback])OpenAI Agents SDK統合
from signet_auth import SigningAgent
from signet_auth.openai_agents import SignetAgentHooks
agent = SigningAgent("my-agent")
oai_agent = Agent(
name="assistant",
hooks=SignetAgentHooks(agent),
tools=[...],
)注: ツール呼び出しの引数は、フックAPIではまだ利用できません (issue #939)。ツール名のみが署名されます。
低レベルAPI
from signet_auth import generate_keypair, sign, verify, Action
kp = generate_keypair()
action = Action("github_create_issue", params={"title": "fix bug"})
receipt = sign(kp.secret_key, action, "my-agent", "willamhou")
assert verify(receipt, kp.public_key)双方向レシート (サーバー共同署名)
from signet_auth import generate_keypair, sign, sign_bilateral, verify_bilateral, Action
# Agent signs the tool call
agent_kp = generate_keypair()
action = Action("github_create_issue", params={"title": "fix bug"})
agent_receipt = sign(agent_kp.secret_key, action, "my-agent")
# Server co-signs with the response
server_kp = generate_keypair()
bilateral = sign_bilateral(
server_kp.secret_key, agent_receipt,
{"content": [{"type": "text", "text": "issue #42 created"}]},
"github-server",
)
assert verify_bilateral(bilateral, server_kp.public_key)
assert bilateral.v == 3 # v3 = bilateral receipt仕組み
Your Agent
|
v
SigningTransport (wraps any MCP transport)
|
+---> Signs each tool call (Ed25519)
+---> Appends Action Receipt to local audit log (hash-chained)
+---> Forwards request to MCP server (unchanged)エージェント側のみ。MCPサーバーを変更する必要はありません。
アクションレシート
すべてのツール呼び出しは署名付きレシートを生成します:
{
"v": 1,
"id": "rec_e7039e7e7714e84f...",
"action": {
"tool": "github_create_issue",
"params": {"title": "fix bug"},
"params_hash": "sha256:b878192252cb...",
"target": "mcp://github.local",
"transport": "stdio"
},
"signer": {
"pubkey": "ed25519:0CRkURt/tc6r...",
"name": "demo-bot",
"owner": "willamhou"
},
"ts": "2026-03-29T23:24:03.309Z",
"nonce": "rnd_dcd4e135799393...",
"sig": "ed25519:6KUohbnSmehP..."
}署名は、RFC 8785 (JCS) 正規化JSONを使用して、レシート本体全体(アクション + 署名者 + タイムスタンプ + ノンス)をカバーします。フィールドを1つでも変更すると署名は無効になります。
CLIコマンド
コマンド | 説明 |
| Ed25519 IDを生成(デフォルトで暗号化) |
| 暗号化なしで生成(CI用) |
| すべてのIDを一覧表示 |
| 公開鍵をJSONとしてエクスポート |
| アクションに署名 |
| パラメータハッシュのみを保存(生のパラメータは保存しない) |
| stdoutではなくファイルにレシートを書き込み |
| 監査ログへの追記をスキップ |
| レシートの署名を検証 |
| 監査ログのハッシュチェーンの整合性を検証 |
| 最近のアクションを一覧表示 |
| 時間でフィルタリング(例: 24h, 7d) |
`signet audit --tool < |
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Prismer-AI/signet'
If you have feedback or need assistance with the MCP directory API, please join our Discord server