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
//! Reusable building blocks for Rust-native MCP servers.
//!
//! The `mcp-server` binary (in the sibling `crates/mcp-server` crate)
//! is a complete generic MCP server: source navigation, GitHub access
//! (issues + REST API with drill-down), workspace mode (github
//! clone-and-track or local directory bind), watch mode, and
//! manifest-driven Cypher / tool registration. Downstream crates that
//! want the same framework with domain-specific tools layered on top
//! depend on `mcp-methods` and call into the public modules below.
//!
//! Typical layering pattern:
//! 1. Construct [`server::ServerOptions`] from a manifest, optionally
//! binding source roots, a default repo, or a workspace handle.
//! 2. `let mut server = server::McpServer::new(options);`
//! 3. Register your domain-specific tools with
//! [`server::McpServer::register_typed_tool`] — typed arg struct
//! plus a `Fn(T) -> String` handler. (For lower-level control, use
//! [`server::McpServer::tool_router_mut`] and rmcp's `ToolRoute`
//! directly.)
//! 4. `server.serve(rmcp::transport::stdio()).await`.
//!
//! See `kglite-mcp-server` for a real example: it adds `cypher_query`,
//! `graph_overview`, and `save_graph` tools that close over an active
//! graph handle. Python authors running a FastMCP server can compose
//! tools via the `mcp_methods.fastmcp` helper submodule (Python-side).
//!
//! **Note:** the legacy `embedder:` / `tools[].python:` extension hooks
//! that lived here in 0.3.25 have been removed. They required PyO3 in
//! the framework's source, which violated the pure-Rust constraint of
//! this crate. Downstream Python-aware servers (kglite, etc.) implement
//! their equivalent via a thin pyo3 wrapper in their own cdylib.
// `server` inside the `server` feature module — the inner module is
// the rmcp `ServerHandler` impl. Rename would churn every downstream
// import; allow the inception.
// Re-export the most commonly used types so downstream crates can
// `use mcp_methods::server::{Manifest, ServerOptions, McpServer};`
// without chasing the module hierarchy.
pub use ;
pub use ;
pub use ;
pub use ;
pub use SourceRootsProvider;
pub use ;
pub use ;