Skip to main content

Crate nestrs_mcp

Crate nestrs_mcp 

Source
Expand description

nestrs-mcp — Model Context Protocol server for nestrs.

Crate root. The binary entry point lives in main.rs; this lib.rs exposes the server so embedders (e.g. a future nestrs-cli mcp subcommand) can mount it without spawning a subprocess.

§Module layout

  • error — crate-level Error type and Result alias.
  • introspection — source-level + live-registry snapshot.
  • docs — local-file docs search (CHANGELOG, mdBook, READMEs).
  • scaffold — new_project / create_module / create_resource / create_dto / generate_crud.
  • runtime — HTTP client for the live admin port on a running app.
  • server — the ServerHandler + #[tool_router] aggregator.
  • tools — one module per surface, each implementing a group of MCP #[tool] methods.

Re-exports§

pub use error::Error;
pub use error::Result;
pub use surfaces::assistant_text;
pub use surfaces::elicit_input;
pub use surfaces::input_responses;
pub use surfaces::text_contents;
pub use surfaces::user_text;
pub use surfaces::CacheHints;
pub use surfaces::McpSurfaces;

Modules§

docs
Local-file docs search (CHANGELOG, mdBook, READMEs).
error
Crate-level error type.
introspection
Source-level + live-registry introspection for nestrs projects.
runtime
Live-runtime HTTP client (talks to a running nestrs app’s admin port).
scaffold
Scaffolding tools: new_project, create_module, create_resource, create_dto, generate_crud. All write actions return a structured { files_created, files_modified } report so the model can show the user exactly what changed.
server
Top-level MCP server. Aggregates the four tool routers (introspection, runtime, scaffold, docs) into a single ServerHandler so the binary can serve one --stdio or --http endpoint with all tools registered.
surfaces
MCP protocol surfaces beyond tools: prompts, resources, resource templates, and completion.
tools
#[tool] aggregator for all MCP tool surfaces.
wizard
Post-install setup wizard for nestrs-mcp.