mcp server
v2.7.5 · stable
MIT
rustjunosmcp
MCP server for Juniper Junos and SRX devices
One Rust MCP server for Juniper Junos and SRX devices: core Junos tools plus SRX security workflows, drop-in compatible with Juniper/junos-mcp-server.
About
A Model Context Protocol server for Juniper Junos and SRX devices, written in Rust. A single rust-junosmcp process exposes the core Junos tools and, by default, the SRX security workflows through one tool registry and endpoint.
It is drop-in compatible with Juniper/junos-mcp-server on the devices.json inventory format and core tool surface, but built on async Rust (rustez and rustnetconf) instead of PyEZ.
Features
- Safer config: commit_check_config validates without committing, confirmed commits with auto-rollback, and discard_candidate
- Plane guard: config writes that Mist or Security Director owns are refused, with the managing plane declared in the inventory or detected from outbound-ssh
- Device lifecycle: staged upgrade_junos, SCP transfer_file and fetch_file, PFE commands
- Parallel session-pooled batch commands and output caps
- Streamable HTTP with per-token router and tool scopes, TLS and a Host allowlist
- SRX tools: IDP and Application-ID signature updates, chassis-cluster health, license and security-services status
- Machine-readable tool errors: every error carries a stable code (invalid_argument, unauthorized, upstream_unavailable, outcome_unknown, …) and a retry hint
- --tool-mode compact lists just the execute facade and get_router_list for clients that pay per listed tool
- 1.0 stability promise: tool names and schemas, error codes, CLI flags, inventory and token formats change only in a major release
Quick start
Clone and build
git clone https://github.com/mechubsec/rustjunosmcp.git
cd rustjunosmcp
cargo build --releaseConfigure devices
cp devices-template.json devices.json
chmod 600 devices.json # the server refuses a group- or world-readable inventory
# Edit devices.json with your SRX detailsRun as an MCP server
./target/release/rust-junosmcp -f devices.jsonOr download a release (Linux amd64)
curl -LO https://github.com/mechubsec/rustjunosmcp/releases/download/v2.7.5/rust-junosmcp_2.7.5_amd64.tar.gz
curl -LO https://github.com/mechubsec/rustjunosmcp/releases/download/v2.7.5/rust-junosmcp_2.7.5_amd64.tar.gz.sha256
sha256sum -c rust-junosmcp_2.7.5_amd64.tar.gz.sha256Container image
docker pull ghcr.io/mechubsec/rustjunosmcp:latest
# or the Docker Hub mirror
docker pull docker.io/mechub/rustjunosmcp:latest