BB-MCP Architecture
Understanding how Blockchain-Backed Model Context Protocol extends MCP with cryptographic verification and immutable logging.
Protocol Overview
BB-MCP operates as a layered architecture that extends the Model Context Protocol
Agent Layer
The AI agent or tool that generates context following MCP standards
Context Packaging Layer (MCP)
Structures context into standardized MCP schema format
Signing Layer
Generates cryptographic signature using agent's private key
Blockchain Logging Layer
Records cryptographic hash on public blockchain for immutable verification
BB-MCP Context Schema
Extended MCP schema with cryptographic verification fields
{
"agent_id": "string", // Unique agent identifier
"timestamp": "ISO 8601 UTC", // Context creation time
"context_data": { // MCP-defined structured data
"task": "classify_image",
"model": "resnet50",
"confidence": 0.95
},
"metadata": { // Application-specific metadata
"dataset": "imagenet-mini",
"version": "1.0"
},
"signature": "base64-encoded", // Digital signature (BB-MCP extension)
"hash": "SHA-256 hash" // Context hash for blockchain (BB-MCP extension)
}
Field Descriptions
Cryptographic Signing Process
How BB-MCP ensures authenticity and tamper resistance
Serialize Context
Serialize MCP context object without signature
and hash
fields
Compute SHA-256 Hash
Generate SHA-256 hash of the serialized context object
Digital Signature
Sign the hash using agent's private key (ECDSA secp256k1)
Final Hash
Compute SHA-256 hash of the complete signed package for blockchain storage
Security Guarantees
- • Only the originating agent could have produced the signed context
- • Any modification after signing will result in verification failure
- • Blockchain timestamp proves context existed at specific time
Blockchain Logging Mechanism
Minimal on-chain storage for maximum cost efficiency
// Minimal Solidity contract for BB-MCP logging
contract BBMCPRegistry {
event ContextLogged(
bytes32 indexed contextHash,
string agentId,
uint256 timestamp
);
function logContextHash(
bytes32 contextHash,
string calldata agentId,
uint256 timestamp
) external {
emit ContextLogged(contextHash, agentId, timestamp);
}
}
Immutable Record
Once emitted, the log is permanently recorded in blockchain's event history
Minimal Storage
Only hash and metadata stored on-chain to minimize gas costs
Public Verification
Anyone can recompute hash and confirm presence on blockchain
Blockchain Network Support
BB-MCP supports multiple Ethereum-compatible networks
Polygon
~$0.001/tx
2s confirmation
Base
~$0.005/tx
2s confirmation
Arbitrum
~$0.01/tx
1s confirmation
Ethereum
~$2-20/tx
12s confirmation
Performance Characteristics
Measured performance from prototype implementation
Operation | Mean Latency | Gas Used | Cost (Polygon) |
---|---|---|---|
Context Signing | 1.2ms | N/A | N/A |
SHA-256 Hashing | 0.4ms | N/A | N/A |
Blockchain Logging | 4.3s | 42,000 | ~$0.001 |
Verification Query | 780ms | N/A | N/A |
Design Trade-offs
Understanding the balance between security, cost, and performance
Benefits
- Immutable verification records
- No single point of failure
- Global accessibility
- MCP compatibility preserved
Considerations
- •Blockchain confirmation latency (2-12s)
- •Transaction costs (varies by network)
- •Key management complexity
- •Off-chain storage dependency