turul-mcp-protocol
Model Context Protocol (MCP) specification implementation - Current version alias for future-proofing.
Overview
turul-mcp-protocol
is a version alias crate that re-exports the current stable version of the Model Context Protocol implementation. This provides future-proofing and consistency across the turul-mcp-framework ecosystem.
Currently aliases: turul-mcp-protocol-2025-06-18
Features
- ✅ Future-Proof API - Always points to the latest stable MCP specification
- ✅ Consistent Imports - Use
turul_mcp_protocol::
throughout your codebase - ✅ Seamless Upgrades - Protocol version changes only require updating this dependency
- ✅ Complete Re-export - All types, traits, and constants from the current version
- ✅ Zero Runtime Cost - Pure compile-time aliasing with no performance impact
Usage
Add this to your Cargo.toml
:
[]
= "0.2.0"
Import Pattern
✅ ALWAYS use the alias:
use ;
❌ NEVER import the versioned crate directly:
// DON'T DO THIS
use ;
Protocol Version Abstraction
Current Version Information
use ;
Feature Compatibility
use McpVersion;
Complete API Re-export
All types and functionality from the current MCP specification are available:
Core Protocol Types
use ;
Error Types
use McpError;
Trait System
use ;
// Example implementation
Framework Integration
Server Integration
The protocol types integrate seamlessly with turul-mcp-server
to build a complete server. The following is a complete, runnable example.
Dependencies:
[]
= "0.2.0"
= "0.2.0"
= "0.2.0"
= { = "1.0", = ["full"] }
Example:
use *;
use mcp_tool;
async
async
Client Integration
use ;
use ;
let transport = new?;
let client = new
.with_transport
.build;
// Protocol types work directly with client methods
let tools = client.list_tools.await?;
let result = client.call_tool.await?;
Version Migration Guide
Future Protocol Updates
When a new MCP protocol version is released, upgrading is seamless:
// Your code stays the same
use ;
// Only the dependency version changes in Cargo.toml:
// [dependencies]
// turul-mcp-protocol = "0.2" # Now points to MCP 2026-XX-XX
Handling Version-Specific Features
use ;
Testing
The alias crate includes comprehensive tests to ensure re-exports work correctly:
# Test that all re-exports are functional
# Test version consistency
# Test protocol parsing
Version Testing
Architecture Decision Record
Why Use a Version Alias?
Decision: Create turul-mcp-protocol
as an alias to the current MCP specification version.
Rationale:
- Future-Proofing: Applications can upgrade MCP versions by changing one dependency
- Consistent Imports: All framework code uses
turul_mcp_protocol::
imports - Clear Separation: Framework code vs specific protocol version implementation
- Gradual Migration: New protocol versions can be adopted incrementally
Implementation:
turul-mcp-protocol
re-exports the current stable version- All framework crates use the alias for imports
- Versioned crates contain actual protocol implementations
- Migration path is clear and documented
Feature Flags
[]
= { = "0.2.0", = ["server"] }
Available features:
default
- Core protocol types and traitsserver
- Server-specific functionality and traitsclient
- Client-specific functionality and helpers
These features are passed through to the underlying protocol implementation.
Contributing
When contributing to the framework:
- Always use the alias: Import from
turul_mcp_protocol
, not the versioned crate - Update documentation: When the alias points to a new version, update examples
- Test compatibility: Ensure changes work with the aliased version
- Version consistency: Keep the alias pointing to the latest stable version
License
Licensed under the MIT License. See LICENSE for details.