Skip to main content

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โ€‹

ProtocolContext OverheadBest ForSetup Complexity
REST API0 tokensProduction apps, high-scale systems, microservicesMedium
OpenAI Functions~500 tokensLong conversations, extended agent sessionsLow
MCP~5k tokensFeature-rich integrations, short interactionsLow
JSON SchemaN/ACustom protocols, base schemasN/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โ€‹

  1. Prototype with MCP for quick testing
  2. Switch to OpenAI Functions for production conversations
  3. 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โ€‹

  1. Begin with OpenAI Functions for MVP
  2. As usage grows, deploy REST API for scalability
  3. Same blockchain operations, different protocol

Context Overhead Examplesโ€‹

Long Conversation Scenarioโ€‹

Conversation: 20 exchanges between AI and user about Ethereum transactions

ProtocolContext UsedRemaining for Conversation
REST API0 tokens100% available
OpenAI Functions500 tokens~99% available
MCP5,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

ProtocolImpact
REST APISlight HTTP overhead, zero context cost
OpenAI FunctionsMinimal - 500 tokens negligible for short chat
MCPNo 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 Functions
  • eth-mainnet-mcp-server/ - MCP Server
  • eth-mainnet-rest-api/ - REST API
  • eth-mainnet-json-schema/ - JSON Schema

Test each protocol and choose what works best!

Summaryโ€‹

QuestionAnswer
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: