Skip to content

Epistates/TurboMCP

v1.0.11 Breaking

This release includes breaking changes for platform teams planning a safe upgrade.

Published 8mo MCP Developer Tools
✓ No known CVEs patched
Read the diff → Tool health → What is this tool? →

✓ No known CVEs patched in this version

Topics

mcp mcp-client mcp-sdk mcp-server mcp-servers rust

Affected surfaces

breaking_upgrade

Summary

AI summary

Fully implements MCP prompts and resources, fixing empty-list bugs with zero breaking changes.

Full changelog

🚨 Critical Fix: Complete MCP Protocol Implementation

🔧 What Was Fixed

Root Cause: The #[server] macro only auto-discovered #[tool] methods, leaving #[prompt] and #[resource] methods unregistered, making them inaccessible via the MCP protocol.

Impact:

  • prompts/list returned empty arrays even when prompts existed
  • resources/list returned empty arrays even when resources existed
  • Servers appeared to have no prompts/resources despite being annotated

Solution: Extended the macro system to auto-discover and register all MCP capabilities.

✅ What's New & Fixed

🎯 Complete Auto-Registration System

  • Fixed: #[server] macro now discovers #[prompt] annotated methods
  • Fixed: #[server] macro now discovers #[resource] annotated methods
  • Enhanced: Full compile-time registration of all MCP capabilities

📋 Full MCP Protocol Compliance

  • Added: Complete prompts/list implementation returning discovered prompts
  • Added: Complete prompts/get implementation with parameter handling
  • Added: Complete resources/list implementation returning discovered resources
  • Added: Complete resources/read implementation with URI routing
  • Fixed: All responses conform to MCP specification 2025-06-18

🛠️ Robust Error Handling

  • Added: Proper JSON-RPC error codes (-32601, -32603, -32602)
  • Added: Comprehensive parameter validation
  • Added: Safe deserialization with error recovery
  • Enhanced: User-friendly error messages without information leaks

🏗️ Enhanced Code Generation

  • Added: Automatic handler bridge generation for prompts
  • Added: Automatic handler bridge generation for resources
  • Added: Parameter extraction and type conversion
  • Added: Context injection for all handler types

🧪 Verification & Testing

✅ Protocol Compliance Validated

# Prompts now work correctly
echo '{"jsonrpc": "2.0", "id": 1, "method": "prompts/list"}' |
  cargo run --example 04_resources_and_prompts
# Returns: {"result": {"prompts": [...]}}

# Resources now work correctly
echo '{"jsonrpc": "2.0", "id": 2, "method": "resources/list"}' |
  cargo run --example 04_resources_and_prompts
# Returns: {"result": {"resources": [...]}}

📊 Test Coverage

  • 465+ tests passing across all modules
  • New: Protocol compliance test suite
  • New: Integration tests for auto-registration
  • New: End-to-end MCP validation tests

💡 Developer Impact

✅ Zero Breaking Changes

  • All existing #[tool] functionality preserved
  • All existing server configurations work unchanged
  • Backward compatibility maintained 100%

🚀 Immediate Benefits

  • No code changes required - existing #[prompt] and #[resource] annotations now work automatically
  • Complete MCP compliance out of the box
  • Production-ready prompts and resources support

📋 Example Usage (Now Working)

#[server(name = "MyServer", version = "1.0.0")]
impl MyServer {
    #[tool("Calculate sum")]
    async fn add(&self, a: i32, b: i32) -> McpResult<i32> {
        Ok(a + b)  // ✅ Was working before
    }

    #[prompt("Generate summary for {topic}")]
    async fn summarize(&self, ctx: Context, topic: String) -> McpResult<String> {
        Ok(format!("Summary of {}", topic))  // ✅ NOW WORKING!
    }

    #[resource("docs://content/{id}")]
    async fn get_doc(&self, ctx: Context, id: String) -> McpResult<String> {
        Ok(format!("Document content for {}", id))  // ✅ NOW WORKING!
    }
}

🏆 Quality Assurance

🔒 Security Validated

  • Zero security vulnerabilities introduced
  • Input validation for all parameters
  • Safe error handling without information disclosure
  • Memory safety maintained throughout

📈 Performance Impact

  • Negligible - registration happens at compile time
  • Zero runtime overhead added
  • Efficient routing with compile-time dispatch

🎯 Strategic Impact

This release transforms TurboMCP from a partial MCP implementation to a complete, production-ready MCP framework:

  • Tools: Full implementation (existing)
  • Prompts: Full implementation (NEW in v1.0.11)
  • Resources: Full implementation (NEW in v1.0.11)
  • Protocol Compliance: 100% MCP specification adherence
  • Auto-Discovery: Complete macro-driven registration

📦 Upgrade Instructions

For existing projects:

[dependencies]
turbomcp = "1.0.11"

No code changes required - existing #[prompt] and #[resource] annotations will immediately start working after the upgrade.

🔍 Technical Details

Files Modified

  • crates/turbomcp-macros/src/server.rs - Enhanced auto-discovery
  • crates/turbomcp-macros/src/compile_time_router.rs - Added prompts/resources routing
  • crates/turbomcp-macros/src/prompt.rs - Enhanced parameter handling
  • crates/turbomcp-macros/src/resource.rs - Enhanced URI routing

Weekly OSS security release digest.

The CVE patches and breaking changes that affected production tools this week. One email, every Sunday.

No spam, unsubscribe anytime.

Share this release

Track Epistates/TurboMCP

Get notified when new releases ship.

Sign up free

About Epistates/TurboMCP

TurboMCP SDK: Enterprise MCP SDK in Rust

All releases →

Beta — feedback welcome: [email protected]