Junos

v1.0.0Developer Toolsstable

Enables LLM interactions with Juniper Junos network devices, allowing natural language access to device configuration, monitoring, and management operations through secure SSH connections.

junos-mcp-servermcpai-integration
Share:
93
Stars
0
Downloads
0
Weekly
0/5

What is Junos?

Junos is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to enables llm interactions with juniper junos network devices, allowing natural language access to device configuration, monitoring, and management operations through secure ssh connections.

Enables LLM interactions with Juniper Junos network devices, allowing natural language access to device configuration, monitoring, and management operations through secure SSH connections.

This server falls under the Developer Tools category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • Enables LLM interactions with Juniper Junos network devices,

Use Cases

Interact with Juniper Junos network devices using natural language. Configure and monitor networking equipment securely via SSH.
Juniper

Maintainer

LicenseApache 2.0
Languagepython
Versionv1.0.0
UpdatedMay 20, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx junos-mcp-server

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use Junos

The Junos MCP Server bridges AI assistants with Juniper Junos network devices over SSH, enabling natural-language access to device configuration, operational state, and management tasks. It connects to one or more routers defined in a JSON device mapping file and exposes tools to execute CLI commands, retrieve configurations, compare diffs, and commit changes. Teams managing Juniper infrastructure can use it to troubleshoot devices, review running configs, and make controlled changes without leaving their AI client. Security guardrails via block.cfg and block.cmd help prevent unintended operations.

Prerequisites

  • Python 3.11+ installed (or uv package manager)
  • Network access to Juniper Junos devices over SSH (port 22)
  • SSH credentials or SSH key pair for each target device
  • A devices.json file mapping device names to IPs and auth details
  • An MCP client such as Claude Desktop, VS Code, or Cursor
1

Clone the repository

Clone the Junos MCP Server repository from GitHub and change into the project directory.

git clone https://github.com/Juniper/junos-mcp-server.git
cd junos-mcp-server
2

Install Python dependencies

Install required Python packages. Using uv is recommended for environment isolation, but pip also works.

pip install -r requirements.txt
# or with uv:
uv pip install -r requirements.txt
3

Create a devices.json file

Define your Junos devices in a JSON file. SSH key authentication is strongly recommended over passwords. Each device entry needs a name, IP, port, username, and auth block.

{
  "router-1": {
    "ip": "10.0.1.1",
    "port": 22,
    "username": "admin",
    "auth": {
      "type": "ssh_key",
      "private_key_path": "/path/to/key.pem"
    }
  },
  "router-2": {
    "ip": "10.0.1.2",
    "port": 22,
    "username": "admin",
    "auth": {
      "type": "password",
      "password": "s3cr3t"
    }
  }
}
4

Start the MCP server

Launch the server in stdio transport mode (used by most desktop MCP clients). Adjust JUNOS_TIMEOUT if commands take longer than the default to complete.

python3.11 jmcp.py -f devices.json -t stdio
# Optional: set timeout
export JUNOS_TIMEOUT=60
python3.11 jmcp.py -f devices.json -t stdio
5

Configure your MCP client

Add the server to your MCP client configuration file. The command should point to your Python executable and the jmcp.py script with the -f flag referencing your devices file.

{
  "mcpServers": {
    "junos": {
      "command": "python3.11",
      "args": ["/path/to/junos-mcp-server/jmcp.py", "-f", "/path/to/devices.json", "-t", "stdio"],
      "env": {
        "JUNOS_TIMEOUT": "30"
      }
    }
  }
}
6

(Optional) Set up operational guardrails

Create block.cfg to list configuration patterns the LLM must never commit, and block.cmd to block dangerous operational commands. These files are read at startup and enforced at runtime.

# block.cmd — one command pattern per line
request system reboot
request system halt
delete chassis

# block.cfg — one config pattern per line
delete security

Junos Examples

Client configuration

Minimal Claude Desktop config to connect to the Junos MCP Server in stdio mode with a device mapping file.

{
  "mcpServers": {
    "junos": {
      "command": "python3.11",
      "args": ["/home/user/junos-mcp-server/jmcp.py", "-f", "/home/user/devices.json", "-t", "stdio"],
      "env": {
        "JUNOS_TIMEOUT": "30"
      }
    }
  }
}

Prompts to try

Example natural-language prompts to use with the Junos MCP Server once connected.

- "List all available Junos routers in my device inventory."
- "Show the running configuration on router-1."
- "Execute 'show interfaces terse' on router-2 and summarize interface states."
- "What are the differences between the candidate and active configuration on router-1?"
- "Show device facts (model, serial number, OS version) for router-1."

Troubleshooting Junos

SSH connection refused or timeout when the server tries to connect to a device

Verify the device IP and port 22 are reachable from your machine with 'ssh [email protected]'. Check that the private_key_path in devices.json points to an actual key file and that the key is authorized on the device. Increase JUNOS_TIMEOUT if the device is slow to respond.

Server starts but the MCP client shows no tools available

Confirm the transport is set to 'stdio' (-t stdio) and that the Python path in the client config is correct. Run 'python3.11 jmcp.py -f devices.json -t stdio' manually in a terminal and check for import errors or missing packages.

LLM attempts a command that is blocked by block.cmd

The server will return an error stating the command is blocked. Review your block.cmd file — each line is matched against the operational command. Adjust the patterns if a legitimate command is being incorrectly blocked.

Frequently Asked Questions about Junos

What is Junos?

Junos is a Model Context Protocol (MCP) server that enables llm interactions with juniper junos network devices, allowing natural language access to device configuration, monitoring, and management operations through secure ssh connections. It connects AI assistants to external tools and data sources through a standardized interface.

How do I install Junos?

Follow the installation instructions on the Junos GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.

Which AI clients work with Junos?

Junos works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is Junos free to use?

Yes, Junos is open source and available under the Apache 2.0 license. You can use it freely in both personal and commercial projects.

Browse More Developer Tools MCP Servers

Explore all developer tools servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "junos-mcp-server": { "command": "npx", "args": ["-y", "junos-mcp-server"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use Junos?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides