Skip to main content

mcp_utils/client/
mod.rs

1pub mod config;
2pub mod connection;
3pub mod error;
4pub mod manager;
5pub mod mcp_client;
6pub mod naming;
7pub use llm::oauth;
8pub mod roots;
9pub mod tool_proxy;
10pub mod variables;
11
12pub use config::*;
13pub use connection::ServerInstructions;
14pub use error::{McpError, Result};
15pub use manager::{
16    ElicitationRequest, McpClientEvent, McpManager, McpServerStatus, McpServerStatusEntry, UrlElicitationCompleteParams,
17};
18pub use mcp_client::{McpClient, cancel_result};
19pub use naming::split_on_server_name;
20pub use roots::root_from_path;
21pub use variables::{VarError, expand_env_vars};
22
23// Re-export rmcp's Root type for convenience
24pub use rmcp::model::Root;
25
26use std::path::PathBuf;
27
28/// Resolve the Aether home directory.
29///
30/// Returns `$AETHER_HOME` if set, otherwise `$HOME/.aether` (or `$USERPROFILE/.aether`
31/// on Windows). Returns `None` if no home directory environment variable is set.
32pub(crate) fn aether_home() -> Option<PathBuf> {
33    utils::SettingsStore::new("AETHER_HOME", ".aether").map(|s| s.home().to_path_buf())
34}