Skip to main content
Glama
PiQrypt

PiQrypt MCP Server

by PiQrypt

PiQrypt MCPサーバー

Model Context Protocolを介したAIエージェントのための暗号学的監査証跡

MCP npm downloads AISS License Python Node Add to Cursor Install in Claude

Related MCP server: DCL Evaluator

🚀 PiQrypt MCPとは?

PiQrypt MCPサーバーは、AIエージェントのための耐量子暗号監査証跡であるPiQryptへのModel Context Protocolアクセスを提供します。

ユースケース:

  • 🤖 AIエージェント: すべての意思決定に暗号学的証明で署名

  • 📊 n8nワークフロー: 自動化ワークフローに監査証跡を追加

  • 🏦 トレーディングボット: 自動取引のためのSEC/FINRAコンプライアンス

  • 👥 人事自動化: GDPR準拠のAI採用決定

  • 🏥 ヘルスケアAI: 医療判断のためのHIPAA監査証跡


📦 インストール

前提条件

1. piqryptのインストール(必須 — Python 3.8以上)

pip install piqrypt

MCPサーバーは、すべての暗号操作をpiqrypt Pythonパッケージに委任します。 インストールされていない場合、サーバーはツール呼び出しのたびに明確なエラーを返します。

2. MCPサーバーのインストール(Node.js 18以上)

npm install -g @piqrypt/mcp-server

npx経由でインストール(グローバルインストール不要)

npx @piqrypt/mcp-server

ソースからビルド

git clone https://github.com/piqrypt/piqrypt-mcp-server
cd piqrypt-mcp-server
npm install
npm run build

PIQRYPT_PYTHON — カスタムPython環境

デフォルトでは、サーバーはpython3(Linux/Mac)またはpython(Windows)を使用します。 piqryptが仮想環境にインストールされている場合は、この変数を適切なインタープリタを指すように設定してください:

Windows

set PIQRYPT_PYTHON=C:\path\to\venv\Scripts\python.exe

Linux / Mac

export PIQRYPT_PYTHON=/path/to/venv/bin/python

永続化するには、MCPクライアント設定に追加してください:

{
  "mcpServers": {
    "piqrypt": {
      "command": "piqrypt-mcp-server",
      "args": [],
      "env": {
        "PIQRYPT_PYTHON": "/path/to/venv/bin/python"
      }
    }
  }
}

⚙️ 設定

Claude Desktop

~/Library/Application Support/Claude/claude_desktop_config.jsonに追加します:

{
  "mcpServers": {
    "piqrypt": {
      "command": "piqrypt-mcp-server",
      "args": []
    }
  }
}

n8n (v1.88以上)

  1. n8n MCP統合をインストール

  2. PiQrypt MCPサーバーを設定に追加

  3. MCPノード経由でワークフローで使用


互換性

MCPクライアント

クライアント

バージョン

備考

MCP互換クライアント

MCP spec 2024-11+

stdioトランスポート

n8n

1.88+

MCPノード経由

Cursor

すべて

mcp設定に追加

VS Code

すべて

mcp設定に追加

Continue

すべて

mcp設定に追加

Windsurf

すべて

mcp設定に追加

自動化プラットフォーム (MCPノード経由)

プラットフォーム

統合

ユースケース

n8n

MCPノード (ネイティブ)

ノーコード監査証跡

Make.com

HTTPモジュール

Webhookトリガーによるスタンプ

Zapier

Webhooks + HTTP

基本的なイベント記録

PiQrypt MCPで監査できること

すべてのツール呼び出しは、スタンプ、検証、エクスポート、検索という同じ4つの操作を経由します。コンテキストに応じて、実際には以下のような意味を持ちます:

自動取引 / 金融 注文の送信、ポートフォリオのリバランス、取引のトリガーを行うエージェントは、実行前に各意思決定をスタンプできます。署名されたチェーンは、追加のインフラなしでSEC/FINRA監査用にエクスポート可能です。

人事および採用の自動化 候補者の評価、履歴書のスコアリング、応募者のルーティングを行うワークフローは、各意思決定をスタンプできます。AI支援による採用のためのGDPR第22条準拠の監査証跡を提供します。誰が何をいつ決定し、どのようなデータが使用されたか(ハッシュ化され、生データは保存されません)を記録します。

コンテンツおよび出版パイプライン コンテンツの草案作成、承認、公開を行うエージェントは、各ステップをスタンプできます。複数のAIエージェントが協力し、帰属関係を証明する必要がある場合に便利です。どのエージェントがどの順序で何を書いたかを証明できます。

