bjoernbethge/mcp-b
MCB (Master Client Bridge) - Connects everything, brings data flow together. Agent communication protocol with AMUM-QCI-ETHIC.
0 stars0 forksUpdated Jan 26, 2026
npx skills add bjoernbethge/mcp-bREADME
MCP-B - Master Client Bridge
Connects everything, brings data flow together.
A complete agent communication framework combining:
- MCP-B Protocol: 4-layer encoding for agent-to-agent messaging
- AMUM: Progressive 3→6→9 human-AI alignment workflow
- QCI: Quantum coherence state tracking
- ETHIC: AI ethics principles enforcement
Installation
# Via pip
pip install mcp-b
# Via uv
uvx mcp-b demo
# With SurrealDB support
pip install mcp-b[surrealdb]
# Full installation
pip install mcp-b[full]
CLI Usage
mcp-b demo # Run demo
mcp-b encode "Hello" -s 5510 -d 7C1 # Encode message
mcp-b decode "5510 7C1 ..." # Decode message
mcp-b ethic list # List ethical principles
mcp-b qci status # QCI network status
mcp-b version # Show version
Quick Start
MCP-B Protocol - Agent Communication
from mcp_b import MCBAgent, MCBProtocol, encode_mcb, decode_mcb
# Create agents
claude = MCBAgent(agent_id="7C1", name="Claude")
hacka = MCBAgent(agent_id="5510", name="HACKA")
# Initialize protocol
protocol = MCBProtocol(hacka)
# Send messages (INQC commands)
init_msg = protocol.init_connection(claude) # I = Init
node_msg = protocol.register_node(["chat"]) # N = Node
query_msg = protocol.query("7C1", {"status": 1}) # Q = Query
connect_msg = protocol.connect(claude) # C = Connect
# Encode/Decode
encoded = encode_mcb("5510", "7C1", 0b1011101010111111, "Q", {"ping": True})
decoded = decode_mcb("5510 7C1 1011101010111111 • {\"ping\": true} • Q")
AMUM - Progressive Alignment (3→6→9)
from mcp_b import AMUM, quick_alignment
# Quick one-liner alignment
result = quick_alignment(
intent="Create AI agent",
divergent_3=["Minimal", "Balanced", "Full"],
select_1=1,
expand_6=["Text", "Image", "Voice", "Multi", "Pro", "Suite"],
select_2=4,
converge_9=["GPT-4", "Claude", "Gemini", "Ollama", "Hybrid",
"Edge", "ElevenLabs", "OpenAI", "Local"],
select_3=6
)
print(result["final_intent"]) # "ElevenLabs"
QCI - Coherence States
from mcp_b import QCI, BreathingCycle
qci = QCI()
# Register agents with coherence
state = qci.register_agent("7C1", initial_coherence=0.95)
state.calculate_rov_q(resonance=12860.65, quality=1.0)
state.calculate_signal(base=4414.94)
# Sync breathing across agents
qci.sync_breathing(["7C1", "5510"], BreathingCycle.INHALE)
# Check network coherence
print(qci.calculate_network_coherence())
ETHIC - Principles Enforcement
from mcp_b import ETHIC, check_ethical, EthicCategory
ethic = ETHIC()
# Check if action is ethical
if check_ethical("collect_data", personal_data=True, consent=False):
print("Allowed")
else:
print("Blocked - no consent")
# Get principles by category
for p in ethic.get_by_category(EthicCategory.SAFETY):
print(f"[{p.priority}] {p.name}")
Architecture
┌─────────────────────────────────────────────────────────────────────────────┐
│ MCP-B - MASTER CLIENT BRIDGE │
│ ═══════════════════════════════════════════════════════════════════════ │
│ │
│ ┌─────────┐ ┌─────────┐ ┌─────────┐ ┌─────────┐ │
│ │ AMUM │───▶│ MCP-B │───▶│ QCI │───▶│ ETHIC │ │
│ │ 3→6→9 │ │ INQC │ │Coherence│ │Principles│ │
│ └─────────┘ └─────────┘ └─────────┘ └─────────┘ │
│ │ │ │ │ │
│ ▼ ▼ ▼ ▼ │
│ ┌─────────────────────────────────────────────────────────────────────┐ │
│ │ DUAL DATABASE LAYER │ │
│ │ ┌─────────────────────┐ ┌─────────────────────┐ │ │
│ │ │ DuckDB │ │ SurrealDB │ │ │
│ │ │ (Analytics/SQL) │ │ (Graph/Relations) │ │ │
│ │ └─────────────────────┘ └─────────────────────┘ │ │
│ └─────────────────────────────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────────────────────────────┘
MCP-B Protocol Layers
| Layer | Purpose | Example |
|---|---|---|
| Layer 1 | HEX/DECIMAL Routing | 7C1 5510 (source → dest) |
| Layer 2 | BINARY State Vectors | 1011101010111111 (16 flags) |
| Layer 3 | DOT-SEPARATED Tokens | • payload • command |
| Layer 4 | INQC Commands | I/N/Q/C |
INQC Commands
- I (INIT): Initialize connection
- N (NODE): Node registration/discovery
- Q (QUERY): Request data/state
- C (CONNECT): Establish persistent link
Binar
...