crates/nu-mcp/README.md
This crate provides support for MCP (Model Context Protocol) in Nushell.
The mcp feature flag controls whether MCP functionality is compiled into Nushell.
To build Nushell with MCP support, use:
cargo build --features mcp
To run Nushell with the MCP server enabled:
nu --mcp
The MCP server supports two transport modes:
stdio (default): Standard I/O transport for local usage.http: Streamable HTTP with SSE for remote access.To use HTTP transport:
nu --mcp --mcp-transport http
To specify a custom port (default is 8080):
nu --mcp --mcp-transport http --mcp-port 3000
If Nushell was built without the MCP feature and you attempt to use the --mcp flag, it will display an error message instructing you to recompile with the feature enabled.