DevOpsおよびCI/CD デプロイのトリガー、ブランチのマージ、シークレットのローテーションを行うエージェントは、各アクションをスタンプできます。自律型エージェントによって行われたインフラ変更の改ざん防止記録を提供します。

ヘルスケアおよび医療AI 診断やトリアージを行うエージェントは、各推奨事項をスタンプできます。各AI出力を検証可能なエージェントIDにリンクするHIPAA準拠の監査証跡を提供します。

すべてのケースにおける共通パターン:

[Agent makes decision]
↓
piqrypt_stamp_event    ← sign + chain
↓
[Agent executes action]
↓
piqrypt_export_audit   ← portable proof, verifiable
                          without PiQrypt installed

🛠️ 利用可能なツール

1. piqrypt_stamp_event

AIの意思決定に暗号学的証明で署名します。

パラメータ:

  • agent_id (文字列, 必須): エージェント識別子

  • payload (オブジェクト, 必須): 意思決定データ

  • previous_hash (文字列, オプション): チェーンのための前のイベントハッシュ

例:

const event = await mcp.call('piqrypt_stamp_event', {
  agent_id: 'trading_bot_v1',
  payload: {
    action: 'buy',
    symbol: 'AAPL',
    quantity: 100,
    price: 150.25
  }
});

戻り値:

{
  "version": "AISS-1.0",
  "agent_id": "trading_bot_v1",
  "timestamp": 1739382400,
  "nonce": "uuid-...",
  "payload": { ... },
  "previous_hash": "sha256:...",
  "signature": "base64:..."
}

2. piqrypt_verify_chain

イベントチェーンの整合性を検証します。

パラメータ:

  • events (配列, 必須): 検証するイベント

例:

const result = await mcp.call('piqrypt_verify_chain', {
  events: [event1, event2, event3]
});

戻り値:

{
  "valid": true,
  "events_count": 3,
  "chain_hash": "sha256:...",
  "errors": []
}

3. piqrypt_export_audit

コンプライアンスのために監査証跡をエクスポートします。

パラメータ:

  • agent_id (文字列, 必須): エクスポートするエージェント

  • certified (ブール値): PiQrypt認証を要求

  • output_format (文字列): json または pqz

例:

const audit = await mcp.call('piqrypt_export_audit', {
  agent_id: 'trading_bot_v1',
  certified: true,
  output_format: 'json'
});

4. piqrypt_search_events

SQLiteインデックスによる高速検索。

パラメータ:

  • event_type (文字列, オプション): タイプでフィルタリング

  • from_timestamp (数値, オプション): 開始時間

  • to_timestamp (数値, オプション): 終了時間

  • limit (数値): 最大結果数 (デフォルト: 100)

例:

const trades = await mcp.call('piqrypt_search_events', {
  event_type: 'trade_executed',
  from_timestamp: 1739300000,
  limit: 50
});

📊 Vigilダッシュボード (オプション, 無料)

スタンプされたすべてのイベントは、PiQryptのローカル監視ダッシュボードであるVigilで確認できます。

注: VigilはMCPサーバーによって自動的に起動されません。 ダッシュボードを開く前に、個別に起動する必要があります。

piqrypt vigil
# → http://localhost:8421

無料プランには、チェーンの健全性、VRSリスクスコア、7日間の履歴、重大なアラートが含まれます。 90日間の履歴、TrustGateガバナンス、耐量子署名についてはProにアップグレードしてください。


🗑️ エージェントの管理

エージェントは最初のスタンプ時に自動的に作成されます。エージェントを表示および削除するには:

  1. Vigilを起動: piqrypt vigil

  2. http://localhost:8421 を開く

  3. All Agents ビューに移動

  4. 削除するエージェントにチェックを入れる → ✕ Delete selected をクリック

  5. 確認 — エージェントが残っていない場合、Vigilはウェルカム画面に戻ります

エージェントはマシン上の ~/.piqrypt/agents/ に保存されます。 エージェントを削除すると、そのキーとイベント履歴が完全に削除されます。


🔒 セキュリティモデル

プロセス分離

┌─────────────────────────────────────┐
│  MCP Client (any MCP-compatible client)     │
│  ↓ JSON-RPC over stdio              │
├─────────────────────────────────────┤
│  MCP Server (TypeScript/Node.js)    │  ← No crypto here
│  ↓ subprocess call                  │
├─────────────────────────────────────┤
│  Python Bridge (bridge.py)          │
│  ↓ invokes CLI                      │
├─────────────────────────────────────┤
│  PiQrypt CLI (Python)               │
│  ↓ uses                             │
├─────────────────────────────────────┤
│  Core Crypto (aiss package)         │  ← All crypto here
│  • Ed25519 / Dilithium3             │
│  • RFC 8785 canonical JSON          │
│  • Hash chains                      │
└─────────────────────────────────────┘

