MCP server/ai-tools

PiQrypt MCP Server

Cryptographic Audit Trail for AI Agents via Model Context Protocol

PiQrypt/piqrypt-mcp-server ↗by PiQryptupdated
Manual setup required. The maintainer's config contains paths only you know - edit the placeholders below before adding it to Claude Code.
1

Prepare the server locally

Run this once before adding it to Claude Code.

npm install @piqrypt/mcp-server
2

Register it in Claude Code

claude mcp add piqrypt -- node /path/to/piqrypt-mcp-server/dist/index.js

Replace any placeholder paths in the command with the real path on your machine.

3

Make your agent remember this setup

piqrypt's config, env vars, and the gotchas you hit — recalled in every future Claude Code, Cursor, and Codex session.

npx conare@latest

Free · one command · indexes the sessions already on disk. Set up in the browser instead →

What it does

  • Cryptographic signing of AI decisions using post-quantum algorithms
  • Secure audit trail maintenance for compliance and accountability
  • Integrity verification for event chains
  • Fast event searching via SQLite indexing
  • Process isolation ensuring private keys are never exposed to the MCP layer

Tools 4

piqrypt_stamp_eventSign an AI decision with cryptographic proof.
piqrypt_verify_chainVerify integrity of event chain.
piqrypt_export_auditExport audit trail for compliance.
piqrypt_search_eventsFast search via SQLite index.

Try it

Sign my latest trading decision with PiQrypt using agent_id 'trading_bot_v1'.
Verify the integrity of the event chain for my recent AI hiring decisions.
Export the audit trail for 'trading_bot_v1' in JSON format for compliance review.
Search for all 'trade_executed' events from the last 24 hours.
Original README from PiQrypt/piqrypt-mcp-server

PiQrypt MCP Server

Cryptographic Audit Trail for AI Agents via Model Context Protocol


🚀 What is PiQrypt MCP?

PiQrypt MCP Server provides Model Context Protocol access to PiQrypt — the post-quantum cryptographic audit trail for AI agents.

Use cases:

  • 🤖 AI Agents: Sign every decision with cryptographic proof
  • 📊 n8n Workflows: Add audit trail to automation workflows
  • 🏦 Trading Bots: SEC/FINRA compliance for automated trading
  • 👥 HR Automation: GDPR-compliant AI hiring decisions
  • 🏥 Healthcare AI: HIPAA audit trail for medical decisions

📦 Installation

Prerequisites

  • Node.js 18+
  • Python 3.8+
  • PiQrypt Core (pip install piqrypt)

Install MCP Server

npm install @piqrypt/mcp-server

Or build from source:

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

⚙️ Configuration

Claude Desktop

Add to ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "piqrypt": {
      "command": "node",
      "args": ["/path/to/piqrypt-mcp-server/dist/index.js"]
    }
  }
}

n8n (v1.88+)

  1. Install n8n MCP integration
  2. Add PiQrypt MCP server to configuration
  3. Use in workflows via MCP node

🛠️ Available Tools

1. `piqrypt_stamp_event`

Sign an AI decision with cryptographic proof.

Parameters:

  • agent_id (string, required): Agent identifier
  • payload (object, required): Decision data
  • previous_hash (string, optional): Previous event hash for chaining

Example:

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

Returns:

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

2. `piqrypt_verify_chain`

Verify integrity of event chain.

Parameters:

  • events (array, required): Events to verify

Example:

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

Returns:

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

3. `piqrypt_export_audit`

Export audit trail for compliance.

Parameters:

  • agent_id (string, required): Agent to export
  • certified (boolean): Request PiQrypt certification
  • output_format (string): json or pqz

Example:

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

4. `piqrypt_search_events`

Fast search via SQLite index.

Parameters:

  • event_type (string, optional): Filter by type
  • from_timestamp (number, optional): Start time
  • to_timestamp (number, optional): End time
  • limit (number): Max results (default: 100)

Example:

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

🔒 Security Model

Process Isolation

┌─────────────────────────────────────┐
│  MCP Client (Claude, n8n, etc.)     │
│  ↓ 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                      │
└─────────────────────────────────────┘

Guarantees

Private keys never exposed to MCP layer
All crypto in Python (Ed25519, Dilithium3)
Same security as CLI (process isolation)
RFC AISS-1.1 compliant (identical output)
Input validation before subprocess call


📚 Examples

Trading Bot (n8n)

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

HR Automation

[Upload CV]
    ↓
[Claude AI: evaluate candidate]
    ↓
[PiQrypt MCP: stamp e

Frequently Asked Questions

What are the key features of PiQrypt?

Cryptographic signing of AI decisions using post-quantum algorithms. Secure audit trail maintenance for compliance and accountability. Integrity verification for event chains. Fast event searching via SQLite indexing. Process isolation ensuring private keys are never exposed to the MCP layer.

What can I use PiQrypt for?

Ensuring SEC/FINRA compliance for automated trading bots. Maintaining GDPR-compliant audit trails for AI-driven HR hiring decisions. Providing HIPAA-compliant audit trails for AI-assisted medical decisions. Adding verifiable audit logs to n8n automation workflows.

How do I install PiQrypt?

Install PiQrypt by running: npm install @piqrypt/mcp-server

What MCP clients work with PiQrypt?

PiQrypt works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Conare · memory for coding agents

Turn this server into reusable context

Keep PiQrypt docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Set up free$npx conare@latest