Skip to main content

Crate mcp_protocol

Crate mcp_protocol 

Source
Expand description

§Model Context Protocol (MCP) Implementation

Standards-compliant MCP implementation for PromptFleet agents

  • JSON-RPC 2.0 wire format (MCP specification requirement)
  • HTTP/HTTPS transport with OAuth 2.1 Bearer token support
  • FastMCP compatible - interoperable with Python FastMCP and TypeScript MCP SDKs
  • External MCP servers - connect to any MCP server via proxy

§Compatibility Verified (June 2025)

  • MCP Specification 2025-06-18 (latest)
  • JSON-RPC 2.0 specification compliant
  • FastMCP Python implementation compatible
  • Standard OAuth 2.1 Bearer token authentication
  • HTTP+SSE and Streamable HTTP transport support

§Core Features

  • Tool Discovery: list_tools method
  • Tool Execution: call_tool method with proper parameter handling
  • Memory Operations: add_memory, search_memory methods
  • Health Monitoring: heartbeat and health endpoints
  • Authentication: Bearer token and custom auth strategies
  • Proxy Support: Connect to external MCP servers outside Kubernetes

Re-exports§

pub use error::*;
pub use types::*;
pub use client::*;
pub use server::*;
pub use auth::*;
pub use proxy::*;

Modules§

auth
MCP Authentication
client
MCP Client
error
MCP Protocol Errors
handler
MCP Protocol Handler
proxy
MCP Proxy
server
MCP Server
types
MCP Protocol Types

Structs§

McpProtocolHandler
MCP Protocol Handler - Integrates with protocol_transport_core

Enums§

QueryMode
Query Mode - How to handle tool listing

Constants§

JSONRPC_VERSION
JSON-RPC Version - Required by MCP specification
MCP_PROTOCOL_VERSION
MCP Protocol Version - Current specification version

Traits§

ToolProvider
Tool Provider Trait - Pure abstraction for tool operations

Functions§

create_mcp_handler
Quick setup function for MCP protocol handler
create_mcp_handler_with_capabilities
Quick setup function for MCP protocol handler with custom capabilities