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
// Label every feature-gated item in the rendered docs with the feature that
// enables it. docs.rs builds with `--cfg docsrs` (see `[package.metadata.docs.rs]`);
// an ordinary build sees none of this.
//! A simple framework for writing Model Context Protocol servers.
//!
//! The [`types`] and [`headers`] modules are unconditional — both sides of the
//! protocol need all of them, and they cost nothing but serde. `headers` is
//! shared rather than split because a client deriving what to send and a server
//! checking what arrived are the *same* derivation; splitting them is how they
//! drift. Everything else sits behind a feature
//! naming either a *side* of the protocol or a *transport*; see the `[features]`
//! table in `Cargo.toml`. The default is everything.
//!
//! A server that speaks a transport this crate does not implement wants
//! `default-features = false, features = ["server"]`: that is [`traits`], the
//! [`tools!`] macro, and [`handle_request`], which answers a decoded request
//! without doing any I/O.
//!
//! A *client* wants `default-features = false, features = ["client"]`: the
//! [`client`] module, which is the same split from the other side — it builds
//! requests and classifies the messages that arrive, and leaves framing,
//! connections, and authorization to the transport. It pulls no dependencies
//! this crate does not already have.
//!
//! The dependencies re-exported at the root are there for the macros to name
//! and for a downstream tool to use without duplicating the version
//! requirement. Each is present only under the features that pull it.
pub use anyhow;
pub use clap;
pub use run;
pub use dirs;
pub use fieldwork;
pub use log;
pub use schemars;
pub use serde;
pub use serde_json;
pub use ;
pub use shellexpand;
pub use serve;