保証

✅ 秘密鍵はMCP層に決して公開されません ✅ すべての暗号処理はPython内で行われます (Ed25519, Dilithium3) ✅ CLIと同じセキュリティ (プロセス分離) ✅ RFC AISS-1.1準拠 (同一の出力) ✅ サブプロセス呼び出し前の入力検証


📚 例

トレーディングボット (n8n)

[Webhook: price alert] 
    ↓
[AI Decision: buy/sell?]
    ↓
[PiQrypt MCP: stamp decision]  ← Audit trail
    ↓
[Execute trade API]
    ↓
[Database: store proof]

人事自動化

[Upload CV]
    ↓
[AI Agent: evaluate candidate]
    ↓
[PiQrypt MCP: stamp evaluation]  ← GDPR compliance
    ↓
[Email HR team]

🧪 テスト

# Build
npm run build

# Test bridge
python3 src/python/bridge.py stamp '{"agent_id":"test","payload":{"action":"test"}}'

# Test MCP server (manual)
node dist/index.js
# Then send MCP request via stdin

🔧 トラブルシューティング

Error: piqrypt is not installed in this Python environment

MCPサーバーが使用しているPythonインタープリタがpiqryptパッケージを見つけられません。

修正:

pip install piqrypt

piqryptがシステムPythonではなく仮想環境にインストールされている場合は、PIQRYPT_PYTHONを正しいインタープリタを指すように設定してください:

# Linux / Mac
export PIQRYPT_PYTHON=/path/to/venv/bin/python

# Windows
set PIQRYPT_PYTHON=C:\path\to\venv\Scripts\python.exe

サーバーが使用するPythonを確認するには:

# Linux / Mac
$PIQRYPT_PYTHON -c "import aiss; print('ok')"

# Windows
%PIQRYPT_PYTHON% -c "import aiss; print('ok')"

📖 ドキュメント


🤝 貢献

貢献を歓迎します!CONTRIBUTING.mdを参照してください。


📄 ライセンス

MCPサーバー → MITライセンス - LICENSEを参照 PiQryptコア → 無料プラン + 商用プラン


🔗 リンク


Built with ❤️ by PiQrypt Inc.

Available Tools

4 tools
piqrypt_export_auditA

Export the complete agent audit trail to a portable JSON archive. Set certified=true to request a PiQrypt CA signature for legal admissibility (eIDAS Art.26). The export is self-contained and verifiable without PiQrypt installed.

ParametersJSON Schema
NameRequiredDescriptionDefault
agent_idYesAgent ID to export
certifiedNoCreate certified export (requires Pro license)
output_formatNoOutput format (json or encrypted pqz archive)json

TDQS

A4.2/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Discloses that export is self-contained and verifiable, and mentions Pro license requirement. Does not detail side effects or reading behavior; with no annotations, this is moderate.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, each adding essential information: purpose and certification detail. No unnecessary words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Lacks output schema but describes the result as a portable JSON archive. Missing details on error conditions or what the audit trail contains, but adequate for a simple export.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so baseline is 3. Description adds value for the certified parameter (legal admissibility) and clarifies the export scope (complete trail).

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool exports a complete agent audit trail to JSON, using a specific verb and resource. It distinguishes well from sibling tools like piqrypt_search_events.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides context on when to use certified=true and notes the export is self-contained. Lacks explicit when-not-to-use or alternatives, but siblings are distinct actions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

piqrypt_search_eventsA

Search the agent's cryptographic event history by type, time range, or session. Returns signed events with chain metadata. Use to reconstruct what an agent did during a specific period.

ParametersJSON Schema
NameRequiredDescriptionDefault
event_typeNoFilter by event type (e.g., "trade_executed", "decision_made")
from_timestampNoStart timestamp (Unix UTC seconds)
to_timestampNoEnd timestamp (Unix UTC seconds)
limitNoMaximum number of results

TDQS

A3.9/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided; description states it returns signed events with chain metadata, implying read-only. However, it does not mention authentication, rate limits, pagination behavior, or what happens with empty results.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three concise sentences with no filler. The action verb is front-loaded, and every sentence adds useful context.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

