//! Server discovery surfaces for `mcptest`.
//!
//! Three independent surfaces live here:
//!
//! - `well_known`: `.well-known/mcp.json` document fetcher and parser.
//!   Used by `mcptest discover` to introspect a running server.
//! - [`clients`]: local-client config readers. Walks the
//!   Claude Desktop, Claude Code, and Cursor config files so
//!   `mcptest servers` can list the user's already-configured servers
//!   without any YAML.
//! - [`dependency_graph`]: static, offline inference of likely call-ordering
//!   between tools from a `tools/list` catalog. Powers
//!   `mcptest discover --graph`.
//!
//! Both surfaces type their errors so the runner can surface a uniform
//! shape; see `docs/discovery.md` for the full flow.

pub mod clients;
pub mod dependency_graph;
mod well_known;

pub use clients::{
    discover_all_clients, ClientSource, DiscoveredServer, DiscoveryError as ClientsDiscoveryError,
    ServerConfig,
};
pub use dependency_graph::{
    infer_dependency_graph, render_mermaid, render_table, DependencyGraph, Edge, EdgeKind,
};
pub use well_known::{
    fetch, to_server_yaml, DiscoveryAuth, DiscoveryError, DiscoveryTool, McpDiscovery,
};
