Skip to content

MCP (Model Context Protocol)

The Model Context Protocol is the open standard for connecting AI agents and LLM apps to external tools, data sources, and services. PromptFleet provides a full, WASM-compatible implementation.

  • JSON-RPC 2.0 wire format with full request/response lifecycle
  • Tool discovery (tools/list) and tool execution (tools/call)
  • Memory operations for persistent context
  • OAuth 2.1 Bearer token authentication
  • HTTP+SSE and Streamable HTTP transports
  • FastMCP compatible — interoperates with Python FastMCP and TypeScript MCP SDKs
  • Client, server, and proxy modes via feature flags

Use pf_mcp_protocol directly when you want MCP in any Rust app — no agent SDK needed.

[dependencies]
mcp_protocol = { package = "pf_mcp_protocol", version = "0.1", features = ["client"] }
use mcp_protocol::{McpProtocolHandler, create_mcp_handler};
let handler = create_mcp_handler();
// Or customize:
// let handler = McpProtocolHandler::new()
// .with_capabilities(ServerCapabilities::default())
// .with_query_mode(mcp_protocol::QueryMode::Single);

When building agents with agent_sdk, enable mcp-client to auto-discover and register MCP tools into the agent’s ToolRegistry. The SDK uses the correct backend automatically — NativeMcpBackend on native (via rmcp), WasmMcpBackend on WASM (via mcp_protocol + Spin HTTP).

[dependencies]
agent_sdk = { package = "pf_agent_sdk", version = "0.1", features = ["llm-engine", "mcp-client"] }

MCP tools become available to the LLM alongside local tools — the agent doesn’t need to know the difference.

FeaturePurpose
clientMCP client module (included in default)
serverMCP server module (included in default)
proxyConnect to external MCP servers outside Kubernetes (included in default)
sse-clientDirect SSE client — avoids proxy hop for performance
sse-serverDirect SSE server — accepts direct SSE connections