Phionyx MCP trust boundary governance layer — descriptor signing, runtime guardrail, tamper-evident audit chain for MCP-capable hosts.
Project description
phionyx-mcp-server
The MCP trust boundary in the Phionyx runtime — descriptor signing, signed evidence envelopes, and a tamper-evident audit chain over third-party MCP tool calls.
phionyx-mcp-server sits between an MCP-capable host (Claude Desktop, Cursor, Zed,
VS Code, JetBrains) and any third-party MCP server it talks to, producing
tamper-evident evidence at every trust-boundary crossing. It closes a security gap
the MCP specification
(2025-11-25) explicitly
defers to implementors:
"MCP itself cannot enforce these security principles at the protocol level; implementors SHOULD..."
The threat surface is aligned with arXiv:2512.06556 (Jamshidi et al., Securing the Model Context Protocol) — tool poisoning, shadowing, rug pulls.
Where it fits
Phionyx ships three distinct things, each on its own version line — don't cross-attribute them:
- Engine —
phionyx-core: the deterministic-cognition runtime (46-block canonical pipeline, kill switch, HITL queue, ethics/safety gates, signed audit chain).pip install phionyx-core. - Gate —
phionyx-pipeline-mcp: an agent self-claim gate that verifies "I fixed / I tested / this changed" against the repository's actual diff. - Standard —
phionyx-evaluation-standard: a vendor-neutral spec defining L0-L3 (evaluation maturity), D0-D3 (determinism), and CG-L0…CG-L5 (claim-governance).
This package is the outward MCP trust boundary — it produces signed, hash-chained evidence over third-party MCP tool calls. It interoperates with the gate through a shared session trace, so both governance surfaces share one view.
Status
v0.2.0. Five of eight capabilities are fully implemented; three are explicit
stubs that return structured not_implemented markers (callers can detect server
maturity). The two load-bearing capabilities — descriptor verification and
tool-call audit — are live. Envelopes follow RGE v0.2 (Runtime Governance
Envelope).
| # | Capability | Status |
|---|---|---|
| 1 | Tool descriptor hash | ✅ implemented |
| 2 | Descriptor change detection | ✅ implemented |
| 3 | Tool permission scope | 🟡 envelope field populated; policy logic stub |
| 4 | Tool call I/O hash | ✅ implemented |
| 5 | User approval state | 🟡 envelope field populated; UX surface stub |
| 6 | Runtime anomaly record | 🟡 records to the audit side-log; drift scoring stub |
| 7 | Signed evidence envelope | ✅ implemented (RGE v0.2) |
| 8 | Chain verification command | ✅ implemented (phionyx-mcp verify-chain) |
Install
pip install phionyx-mcp-server
phionyx-mcp --help
Use — as an MCP server
Add to your MCP-capable host (Claude Desktop example):
{
"mcpServers": {
"phionyx-governance": { "command": "phionyx-mcp-server" }
}
}
The host then sees four production MCP tools:
verify_tool_descriptor(descriptor, baseline_hash)— hash and compare against an approved baseline (full descriptor, includingprotocolVersion).record_tool_call(turn_index, user_text, producer, …, trace_id=None)— emit a signed RGE v0.2 envelope.trace_idis optional; resolved fromPHIONYX_TRACE_IDor~/.phionyx/active_trace.verify_chain_integrity(trace_id=None)— walk the chain, refuse mixed schemas.query_audit_history(trace_id=None, limit=50)— replay envelopes for review.
Plus three stub tools returning structured not_implemented markers.
Shared trace with the gate
When installed alongside phionyx-pipeline-mcp, the two servers share a single
trace_id per session, so one session's evidence spans both governance surfaces:
PHIONYX_TRACE_IDenv var → highest precedence.PHIONYX_ACTIVE_TRACE_FILE(default~/.phionyx/active_trace) → file fallback.- The first caller generates a UUID-derived trace and persists it.
Use — as a CLI
phionyx-mcp head --trace trace-abc123 # current chain head
phionyx-mcp verify-chain --trace trace-abc123 # walk + verify the chain
phionyx-mcp show --trace trace-abc123 --turn 7 # show one envelope
The CLI exits 0 on a valid chain, 1 on tamper/break, 2 on invocation error.
Persistence
Envelopes are written under $PHIONYX_MCP_AUDIT_ROOT (default ~/.phionyx/mcp_audit/):
<root>/<trace_id>/chain.jsonl (append-only index)
<root>/<trace_id>/<turn:06d>.json (full canonical-JSON envelope)
Swap the persistence layer by passing an alternative EnvelopeStore-protocol
implementation (S3, DynamoDB, …).
Schema — RGE v0.2
Envelopes conform to RGE v0.2 (Runtime Governance Envelope). The signature
covers all envelope content except the self-referential
mcp_tool_audit.signed_envelope_ref. The schema, RFC, and worked examples ship in
this repository.
Tests
pip install -e .
pytest -q
The suite pins descriptor-hash semantics (full descriptor including
protocolVersion), RGE v0.2 schema conformance (jsonschema Draft 2020-12), and
hash-chain integrity (tamper, reorder, and mixed-schema detection).
See also
- Engine — phionyx-core on PyPI
- Gate — phionyx-pipeline-mcp
- Standard — phionyx-evaluation-standard
- Runtime narrative — phionyx.ai
License
AGPL-3.0-or-later.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file phionyx_mcp_server-0.2.0.tar.gz.
File metadata
- Download URL: phionyx_mcp_server-0.2.0.tar.gz
- Upload date:
- Size: 34.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5f457e3b71c9e9190a94b921b2a5447200eb1066814887bad3b4d33a38d8334d
|
|
| MD5 |
8745176a9d7702c4729a1cecb60ee96d
|
|
| BLAKE2b-256 |
a9d0a47d0155cb3f8d0acd3f30fddb8c77d33a87161d33843be4505ebb522230
|
Provenance
The following attestation bundles were made for phionyx_mcp_server-0.2.0.tar.gz:
Publisher:
release.yml on halvrenofviryel/phionyx-mcp-server
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
phionyx_mcp_server-0.2.0.tar.gz -
Subject digest:
5f457e3b71c9e9190a94b921b2a5447200eb1066814887bad3b4d33a38d8334d - Sigstore transparency entry: 1674103515
- Sigstore integration time:
-
Permalink:
halvrenofviryel/phionyx-mcp-server@d3ae678ef129fba04c250640e42f38eec5a65397 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/halvrenofviryel
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@d3ae678ef129fba04c250640e42f38eec5a65397 -
Trigger Event:
push
-
Statement type:
File details
Details for the file phionyx_mcp_server-0.2.0-py3-none-any.whl.
File metadata
- Download URL: phionyx_mcp_server-0.2.0-py3-none-any.whl
- Upload date:
- Size: 32.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
060e2008429fb8ff84e87f4ee24fb9a12d1e1ddbfa27e31b2b0b38dd6e395608
|
|
| MD5 |
631345013f9be74988ce116dae102784
|
|
| BLAKE2b-256 |
2d499ae6da669417e719a1b7adf61dde62423dcbc92eeb6d66a13407c49c0e73
|
Provenance
The following attestation bundles were made for phionyx_mcp_server-0.2.0-py3-none-any.whl:
Publisher:
release.yml on halvrenofviryel/phionyx-mcp-server
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
phionyx_mcp_server-0.2.0-py3-none-any.whl -
Subject digest:
060e2008429fb8ff84e87f4ee24fb9a12d1e1ddbfa27e31b2b0b38dd6e395608 - Sigstore transparency entry: 1674103519
- Sigstore integration time:
-
Permalink:
halvrenofviryel/phionyx-mcp-server@d3ae678ef129fba04c250640e42f38eec5a65397 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/halvrenofviryel
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@d3ae678ef129fba04c250640e42f38eec5a65397 -
Trigger Event:
push
-
Statement type: