Heterogeneous validation protocol for MCP — structured reasoning (T1) + cross-model confidence evaluation (T2) + deterministic checksum
Project description
T1/T2 Protocol — Heterogeneous Validation for MCP
T1/T2 is an MCP server that makes AI reasoning verifiable, auditable, and trustworthy — by decomposing ambiguous questions into structured tiers (T1), then validating answers through cross-model evaluation (T2), with a deterministic checksum layer that doesn't depend on any LLM.
Why?
When an LLM checks its own answer, it uses the same training data, the same reasoning preferences, and the same systematic biases. Self-reflection cannot catch its own blind spots.
T1/T2 introduces heterogeneous validation: the model that produces the answer and the model that evaluates it should be different. Their different training distributions cover each other's blind spots.
Tools
| Tool | Function | Why it matters |
|---|---|---|
| t1_protocol | Decomposes ambiguous questions into L1 (facts) / L2 (assumptions) / L3 (hypotheses) / L4 (unknowns) | Forces structured reasoning before answering |
| t2_protocol | Evaluates answer quality from another model's perspective | Catches blind spots self-reflection misses |
| checksum | Deterministic structural validation — pure regex, zero LLM dependency | Safety that doesn't scale with intelligence |
Quick Start
Requirements
- Python 3.10+
- An MCP client: Cursor, Claude Desktop, Windsurf, or any MCP-compatible host
Install
From PyPI (recommended):
pip install t1-t2-protocol
From source (development):
git clone https://github.com/Fauxetine/t1-t2-protocol.git
cd t1-t2-protocol
pip install -e ".[dev]"
python -m pytest tests/ -v
Or run directly without installing:
python3 src/t1_t2_mcp_server.py
After pip install, register the console script in MCP config:
{
"mcpServers": {
"t1-t2-protocol": {
"type": "stdio",
"command": "t1-t2-protocol"
}
}
}
Configure
Cursor — add to .cursor/mcp.json:
{
"mcpServers": {
"t1-t2-protocol": {
"type": "stdio",
"command": "python3",
"args": ["/path/to/src/t1_t2_mcp_server.py"]
}
}
}
Claude Desktop — add to claude_desktop_config.json:
{
"mcpServers": {
"t1-t2-protocol": {
"command": "python3",
"args": ["/path/to/src/t1_t2_mcp_server.py"]
}
}
}
Usage
T1: Structure a vague question
Call t1_protocol with your question. It returns a structured prompt with four tiers:
Input: "Should we migrate our monolith to microservices?"
Output: Structured prompt with:
[L1 Facts] Team size, codebase size, current stack
[L2 Assumptions] Expected benefits that need verification
[L3 Hypotheses] Testable claims about migration risk
[L4 Unknown] Future growth trajectory
[Core Question] The precise feasibility question
T2: Cross-validate a decision
Call t2_protocol with a decision or answer text. It returns confidence assessment + adoption recommendations:
Input: "Decision text for approach A..."
Output:
Confidence: Medium-High
Adoption table with:
✅ Adopt — verified conclusions (L1)
⚠️ Reserved — needs more evidence (L2)
❌ N/A — blind spots to address
checksum: Validate output structure
Call checksum with structured text. It returns pass/fail based on deterministic rules:
Input: "[L1 Facts]\n1. ...\n[L2 Assumptions]\n1. ...\n---"
Output: {"checksum_passed": true, "errors": []}
Full pipeline
Vague question → T1 structured decomposition → Decision based on structure → checksum (optional) → T2 validation → Refined decision
For time-sensitive factual claims, search on the caller side before T2 — see Caller-side web verification (v2.6).
Configuration
Locale
Both t1_protocol and t2_protocol accept an optional locale parameter:
| Value | Output |
|---|---|
en (default) |
English templates |
zh |
Chinese templates |
Example: {"question": "...", "locale": "zh"}
Weight hints
Both t1_protocol and t2_protocol accept an optional weight_hint parameter to bias evaluation criteria:
| Weight | Effect |
|---|---|
事实优先 / fact-first |
Prioritizes factual accuracy |
效率优先 / efficiency-first |
Prioritizes efficiency |
成本优先 / cost-first |
Prioritizes cost |
鲁棒性优先 / robustness-first |
Prioritizes robustness |
通用优先 / general-first |
No specific bias |
Recursion protection
T2 automatically detects recursion depth and terminates at depth >= 3, where marginal information gain drops below 5%.
Design Philosophy
See docs/philosophy.md for the full design rationale.
Core tenets:
- Separate intelligence from trust — AI capability and AI safety should be guaranteed by different systems
- Heterogeneous over self-referential — Cross-model validation is more reliable than self-reflection
- Deterministic over probabilistic — What can be checked by code should not be left to model judgment
Examples
See examples/ for step-by-step walkthroughs:
Positioning
| Project | Layer | What it does | T1/T2 relationship |
|---|---|---|---|
| Sequential Thinking (official MCP) | Caller-side chain-of-thought | One model logs iterative steps | Complementary — T1 adds L1–L4 tiers + T2 cross-model review |
| ThoughtProof / verdict APIs | Server-side verification | APPROVE/DENY/UNCERTAIN with confidence |
Complementary — T1/T2 structures reasoning before verdict APIs act |
| Self-reflection / prompt chains | Same model | Re-reads or re-prompts its own output | Replaced — heterogeneous validation catches shared blind spots |
| Tool integrity (e.g. Phionyx) | Transport / tool schema | Detects tool poisoning, schema drift | Orthogonal — T1/T2 does not secure tool definitions |
T1/T2 is a stdlib reference implementation for MCP Discussion #2574-style reasoning discipline: structure first (T1), cross-validate second (T2), checksum what code can verify. It is not a signed verdict API and not a security scanner.
License
MIT — see LICENSE.
Built for the MCP ecosystem. Part of a broader exploration into AI safety through deterministic architecture.
Links
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 t1_t2_protocol-2.5.3.tar.gz.
File metadata
- Download URL: t1_t2_protocol-2.5.3.tar.gz
- Upload date:
- Size: 20.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d5117bc424e9c33c675c1f417e9e59cacebf42a2f040bcba344dc9a0a0b10eaf
|
|
| MD5 |
c6600f8b4b7d027880639d8f391ece10
|
|
| BLAKE2b-256 |
a056868c427859a96eb553821c23d2a470dbab500b3598460798c6d0f0528b31
|
Provenance
The following attestation bundles were made for t1_t2_protocol-2.5.3.tar.gz:
Publisher:
publish.yml on Fauxetine/t1-t2-protocol
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
t1_t2_protocol-2.5.3.tar.gz -
Subject digest:
d5117bc424e9c33c675c1f417e9e59cacebf42a2f040bcba344dc9a0a0b10eaf - Sigstore transparency entry: 1825889532
- Sigstore integration time:
-
Permalink:
Fauxetine/t1-t2-protocol@6cc4b72b813ad376d63d1c40454d71a6ff77ab19 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/Fauxetine
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@6cc4b72b813ad376d63d1c40454d71a6ff77ab19 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file t1_t2_protocol-2.5.3-py3-none-any.whl.
File metadata
- Download URL: t1_t2_protocol-2.5.3-py3-none-any.whl
- Upload date:
- Size: 16.1 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 |
08fee8e257b882c94e17f83605d0be063287b14390bf8a00e90e3bc7074f85ce
|
|
| MD5 |
db756fa5c4e296f447934e503cc302d7
|
|
| BLAKE2b-256 |
327c69796b3d4c5e84dba46fc172e58e13a94a33df1734926e2ccfd011ee7305
|
Provenance
The following attestation bundles were made for t1_t2_protocol-2.5.3-py3-none-any.whl:
Publisher:
publish.yml on Fauxetine/t1-t2-protocol
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
t1_t2_protocol-2.5.3-py3-none-any.whl -
Subject digest:
08fee8e257b882c94e17f83605d0be063287b14390bf8a00e90e3bc7074f85ce - Sigstore transparency entry: 1825889571
- Sigstore integration time:
-
Permalink:
Fauxetine/t1-t2-protocol@6cc4b72b813ad376d63d1c40454d71a6ff77ab19 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/Fauxetine
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@6cc4b72b813ad376d63d1c40454d71a6ff77ab19 -
Trigger Event:
workflow_dispatch
-
Statement type: