vex_llm/mcp/mod.rs
1//! MCP (Model Context Protocol) client integration
2//!
3//! This module provides integration with MCP servers, allowing VEX agents
4//! to use external tools exposed via the Model Context Protocol.
5//!
6//! # Security Considerations
7//!
8//! - **OAuth 2.1**: Authentication for remote MCP servers
9//! - **TLS**: All remote connections use HTTPS/WSS
10//! - **Merkle Hashing**: All MCP results are hashed for audit trail
11//! - **Timeouts**: Connection and execution timeouts
12//! - **Input Validation**: Arguments validated before sending
13//!
14//! # Example
15//!
16//! ```ignore
17//! use vex_llm::mcp::McpClient;
18//!
19//! let client = McpClient::connect("ws://localhost:8080").await?;
20//! let tools = client.list_tools().await?;
21//! let result = client.call_tool("query", json!({"sql": "SELECT 1"})).await?;
22//! ```
23
24pub mod client;
25pub mod types;
26
27pub use client::McpClient;
28pub use types::{McpConfig, McpError, McpToolInfo};