qoreguard-mcp
This MCP server provides post-quantum policy enforcement, transaction verification, audit, simulation, and QoreX network-probing tools for AI agents on QoreChain/QoreX.
Verify hybrid classical + ML-DSA-87/SLH-DSA transaction envelopes against active QoreGuard policy, including spending caps, velocity windows, allowlists, nonce checks, and anti-downgrade rules; optionally commit state and audit records.
Quote policy decisions without side effects, returning ALLOW/DENY, remaining caps, velocity snapshots, and rejection codes.
Simulate six deterministic quantum-downgrade and tamper attack vectors against an isolated shadow engine.
Export the SHAKE-256 hash-chained audit bundle with optional ML-DSA-87 attestation and independent integrity verification.
Probe QoreX/QoreChain testnet, mainnet, or localnet for RPC/consensus status and PQC/AI precompiles, with offline fallback.
Register or replace a scoped post-quantum agent policy and return its deterministic SHAKE-256 policy hash and demo identity metadata.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@qoreguard-mcp verify this hybrid PQ envelope against the agent's spending policy"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
AegisQore — Post-Quantum AI Agent Firewall, Scoped EVM Policy Registry & MCP Server for QoreChain / QoreX

AegisQore is a unified, Apache-2.0 post-quantum security stack for autonomous AI agents operating on QoreChain / QoreX (qorechain-diana, EVM Chain ID 9800). It pairs real NIST post-quantum cryptography (@qorechain/pqc FIPS-204 ML-DSA-87 / ML-DSA-65, FIPS-205 SLH-DSA, FIPS-202 SHAKE-256), on-chain Scoped EVM Windows & 30-day owner-to-agent link leases, official qorechain-msg-v1|<chainId>|<data> hybrid secp256k1 + ML-DSA-87 authenticated messaging, a 6-tool Model Context Protocol server (qoreguard-mcp), live QoreX Testnet precompile verification, and an interactive web console (web/).
Live GitHub Pages Demo: https://alphonshhhomenicmtu.github.io/aegisqore-qorechain/
8-Slide Judge Pitch Deck (PDF): https://alphonshhhomenicmtu.github.io/aegisqore-qorechain/aegisqore-deck.pdf (docs/aegisqore-deck.pdf)
1080p Demo Video (YouTube, 108s): https://www.youtube.com/watch?v=La_8Dh7TA04
1080p Demo Video Mirror (Google Drive): https://drive.google.com/file/d/1luPFpSazP9o20nE1wC738ppocV_4eZUo/view?usp=sharing
Public Repository: https://github.com/alphonshhhomenicmtu/aegisqore-qorechain
AI Transparency: See AI_USAGE.md (Best AI-Native Build submission) and SUBMISSION_READY.md.
Live QoreX Testnet Verification Proof
Running npm run probe:testnet executes a real read-only probe against QoreChain Testnet (qorechain-diana, EVM Chain ID 9800), generating a fresh FIPS-204 ML-DSA-87 keypair (2,592-byte public key, 4,627-byte signature) via @qorechain/pqc and verifying it both locally and on-chain via QoreChain's live EVM precompile IQorePQC.pqcVerify (0x0000000000000000000000000000000000000A01):
Network:
qorechain-diana(EVM Chain ID: 9800, live verified block10,801,339, consensus height10,801,340)IQorePQC.pqcVerify(0x...0A01):available: true,verified: true(on-chain ML-DSA-87 verify=true)IQorePQC.pqcKeyStatus(0x...0A02):available: trueIQoreConsensus.rlConsensusParams(0x...0C01):available: true(blockTime=5000, baseGasPrice=100, validators=4, epoch=1)On-Chain Smart Contract (
contracts/QoreGuardPolicyRegistry.sol):Integrates directly with QoreChain native precompiles
0x...0A01(pqcVerify),0x...0A02(pqcKeyStatus),0x...0B01(aiRiskScore), and0x...0B02(aiAnomalyCheck).Enforces 30-day maximum owner-to-agent link TTL (
MAX_LINK_TTL = 30 days,renewAgentLink(),relinkAgentKey()), Scoped EVM Windows (openScopedEvmWindow(agent, startBlock, endBlock, maxTxCount, maxTotalValue, windowTargets)), officialqorechain-msg-v1|<chainId>|<data>hybridsecp256k1 + ML-DSA-87message verification (verifyAuthenticatedMessage&verifyAgentAuthenticatedMessage), per-tx & O(1) two-epoch sliding-window daily caps, target/selector allowlists (default-blockingapproveandsetApprovalForAll), strict monotonic nonces, emergency owner revocation, and tamper-evidentPolicyApproved/PolicyRejected/AgentRevokedevents.Live QoreX EVM 9800 Dry-Run Gas Estimate (
npm run deploy:registry -- --dry-run):3,480,337gas (0.3915379125 QOR@112.5 gwei, block10,802,524,15,896-byte Solc0.8.28pariscreation bytecode, SHA-2567c304cb1...87c2cdce).Static Security Audit (
Slither 0.11.6, 102 detectors):0 High / 0 Medium / 0 Optimizationfindings.
Automated Test Suites: 62 / 62 PASS (
18/18Foundry incl. 256-run fuzz +36/36core Vitest incl. InMemory MCP round-trip +8/8web Vitest)
Related MCP server: Trust Gate MCP
Visual Walkthrough
Live Telemetry & Hybrid PQC Overview | Post-Quantum Policy Console & Adversarial Breaker Lab |
|
|
|
|
Monorepo Architecture
aegisqore-qorechain/
├── contracts/
│ ├── QoreGuardPolicyRegistry.sol # On-chain QoreX EVM 9800 PQ Agent Policy Registry (0x...0A01/0A02/0B01/0B02)
│ └── test/QoreGuardPolicyRegistry.t.sol # 18 Foundry tests (vm.etch precompiles, 30d TTL, Scoped EVM Window, qorechain-msg-v1, fuzz)
├── foundry.toml # Solc 0.8.28 (paris, optimizer=200) + QoreChain RPC endpoints
├── src/
│ ├── contracts/registry-artifact.ts # Compiled QoreGuardPolicyRegistry ABI + verified creation bytecode
│ ├── networks.ts # Verified QoreChain testnet/mainnet/localnet presets, precompile ABIs (0x...0901-0C01), 30d MAX_AGENT_LINK_TTL_SEC
│ ├── types.ts # Strict TypeScript contracts for policies, Scoped EVM Windows, 30d link leases, qorechain-msg-v1, and audit bundles
│ ├── crypto.ts # FIPS-204 ML-DSA-87/65/44 (@qorechain/pqc) + FIPS-205 SLH-DSA + secp256k1/ed25519 + hybridSignBytes('v2') + qorechain-msg-v1
│ ├── policy-engine.ts # Stateful spending caps, Scoped EVM Windows, 30d link renewal, selector firewall, 6-vector breaker, SHAKE-256 + ML-DSA-87 ledger
│ ├── guard.ts # Secret-input refusal guard (blocks private keys / BIP-39 mnemonics in MCP tool calls)
│ ├── testnet-client.ts # Live QoreX read-only RPC/precompile probe + env-var-driven turnkey guarded tx runner (honest simulation fallback)
│ ├── registry-deployer.ts # Turnkey QoreGuardPolicyRegistry gas estimator & EVM deployer
│ ├── mcp/
│ │ ├── server.ts # 6-tool AegisQore MCP server (`qoreguard-mcp`) aligned with @qorechain/mcp conventions
│ │ └── bin.ts # Stdio CLI entry point for MCP clients
│ └── scripts/
│ ├── deploy-registry.ts # `npm run deploy:registry -- --dry-run` live EVM 9800 gas estimator & turnkey deployer
│ ├── testnet-probe.ts # `npm run probe:testnet` live QoreX read-only probe
│ └── turnkey-tx.ts # `npm run tx:turnkey` env-var-driven guarded tx / dry-run demo
├── test/ # 36 Vitest tests (crypto + qorechain-msg-v1, policy-engine + 30d TTL + Scoped Window, MCP, testnet, deployer)
├── web/ # Interactive React 19 + Vite 6 + TypeScript console deployed to GitHub Pages (8 Vitest tests)
├── docs/
│ ├── cover-image.png # 1200x630 Featured Cover Image for AegisQore QoreChain submission
│ ├── aegisqore-deck.pdf # 8-slide 16:9 Judge Pitch Deck PDF
│ └── screenshots/ # Captured high-resolution UI screenshots
├── AI_USAGE.md # AI-assisted engineering disclosure (Best AI-Native Build)
└── SUBMISSION_READY.md # Complete QoreChain Developer Fest submission checklist & evidenceMCP Tools (qoreguard-mcp)
Aligned with @qorechain/mcp (structuredContent + JSON content + secret-input refusal):
Tool | Purpose |
| Verifies hybrid classical + ML-DSA-87/SLH-DSA envelopes against active policy and commits nonce/spend/audit state on |
| Side-effect-free pre-flight quote returning |
| Runs 6 deterministic adversarial vectors in an isolated shadow engine (strip PQC, v2→v1 sign-bytes downgrade, ML-DSA-87→44 downgrade, commitment amount tamper, signature bit-flip, nonce replay). |
| Exports the SHAKE-256 hash-chained & ML-DSA-87 attested audit bundle with independent |
| Live read-only probe of QoreChain Testnet/Mainnet RPC, consensus status, and PQC/AI/Consensus EVM precompiles. |
| Registers a scoped PQ agent policy and returns its deterministic SHAKE-256 |
Quickstart & Reproducibility
Core SDK, Policy Engine & MCP Server (36 / 36 Vitest PASS)
npm install
npm run typecheck
npm run build
npm testOn-Chain Smart Contract (18 / 18 Foundry PASS, Slither 0 High / 0 Medium)
forge build
forge test -vv
# Live QoreX EVM 9800 deployment gas estimation (no private key required):
npm run deploy:registry -- --dry-run
# Turnkey live broadcast (env var QOREX_PRIVATE_KEY only; never commit keys):
# QOREX_PRIVATE_KEY=0x... npm run deploy:registry -- --broadcastLive QoreX Testnet Probe & Turnkey Guarded Tx Runner
# Live read-only probe against qorechain-diana (EVM 9800) + on-chain IQorePQC.pqcVerify (0x...0A01)
npm run probe:testnet
# Offline deterministic simulation fallback
QOREGUARD_OFFLINE=true npm run probe:testnet
# Turnkey guarded tx dry-run (zero hardcoded keys; set QOREGUARD_PRIVATE_KEY + QOREGUARD_DRY_RUN=false for live broadcast)
npm run tx:turnkey
# Start MCP stdio server
node dist/mcp/bin.js --network testnetInteractive Web Console (8 / 8 Vitest PASS)
cd web
npm install
npm run typecheck
npm test
npm run buildCredits & Open-Source Libraries
AegisQore builds directly on the official QoreChain developer ecosystem and audited open-source cryptography libraries:
@qorechain/pqc,qorechain-sdk, andqorechain-mcp(QoreChain Association)@noble/post-quantum,@noble/curves,@noble/hashes(Paul Miller)@modelcontextprotocol/sdk,viem,zod,React,Vite,Vitest,tsup
License
Apache-2.0 (see LICENSE).
Available Tools
6 toolsexport_audit_bundleExport Tamper-Evident PQ Audit BundleARead-onlyIdempotent
Exports the SHAKE-256 hash-chained audit ledger of all evaluated and blocked agent transactions, optionally attested with an ML-DSA-87 post-quantum signature, and includes an independent integrity verification check.
Inputs: attest.
probe_qorex_networkProbe QoreX / QoreChain Network & PQC PrecompilesBRead-onlyIdempotent
Read-only probe of QoreChain testnet (qorechain-diana, EVM 9800) or mainnet (qorechain-vladi, EVM 9801), checking EVM RPC, consensus status, and live PQC/AI precompiles (0x...0A01, 0x...0A02, 0x...0B01, 0x...0C01) with honest offline fallback.
Inputs: network, offline.
quote_policy_decisionQuote Policy Decision (Dry-Run)ARead-onlyIdempotent
Side-effect-free pre-flight evaluation of a hybrid post-quantum transaction envelope against active QoreGuard spending caps, rolling velocity windows, allowlist/selector firewall, and anti-downgrade rules.
Inputs: envelope (required), nowUnix, aiSignal.
register_agent_policyRegister Scoped Post-Quantum Agent PolicyC
Replaces the active QoreGuard policy with a new scoped post-quantum policy (spending caps, velocity windows, allowlisted targets, minimum PQ algorithm) and returns its deterministic SHAKE-256 policyHashHex and public demo identity metadata.
Inputs: agentId (required), policyId (required), maxSingleTxUqor (required), network, +5 more.
simulate_quantum_downgrade_attackSimulate Quantum Downgrade & Tamper AttacksARead-onlyIdempotent
Runs deterministic adversarial simulations (strip PQC to classical-only, downgrade v2->v1 sign bytes, downgrade ML-DSA-87->ML-DSA-44, tamper commitment amount, flip signature bit, replay consumed nonce) in an isolated shadow engine to verify QoreGuard blocks every vector.
Inputs: vectors, envelope.
verify_pq_txVerify Post-Quantum Agent TransactionB
Verifies a hybrid classical + ML-DSA-87/SLH-DSA signed transaction envelope against the active QoreGuard policy (anti-quantum-downgrade, spending caps, velocity windows, allowlist, monotonic nonce) and optionally commits the authorized state to the tamper-evident audit ledger.
Inputs: envelope (required), commit, nowUnix, aiSignal.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 6 tools
The closest overlap is between quote_policy_decision and verify_pq_tx, but the descriptions sharply distinguish them as side-effect-free pre-flight vs. authoritative verification with optional ledger commit. The remaining four tools (simulate attack, network probe, policy registration, audit export) target clearly separate concerns, so misselection risk is low but the quote/verify pair still invites care.
All six tools follow a verb_noun pattern (export_audit_bundle, verify_pq_tx, quote_policy_decision, simulate_quantum_downgrade_attack, probe_qorex_network, register_agent_policy). Minor deviations are stylistic only—abbreviations like 'pq' and mixed specificity ('qorex' vs 'qoreguard')—so the set remains predictable.
Six tools is well-scoped for a policy/transaction guard: policy write, pre-flight quote, verification, adversarial simulation, network health probe, and audit export each map to a distinct need. No tool looks like filler or a duplicate of another.
The core lifecycle (register policy, quote, verify, simulate, export audit) is covered, but there is no read-only way to fetch the current active policy or inspect individual ledger entries—only wholesale export. Policy replacement is also the sole write path with no update/patch or revoke semantics, leaving gaps an agent may hit when auditing or troubleshooting.
Maintenance
Related MCP Connectors
Preflight, approve, and prove consequential agent actions with signed evidence and x402 tools.
Pre-execution governance for AI agents. Deterministic PASS/FAIL/REVIEW verdicts, replayable proof.
Agent-native security, trust, reliability, data and procurement tools for AI workflows.
Audit AI agents' tool calls, planning and memory; Base on-chain data; pay per call via x402.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceProvides tools to sign and verify post-quantum attestations of AI agent actions (mint, trajectory, coherence) using ML-DSA-65 signatures, with offline verification always free.MIT
- AlicenseBqualityBmaintenanceSigned receipts for agent actions and a read-only-allowlist decision gate, as an MCP server. Ed25519, plus ML-DSA-65 when the post-quantum backend is available. gate_decision returns ALLOW, DENY or ESCALATE from action names and does not observe or block anything. verify_receipt takes expected_kid to pin which key signed. Seven tools.161Apache 2.0
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to operate through a local, signed boundary that blocks prompt injection and secret leakage, verifies outputs, preserves cross-session memory, and provides offline-verifiable receipts. It also exposes 900+ MCP tools for discoverable agent actions.7MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to construct SHA-256 Merkle trees and generate/verify inclusion proofs, validate JWT HMAC-SHA256 claims, run Schnorr zero-knowledge identification, and enforce constant-time secret comparison with nonce replay protection for tamper-evident state attestation. It runs as a zero-dependency, stdlib-only MCP stdio server for clients such as Claude Desktop, Cursor, and Windsurf.7MIT



