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
//! Library half of the `mnem mcp` binary.
//!
//! Exposes the JSON-RPC 2.0 dispatch used by the stdio entry point so
//! downstream embedders (HTTP transports, Node/Python wrappers, test
//! harnesses) can link the MCP tool surface without re-implementing it.
//!
//! The wire-level detail and tool implementations live in private
//! submodules; this crate surfaces a stable, narrow API:
//!
//! - [`Server`] - parsed-line dispatcher; `handle_line(&str) -> Option<String>`
//! consumes one JSON-RPC request and returns the response body.
//! - [`tool_names`] - returns the ordered list of tool names the server
//! will advertise in `tools/list` responses.
//! - [`MCP_PROTOCOL_VERSION`] - the protocol version this crate
//! implements.
//!
//! The binary crate (`src/main.rs`) is a thin stdio wrapper around
//! [`Server`]; everything dispatch-related is reachable from here.
pub use MCP_PROTOCOL_VERSION;
pub use Server;
/// Return the ordered list of tool names the server would advertise in
/// `tools/list` for the given `allow_labels` gate. Useful in tests to
/// assert the public tool surface stays stable, and in wrappers that
/// want to precompute a client-side registry before opening a repo.