Protocol Comparison Guide
Overviewโ
BMCPS v3.0 is protocol-agnostic โ it can generate blockchain AI integrations in multiple formats. This guide helps you choose the right protocol for your use case.
The Context Rot Problemโ
At the AI Engineer Summit 2025, a critical limitation of MCP was identified: context rot. MCP loads all tool definitions (~5k tokens) into the AI's context window upfront, which:
- Wastes valuable context space in long conversations
- Reduces the room for actual conversation content
- Becomes problematic for extended agent sessions
BMCPS v3.0 solves this by offering protocol flexibility โ choose the format that best matches your context requirements.
Quick Comparisonโ
| Protocol | Context Overhead | Best For | Setup Complexity |
|---|---|---|---|
| REST API | 0 tokens | Production apps, high-scale systems, microservices | Medium |
| OpenAI Functions | ~500 tokens | Long conversations, extended agent sessions | Low |
| MCP | ~5k tokens | Feature-rich integrations, short interactions | Low |
| JSON Schema | N/A | Custom protocols, base schemas | N/A |
Detailed Breakdownโ
1. REST API (Zero Context Overhead)โ
Context Cost: 0 tokens
node bmcps-generator.js --blockchain eth --format rest-api
โ Best For:โ
- Production applications with high-scale requirements
- Microservices architectures
- Multiple AI agents accessing the same blockchain data
- Web applications with frontend+backend separation
- Public APIs for developer ecosystems
How It Works:โ
- Generates Express.js server with 25 REST endpoints
- OpenAPI 3.0 specification for documentation
- AI discovers endpoints via spec, makes HTTP requests
- No tool schemas loaded into context
Example Generated Files:โ
eth-mainnet-rest-api/
โโโ openapi.json # OpenAPI 3.0 spec
โโโ server.js # Express server (25 endpoints)
โโโ package.json # Dependencies
โโโ .env.example # Configuration
โโโ README.md # Documentation
Pros:โ
- โ Zero context overhead - AI just needs endpoint URLs
- โ Scales infinitely - standard HTTP infrastructure
- โ Language agnostic - any HTTP client works
- โ Caching friendly - use CDNs, load balancers
- โ Observable - standard monitoring tools
Cons:โ
- โ Requires HTTP server deployment
- โ Network latency for each call
- โ Need authentication/rate limiting setup
When to Choose:โ
"I'm building a production app that needs to scale to thousands of concurrent users"
2. OpenAI Functions (~500 Token Context)โ
Context Cost: ~500 tokens
node bmcps-generator.js --blockchain btc --format openai
โ Best For:โ
- Long conversations with many back-and-forth exchanges
- Extended agent sessions (customer support, research)
- GPT-4/GPT-4-turbo applications
- Context-sensitive applications where every token counts
How It Works:โ
- Generates JSON function definitions for OpenAI's function calling API
- AI receives compact function schemas
- Only function calls appear in context, not full tool descriptions
Example Generated Files:โ
btc-mainnet-openai/
โโโ functions.json # 25 function definitions
โโโ example.js # Usage example
โโโ README.md # Documentation
Pros:โ
- โ Low context overhead (~90% less than MCP)
- โ Perfect for long conversations - leaves room for history
- โ Native OpenAI integration - built-in function calling
- โ Simple deployment - just import JSON
- โ Familiar API - standard OpenAI SDK
Cons:โ
- โ OpenAI-specific (not protocol-agnostic)
- โ Still uses ~500 tokens for 25 tools
- โ Requires custom function implementation
When to Choose:โ
"I'm building a chatbot that needs to maintain long conversation history while accessing blockchain data"
3. MCP (~5k Token Context)โ
Context Cost: ~5,000 tokens
node bmcps-generator.js --blockchain sol --format mcp
โ Best For:โ
- Feature-rich integrations with full MCP capabilities
- Short interactions (quick queries, single-use)
- Claude Desktop or Claude.ai integration
- Advanced features (prompts, resources, sampling)
- Standardized tooling across multiple AI platforms
How It Works:โ
- Generates complete TypeScript MCP server
- Full server/client architecture with stdio transport
- Rich tool definitions with comprehensive schemas
- Supports prompts, resources, and sampling (beyond just tools)
Example Generated Files:โ
sol-mainnet-mcp-server/
โโโ src/
โ โโโ index.ts # MCP server entry point
โ โโโ tool-definitions.ts # Tool registry
โ โโโ tools/ # 25 tool implementations
โ โโโ core/
โ โโโ wallet/
โ โโโ network/
โ โโโ tokens/
โโโ tests/ # Jest test suite
โโโ package.json
โโโ tsconfig.json
โโโ README.md
Pros:โ
- โ Feature-rich - prompts, resources, sampling
- โ Standardized protocol - works across AI platforms
- โ Complete implementation - full server + tests
- โ TypeScript - type safety and autocomplete
- โ Ecosystem support - growing MCP tooling
Cons:โ
- โ High context overhead (~5k tokens for 25 tools)
- โ Not ideal for long conversations - eats context space
- โ Requires stdio transport or server deployment
- โ More complex than simple function calling
When to Choose:โ
"I'm integrating with Claude Desktop and want the full MCP feature set for short, focused interactions"
4. JSON Schema (Format-Agnostic Base)โ
Context Cost: N/A (not directly used by AI)
node bmcps-generator.js --blockchain avax --format json-schema
โ Best For:โ
- Custom protocol development
- Base schema for new formats
- Documentation and reference
- Validation of tool implementations
How It Works:โ
- Generates pure JSON schema with prefixed tool names
- Includes all input/output definitions
- Can be transformed into any other format
Example Generated Files:โ
avax-mainnet-json-schema/
โโโ schema.json # Universal tool schema
Pros:โ
- โ Format-agnostic - base for any protocol
- โ Fully specified - complete tool definitions
- โ Extensible - easy to transform
Cons:โ
- โ Not directly usable by AI agents
- โ Requires custom implementation
When to Choose:โ
"I'm building a custom protocol or need a base schema for tooling/validation"
Decision Treeโ
Start: What's your use case?
โโ Building production app at scale?
โ โโ Use REST API (0 tokens)
โ
โโ Long conversations (>10 exchanges)?
โ โโ Use OpenAI Functions (~500 tokens)
โ
โโ Short Claude Desktop integration?
โ โโ Use MCP (~5k tokens)
โ
โโ Building custom protocol?
โโ Use JSON Schema
Migration Between Protocolsโ
One of BMCPS v3.0's superpowers is protocol migration. All formats are generated from the same universal schema, so you can:
Start with MCP, Migrate to OpenAI Functionsโ
- Prototype with MCP for quick testing
- Switch to OpenAI Functions for production conversations
- Use the same 25 tools, just different transport
# Start with MCP
node bmcps-generator.js --blockchain eth --format mcp
# Later: Switch to OpenAI for production
node bmcps-generator.js --blockchain eth --format openai
Start with OpenAI, Scale to REST APIโ
- Begin with OpenAI Functions for MVP
- As usage grows, deploy REST API for scalability
- Same blockchain operations, different protocol
Context Overhead Examplesโ
Long Conversation Scenarioโ
Conversation: 20 exchanges between AI and user about Ethereum transactions
| Protocol | Context Used | Remaining for Conversation |
|---|---|---|
| REST API | 0 tokens | 100% available |
| OpenAI Functions | 500 tokens | ~99% available |
| MCP | 5,000 tokens | ~95% available |
For a 8k token context window, the difference becomes significant:
- REST API: 8,000 tokens for conversation
- OpenAI: 7,500 tokens for conversation
- MCP: 3,000 tokens for conversation
Short Query Scenarioโ
Conversation: Single "What's the balance of 0x123?" query
| Protocol | Impact |
|---|---|
| REST API | Slight HTTP overhead, zero context cost |
| OpenAI Functions | Minimal - 500 tokens negligible for short chat |
| MCP | No problem - 5k tokens fine for one-off query |
Verdict: For short queries, MCP's context overhead doesn't matter. Use whatever protocol integrates easiest.
Real-World Use Casesโ
Use Case 1: DeFi Trading Bot (24/7 Operations)โ
Recommendation: REST API
- Why: Zero context, scales to thousands of trades, can cache responses
- Command:
node bmcps-generator.js --blockchain eth --format rest-api
Use Case 2: Blockchain Research Assistant (Extended Sessions)โ
Recommendation: OpenAI Functions
- Why: Needs long conversation history to discuss findings
- Command:
node bmcps-generator.js --blockchain btc --format openai
Use Case 3: Claude Desktop Plugin (Personal Use)โ
Recommendation: MCP
- Why: Short queries, want full MCP feature set
- Command:
node bmcps-generator.js --blockchain sol --format mcp
Use Case 4: Multi-Chain Portfolio Tracker (Web App)โ
Recommendation: REST API
- Why: Frontend needs data from multiple chains, users expect fast responses
- Command:
node bmcps-generator.js --blockchain eth --format rest-api
Generate All Formats at Onceโ
Not sure which protocol you'll need? Generate everything:
node bmcps-generator.js --blockchain eth --format all
This creates:
eth-mainnet-openai/- OpenAI Functionseth-mainnet-mcp-server/- MCP Servereth-mainnet-rest-api/- REST APIeth-mainnet-json-schema/- JSON Schema
Test each protocol and choose what works best!
Summaryโ
| Question | Answer |
|---|---|
| Need maximum scale? | REST API |
| Long conversations? | OpenAI Functions |
| Claude Desktop integration? | MCP |
| Custom protocol? | JSON Schema |
| Not sure? | Generate all (--format all) |
Next Steps:
- Quick Start Guide - Get started with any protocol
- Universal Tool Schema - See all 25 tools
- Testing Guide - Test your implementation