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
74
75
76
77
78
79
80
81
//! MCP (Model Context Protocol) server integration
//!
//! This module provides support for connecting to MCP servers and using their tools
//! within mixtape agents. You can configure MCP servers either programmatically or
//! by loading them from standard MCP JSON configuration files (compatible with
//! Claude Desktop and Claude Code).
//!
//! # Examples
//!
//! ## Programmatic configuration
//!
//! ```rust,no_run
//! use mixtape_core::mcp::{McpServerConfig, McpTransport};
//!
//! // Basic stdio transport (most MCP servers)
//! let config = McpServerConfig::new("filesystem",
//! McpTransport::stdio("npx")
//! .args(["-y", "@modelcontextprotocol/server-filesystem"])
//! );
//!
//! // With tool filtering
//! let config = McpServerConfig::new("filesystem",
//! McpTransport::stdio("npx")
//! .args(["-y", "@modelcontextprotocol/server-filesystem"])
//! )
//! .only_tools(["read_file", "write_file"]);
//!
//! // HTTP transport with authentication
//! let config = McpServerConfig::new("api",
//! McpTransport::http("https://api.example.com/mcp")
//! .header("Authorization", "Bearer token")
//! );
//! ```
//!
//! ## From JSON config file
//!
//! ```ignore
//! use mixtape_core::{Agent, ClaudeSonnet4_5};
//!
//! let agent = Agent::builder()
//! .bedrock(ClaudeSonnet4_5)
//! .with_mcp_config_file("~/.claude.json")
//! .build()
//! .await?;
//! ```
pub
pub use McpClient;
pub use ;
pub use ;
use Error;
/// Errors that can occur during MCP operations