1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
//! Model Context Protocol (MCP) client support.
//!
//! This module provides generic MCP clients that connect to external MCP
//! servers, discover their tools, and bridge those tools into the Mentra
//! runtime tool system.
//!
//! # Transports
//!
//! Three transports are supported, chosen by which configuration type you use:
//!
//! - **stdio** — [`McpServerConfig`] spawns a child process and speaks JSON-RPC
//! over its standard input and output.
//! - **Streamable HTTP** — [`McpStreamableHttpServerConfig`] posts every
//! JSON-RPC message to one configured URL and reads each reply from that same
//! response, either as a single JSON body or as an event stream the server
//! opens in it. This is the transport from protocol revision 2025-03-26 and
//! later, and the one current servers ship; reach for it first.
//! - **legacy HTTP+SSE** — [`McpSseServerConfig`] opens a long-lived
//! `text/event-stream` `GET` and posts JSON-RPC messages to a second URL that
//! the server names. This is the transport from protocol revision 2024-11-05,
//! which Streamable HTTP replaced; a server that answers `404` on `/mcp` but
//! serves `/sse` needs it. See [`McpSseClient`] for the full distinction.
//!
//! # Architecture
//!
//! These links use absolute paths because the module's documentation is merged
//! with the outer comment on its `pub mod` declaration, which resolves relative
//! links against the crate root rather than this module.
//!
//! - [`protocol`](crate::mcp::protocol) — JSON-RPC 2.0 and MCP protocol types
//! shared by both transports
//! - [`client`](crate::mcp::client) — stdio transport client for a single MCP
//! server process
//! - [`streamable_http`](crate::mcp::streamable_http) — Streamable HTTP
//! transport client
//! - [`sse`](crate::mcp::sse) — legacy HTTP+SSE transport client
//! - [`bridge`](crate::mcp::bridge) — wraps MCP tools as Mentra
//! [`ExecutableTool`] instances
//! - [`manager`](crate::mcp::manager) — manages multiple MCP server connections
//! and lifecycle
//!
//! [`ExecutableTool`]: crate::tool::ExecutableTool
pub
pub use ;
pub use ;
pub use ;
pub use ;
pub use SecretString;
pub use ;
pub use ;
pub use EndpointError;
pub use ;
pub use ;