No output schema; description gives a brief idea of return values (signed events with chain metadata) but omits details like event structure or metadata fields. The mention of session without a corresponding parameter reduces completeness.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the description adds minimal value beyond repeating filter options. It mentions session but the schema lacks a session parameter, creating slight ambiguity.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Clearly states verb (search), resource (cryptographic event history), and scope (by type, time range, or session). Distinguishes from siblings like piqrypt_stamp_event (create) and piqrypt_export_audit (export).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides a clear use case ('reconstruct what an agent did during a specific period'), but does not explicitly state when not to use or mention alternatives among siblings.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

piqrypt_stamp_eventA

Create a tamper-proof cryptographic record of an agent decision. Signs the event with Ed25519, links it to the previous event in a hash chain (AISS v2.0). Call this after every significant agent action. Required for GDPR Art.22, EU AI Act Art.13, HIPAA audit trail, SEC/FINRA trading compliance.

ParametersJSON Schema
NameRequiredDescriptionDefault
agent_idYesAgent identifier (e.g., "trading_bot_v1", "hr_decision_engine")
payloadYesEvent payload containing decision data (JSON object)
previous_hashNoOptional hash of previous event for chain integrity

TDQS

A4.1/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Without annotations, the description discloses key behaviors: tamper-proof record creation, Ed25519 signing, and hash chain linking. It lacks details on side effects, idempotency, or error handling, but covers essential traits.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise at two sentences, front-loading the purpose and including key details. It is efficient but could be slightly more structured by grouping regulations separately.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with 3 parameters and no output schema, the description covers purpose, usage, and behavioral details adequately. The lack of return value description is a minor shortfall, but overall it is fairly complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema already describes all three parameters with 100% coverage. The description adds no additional semantics beyond the schema, so a baseline score of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool creates a cryptographic record, specifying the signing algorithm (Ed25519) and chaining mechanism (AISS v2.0), which distinguishes it from sibling tools for export, search, and verification.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly advises 'Call this after every significant agent action' and lists regulatory requirements, providing strong contextual cues. However, it does not explicitly exclude cases where the tool should not be called.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

piqrypt_verify_chainA

Verify that an agent's decision history is intact and untampered. Detects modified events, missing events, hash chain breaks, and forks. Call before trusting any historical agent output.

ParametersJSON Schema
NameRequiredDescriptionDefault
eventsYesArray of PiQrypt events to verify

TDQS

A4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description adequately describes what the tool detects (tampering evidence). However, it lacks details on output/return behavior (e.g., error vs result) and side effects, which would improve transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, no wasted words, front-loaded with the main action and key details.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple tool with full schema coverage, the description covers purpose and usage. It lacks specification of return value (e.g., boolean, report), but overall is complete enough for an agent to invoke correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% and the description does not add additional meaning beyond the schema's 'Array of PiQrypt events to verify'. Baseline score of 3 is appropriate as the schema already carries the parameter semantics.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: verifying integrity of an agent's decision history. It lists specific detection capabilities (modified events, missing events, etc.) and distinguishes itself from siblings by its verification role.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description includes explicit usage guidance: 'Call before trusting any historical agent output.' While it doesn't explicitly exclude scenarios or name alternatives, the clear context is sufficient for an agent to decide when to invoke this tool.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 4 tool updatesv1.5.3
    • Addedpiqrypt_export_audit
    • Addedpiqrypt_search_events
    • Addedpiqrypt_stamp_event
    • Addedpiqrypt_verify_chain

TDQS

A4.3/5.0

Scored across 4 tools

Disambiguation5/5

Each tool maps to a distinct action in the audit workflow: stamping, exporting, searching, and verifying. The descriptions make the boundaries clear, and even the slight overlap between search and export is resolved by their different purposes.

Naming Consistency5/5

Every tool follows the same snake_case convention with a shared 'piqrypt_' prefix and a clear verb_object pattern, such as stamp_event and verify_chain. The small singular/plural variation is natural and does not hurt predictability.

Tool Count5/5

Four tools is well-scoped for a focused cryptographic audit-log server. Each tool covers a necessary part of the lifecycle and none feels redundant or missing.

Completeness5/5

The tool surface covers the full lifecycle of an append-only audit trail: create, query, export, and verify. Missing update/delete operations are appropriate for a tamper-proof audit system, so there are no obvious dead ends.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    B
    maintenance
    Provides cryptographic signing and verification for AI decisions to generate verifiable, Ed25519-signed receipts for compliance and auditing. It automatically maps AI actions to regulatory frameworks like HIPAA and SOX with high-performance, sub-3ms signing.
    4
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    Provides an immutable, tamper-evident audit trail for AI agents, enabling event logging with cryptographic chaining, search, verification, and statistics.
    3
    MIT