junos-mcp-server: Instructions file for Claude Code

CLAUDE.md

junos-mcp-server CLAUDE.md is an instructions file for Claude Code from Juniper/junos-mcp-server. It costs 1,267 tokens per session, scanned A, original, Apache-2.0.

Project instructions for an MCP server that lets an AI assistant work with Juniper Junos network devices. MCP, or Model Context Protocol, is a standard way for AI tools to connect to external systems.

In plain words
What is it for?
Use them when developing or operating the server, connecting it to Juniper equipment, running it through desktop or HTTP connections, or building its Docker image.
Why use it?
They give developers the commands and setup details needed to install, run, test, and package the server.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md. Also seen: mentions CLAUDE.md; mentions Claude Code.

This is Juniper/junos-mcp-server's own configuration. It tells Claude Code how to work on junos-mcp-server itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything junos-mcp-server configures →

Reuse

Borrowing it

Nothing to install: this file belongs to Juniper/junos-mcp-server. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/Juniper/junos-mcp-server/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/Juniper/junos-mcp-server

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for junos-mcp-server CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/juniper/junos-mcp-server/claude-md/github.svg)](https://agentmods.dev/instructions/juniper/junos-mcp-server/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/juniper/junos-mcp-server/claude-md"><img src="https://agentmods.dev/badge/instructions/juniper/junos-mcp-server/claude-md/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for junos-mcp-server CLAUDE.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/juniper/junos-mcp-server/claude-md"><img src="https://agentmods.dev/badge/instructions/juniper/junos-mcp-server/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,267 This file is loaded in full into every session.
When invoked 1,267 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.01267 $0.01267
Opus 5.5 $0.00507 $0.00507
Sonnet 5.5 $0.00253 $0.00253
Haiku 4.5 $0.00127 $0.00127

Measured 5d ago against content hash 4125e1960922, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

junos-mcp-server CLAUDE.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

CLAUDE.md · 104 lines

How it starts

The opening of the file, as written. The whole thing — 104 lines — stays where its author put it; the contents beside it link to each section on GitHub.

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

Project Overview

This is a Model Context Protocol (MCP) server for Juniper Junos network devices. It enables LLMs to interact with Juniper network equipment through a standardized interface using the FastMCP framework and Juniper's PyEZ library.

Key Commands

Running the Server

# Install dependencies
pip install -r requirements.txt

# Run with stdio transport (for Claude Desktop)
python3.11 jmcp.py -f devices.json -t stdio

# Run with streamable-http transport (for VSCode)
python3.11 jmcp.py -f devices.json -t streamable-http -H 127.0.0.1 -p 30030

# Docker build
docker build -t junos-mcp-server:latest .

# Docker run (stdio)
docker run --rm -it -v /path/to/devices.json:/app/config/devices.json junos-mcp-server:latest

# Docker run (streamable-http)
docker run --rm -it -v /path/to/devices.json:/app/config/devices.json -p 30030:30030 junos-mcp-server:latest python jmcp.py -f /app/config/devices.json -t streamable-http -H 0.0.0.0

Testing and Development

  • Run the unit tests with make test (or python -m unittest discover -s tests -v)
  • Code style is enforced with Black (configured in pyproject.toml); check with black --check . and auto-format with black .. CI runs Black and the unit tests (.github/workflows/ci.yml).
  • Live testing against devices requires a valid Junos device configuration in JSON format

Architecture

The server implements 10 MCP tools in jmcp.py:

  1. execute_junos_command - Execute arbitrary CLI commands on routers
  2. execute_junos_command_batch - Execute the same command on multiple routers in parallel
  3. execute_junos_pfe_command - Execute a PFE (packet forwarding engine) command on an FPC
  4. get_junos_config - Retrieve device configuration (uses show configuration | display inheritance no-comments)
  5. junos_config_diff - Compare configuration versions (rollback comparison)
  6. render_and_apply_j2_template - Render a Jinja2 template and load/commit it
  7. gather_device_facts - Collect device information using PyEZ facts
  8. get_router_list - List available routers from the configuration
  9. load_and_commit_config - Apply configuration changes (supports set/text/xml formats); always runs a commit check first, with optional dry_run and confirm_timeout_mins (commit confirmed)
  10. confirm_commit - Confirm a pending commit confirmed so the device does not roll back

Read the full file on GitHub · 104 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago Changed · +1 lines · +69 tokens per session 4125e1960922
  2. 2mo ago First seen · 103 lines · 1,198 tokens per session scan A 290710e32161

Subscribe to this mod's changes

junos-mcp-server CLAUDE.md is an instructions file published in the GitHub repository Juniper/junos-mcp-server (111 stars, last pushed 6d ago), licensed Apache-2.0. It adds 1,267 tokens to every session, about $0.0051 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

junos-mcp-server CLAUDE.md compared with instructions from other repositories

junos-mcp-server CLAUDE.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
junos-mcp-server CLAUDE.mdJuniper/junos-mcp-serverInstructions file1116d agoApache-2.0A1,267Claude Code
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA9,719GitHub Copilot
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA5,516GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143ktodayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149ktodayMITA4,680Codex, OpenCode
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA3,093GitHub Copilot
vscode model-prompts.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA2,022GitHub Copilot