junos-mcp: Instructions file for Claude Code

CLAUDE.md

junos-mcp CLAUDE.md is an instructions file for Claude Code from shigechika/junos-mcp. It costs 3,668 tokens per session, scanned A, original, Apache-2.0.

Project instructions for junos-mcp, an MCP server that exposes Juniper network-device operations to AI assistants. They describe the Python codebase, its modules, supported connection methods, dependencies, and tests.

In plain words
What is it for?
Use them when asking Claude Code to work on the shigechika/junos-mcp repository. They are useful for navigating the file structure and checking changes with the project’s stated tests and tools.
Why use it?
They provide the background an AI coding assistant needs to understand the repository before editing it. This reduces confusion about which files handle connections, server tools, packaging, and validation.

Instructions file for Claude Code

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

This is shigechika/junos-mcp's own configuration. It tells Claude Code how to work on junos-mcp 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 configures →

Reuse

Borrowing it

Nothing to install: this file belongs to shigechika/junos-mcp. 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/shigechika/junos-mcp/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/shigechika/junos-mcp

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 CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/shigechika/junos-mcp/claude-md.svg)](https://agentmods.dev/instructions/shigechika/junos-mcp/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/shigechika/junos-mcp/claude-md"><img src="https://agentmods.dev/badge/instructions/shigechika/junos-mcp/claude-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 3,668 This file is loaded in full into every session.
When invoked 3,668 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
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.03668 $0.03668
Opus 5 $0.01834 $0.01834
Sonnet 5 $0.00734 $0.00734
Haiku 4.5 $0.00367 $0.00367

Measured 5d ago against content hash 00b4e3eb186c, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

junos-mcp 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 · 177 lines

How it starts

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

CLAUDE.md

このファイルはClaude Codeがリポジトリを理解するためのコンテキストを提供します。

プロジェクト概要

junos-mcpは、junos-ops の機能を MCP (Model Context Protocol) サーバーとして公開するパッケージです。Claude Desktop、Claude Code などの MCP 対応 AI アシスタントから Juniper Networks デバイスの操作が可能になります。

  • junos-ops: CLI ツール + ライブラリ(人間が直接使う)
  • junos-mcp: junos-ops を MCP サーバーとして公開(AI アシスタントが使う)

技術スタック

  • 言語: Python 3(3.12以上)
  • 主要ライブラリ: MCP Python SDK(FastMCP)、junos-ops(junos-eznc)
  • トランスポート: STDIO(デフォルト)または Streamable HTTP(--transport で選択、JSON-RPC)
  • パッケージ管理: pyproject.toml(pip installable)
  • テスト: pytest + モック
  • ライセンス: Apache License 2.0

ファイル構成

junos_mcp/
├── __init__.py         # パッケージ定義、__version__
├── __main__.py         # python -m junos_mcp 対応
├── pool.py             # per-host NETCONF 接続プール(ConnectionPool、get_pool)
└── server.py           # FastMCP サーバー定義、24ツール実装
tests/
├── __init__.py
├── test_pool.py                # 27 ユニットテスト(ConnectionPool)
├── test_server.py              # 128 ユニットテスト
└── test_version_consistency.py # 2 ユニットテスト(バージョン整合性)
pyproject.toml          # パッケージメタデータ、依存関係
LICENSE                 # Apache License 2.0
README.md               # 英語版
README.ja.md            # 日本語版

モジュール構成

pool.py — 接続プール

  • ConnectionPool — per-host NETCONF 接続プール。acquire(hostname, config_path) context manager で checkout/checkin。per-host threading.Lock を操作全体で保持し PyEZ Device のスレッドセーフ問題を回避。アイドルタイムアウト超過・dev.connected==False で自動退場・再接続。
  • PoolConnectionError — 接続失敗時に acquire() が raise する例外。
  • get_pool() — モジュールレベルシングルトンを lazy init して返す。JUNOS_MCP_POOL=0None を返す(プール無効)。
  • 環境変数: JUNOS_MCP_POOL(無効化)・JUNOS_MCP_POOL_IDLE(アイドルタイムアウト秒、デフォルト 60)・JUNOS_MCP_POOL_CONNECT_ATTEMPTS(一過性接続失敗のリトライ回数、デフォルト 2=1 回リトライ)・JUNOS_MCP_POOL_CONNECT_DELAY(リトライ間隔秒、デフォルト 1.0)
  • 接続リトライの不変条件(PR #37): リトライ対象は _RETRYABLE_CONNECT_ERRORSConnectError / ConnectTimeoutError のみ)に限定。ConnectAuthError(認証失敗)は意図的に除外 — 誤った資格情報でリトライするとアカウントロックの恐れがあるため即座に fail-fast する。リトライの sleep は per-host entry.lock を保持したまま実行する(設計どおり — 同一ホストの呼び出しのみをブロックし他ホストは妨げない)

Read the full file on GitHub · 177 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 First seen · 177 lines · 3,668 tokens per session scan A 00b4e3eb186c

Subscribe to this mod's changes

junos-mcp CLAUDE.md is an instructions file published in the GitHub repository shigechika/junos-mcp (0 stars, last pushed 3d ago), licensed Apache-2.0. It adds 3,668 tokens to every session, about $0.0183 per session on Opus 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-31.

Related

Other instructions, from other repositories

vibe-coding-prompt-template backend.instructions.md

Instructions for KhazP/vibe-coding-prompt-template: Read AGENTS.md, agentdocs/techstack.md, and agentdocs/codepatterns.md.

KhazP/vibe-coding-prompt-template · 139 tokens

next.js AGENTS.md

AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,296 tokens

codex AGENTS.md

AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.

openai/codex · 5,182 tokens

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 6,785 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).

microsoft/vscode · 5,001 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,469 tokens