Loading...
Loading...
Compare original and translation side by side
| Field | Value |
|---|---|
| Repository | Juniper/junos-mcp-server |
| Transport | stdio (default for CLI), streamable-http (for IDE) |
| Python | 3.10+ (3.11 recommended) |
| Protocol | SSH → NETCONF → PyEZ (junos-eznc) |
| Dependencies | |
| Install | |
| Entry Point | |
| Container | |
| 字段 | 取值 |
|---|---|
| 代码仓库 | Juniper/junos-mcp-server |
| 传输方式 | stdio(CLI默认方式), streamable-http(适用于IDE) |
| Python版本 | 3.10+(推荐3.11) |
| 协议 | SSH → NETCONF → PyEZ (junos-eznc) |
| 依赖项 | |
| 安装方式 | |
| 启动入口 | |
| 容器化部署 | |
devices.json{
"core-rtr-01": {
"ip": "10.0.0.1",
"port": 22,
"username": "netops",
"auth": {
"type": "ssh_key",
"private_key_path": "/home/user/.ssh/junos_key"
}
},
"edge-rtr-02": {
"ip": "10.0.0.2",
"port": 22,
"username": "admin",
"auth": {
"type": "password",
"password": "changeme"
}
}
}ssh_configdevices.json{
"core-rtr-01": {
"ip": "10.0.0.1",
"port": 22,
"username": "netops",
"auth": {
"type": "ssh_key",
"private_key_path": "/home/user/.ssh/junos_key"
}
},
"edge-rtr-02": {
"ip": "10.0.0.2",
"port": 22,
"username": "admin",
"auth": {
"type": "password",
"password": "changeme"
}
}
}ssh_config| Variable | Default | Purpose |
|---|---|---|
| | Path to device inventory JSON |
| | Default command timeout in seconds |
| 变量名 | 默认值 | 用途 |
|---|---|---|
| | 设备清单JSON文件的路径 |
| | 默认命令超时时间(秒) |
| Tool | Parameters | Description |
|---|---|---|
| — | List all available Junos routers (passwords/keys filtered from output) |
| | Add a new Junos device interactively (streamable-http only) |
| | Reload the device dictionary from a new JSON file |
| 工具 | 参数 | 描述 |
|---|---|---|
| — | 列出所有可用的Junos路由器(输出会自动过滤密码/密钥信息) |
| | 交互式添加新的Junos设备(仅支持streamable-http传输方式) |
| | 从新的JSON文件重新加载设备字典 |
| Tool | Parameters | Description |
|---|---|---|
| | Execute a JunOS CLI command on a single router |
| | Execute the same command on multiple routers in parallel |
| 工具 | 参数 | 描述 |
|---|---|---|
| | 在单台路由器上执行JunOS CLI命令 |
| | 在多台路由器上并行执行相同命令 |
| Tool | Parameters | Description |
|---|---|---|
| | Retrieve the full running configuration ( |
| | Compare current config against a rollback version (1-49) |
| | Load and commit configuration (formats: set, text, xml) |
| 工具 | 参数 | 描述 |
|---|---|---|
| | 获取完整的运行配置( |
| | 对比当前配置与指定回滚版本(1-49)的差异 |
| | 加载并提交配置(支持格式:set、text、xml) |
| Tool | Parameters | Description |
|---|---|---|
| | Render Jinja2 template with YAML variables; optionally apply to one or many routers with dry-run support |
| | Gather device facts: hostname, model, serial, version, uptime, RE info |
| 工具 | 参数 | 描述 |
|---|---|---|
| | 使用YAML变量渲染Jinja2模板;可选择将模板应用到单台或多台路由器,支持预演模式 |
| | 采集设备信息:主机名、型号、序列号、版本、运行时长、RE信息 |
block.cmdblock.cmdrequest system rebootrequest system haltrequest system power-cyclerequest system power-offrequest system zeroizeblock.cmdrequest system rebootrequest system haltrequest system power-cyclerequest system power-offrequest system zeroizeblock.cmdblock.cfgblock.cfgset system root-authenticationset system login user ... authenticationblock.cfgset system root-authenticationset system login user ... authenticationblock.cfgget_router_listget_router_listget_router_list → inventory all available Junos routers
→ gather_device_facts(router) per device → hostname, model, serial, version, uptime
→ Cross-reference with NetBox/Nautobot → flag discrepancies
→ GAITget_router_list → 盘点所有可用的Junos路由器
→ 为每台设备执行gather_device_facts(router) → 获取主机名、型号、序列号、版本、运行时长
→ 与NetBox/Nautobot交叉核对 → 标记不一致项
→ 记录到GAITget_router_list → identify target routers
→ execute_junos_command_batch(routers, "show chassis alarms") → alarm check
→ execute_junos_command_batch(routers, "show system processes extensive") → CPU/memory
→ execute_junos_command_batch(routers, "show interfaces terse") → interface status
→ execute_junos_command_batch(routers, "show bgp summary") → BGP peer health
→ Severity-sort findings → GAITget_router_list → 确定目标路由器
→ 执行execute_junos_command_batch(routers, "show chassis alarms") → 告警检查
→ 执行execute_junos_command_batch(routers, "show system processes extensive") → CPU/内存状态
→ 执行execute_junos_command_batch(routers, "show interfaces terse") → 接口状态
→ 执行execute_junos_command_batch(routers, "show bgp summary") → BGP对等体健康状态
→ 按严重程度排序检查结果 → 记录到GAITget_router_list → select target routers
→ get_junos_config(router) → retrieve running config
→ junos_config_diff(router, version=1) → check for uncommitted or recent changes
→ Compare against golden config templates → flag deviations
→ GAITget_router_list → 选择目标路由器
→ 执行get_junos_config(router) → 获取运行配置
→ 执行junos_config_diff(router, version=1) → 检查未提交或近期变更
→ 与黄金配置模板对比 → 标记偏差项
→ 记录到GAITServiceNow CR must be in Implement state
→ get_junos_config(router) → baseline current config
→ render_and_apply_j2_template(template, vars, router, dry_run=true) → preview changes
→ render_and_apply_j2_template(template, vars, router, apply_config=true, commit_comment="CR-12345") → apply
→ get_junos_config(router) → verify post-change config
→ execute_junos_command(router, "show bgp summary") → verify protocol health
→ GAITServiceNow变更请求必须处于实施状态
→ 执行get_junos_config(router) → 获取当前配置基线
→ 执行render_and_apply_j2_template(template, vars, router, dry_run=true) → 预览变更
→ 执行render_and_apply_j2_template(template, vars, router, apply_config=true, commit_comment="CR-12345") → 应用配置
→ 执行get_junos_config(router) → 验证变更后的配置
→ 执行execute_junos_command(router, "show bgp summary") → 验证协议健康状态
→ 记录到GAITget_router_list → filter to target group (e.g., all edge routers)
→ execute_junos_command_batch(routers, "show version") → version inventory
→ execute_junos_command_batch(routers, "show ospf neighbor") → protocol health
→ Aggregate results → severity-sort → GAITget_router_list → 筛选目标设备组(如所有边缘路由器)
→ 执行execute_junos_command_batch(routers, "show version") → 版本盘点
→ 执行execute_junos_command_batch(routers, "show ospf neighbor") → 协议健康状态
→ 汇总结果 → 按严重程度排序 → 记录到GAITjunos_config_diff(router, version=1) → compare against last committed config
→ junos_config_diff(router, version=2) → compare against version before that
→ Identify what changed, when, and the impact
→ execute_junos_command(router, "show system commit") → commit history
→ GAIT执行junos_config_diff(router, version=1) → 与上一次提交的配置对比
→ 执行junos_config_diff(router, version=2) → 与更早版本的配置对比
→ 确定变更内容、时间及影响
→ 执行execute_junos_command(router, "show system commit") → 查看提交历史
→ 记录到GAIT| Skill | Integration |
|---|---|
| pyats-network | JunOS MCP for Juniper devices, pyATS MCP for Cisco devices — unified multi-vendor fleet management |
| netbox-reconcile | Cross-reference JunOS device facts (model, serial, version) against NetBox source of truth |
| nautobot-sot | Same as NetBox — validate Juniper device IPAM data in Nautobot |
| infrahub-sot | Cross-reference Infrahub node data with Juniper device inventory |
| itential-automation | Itential workflows can orchestrate JunOS config deployments; Junos command templates complement Itential's |
| servicenow-change-workflow | Gate all JunOS config commits behind ServiceNow Change Requests |
| gait-session-tracking | Every JunOS command, config push, and batch operation logged in GAIT |
| nso-device-ops | NSO for multi-vendor orchestration, JunOS MCP for direct Juniper device access |
| te-network-monitoring | Validate network health via ThousandEyes after JunOS config changes |
| fmc-firewall-ops | Correlate Juniper ACL/firewall-filter config with Cisco FMC security policies |
| subnet-calculator | VLSM planning for Juniper interface addressing |
| nvd-cve | Scan Junos OS versions against NVD vulnerability database |
| 技能 | 集成方式 |
|---|---|
| pyats-network | JunOS MCP用于Juniper设备管理,pyATS MCP用于Cisco设备管理——实现统一的多厂商设备集群管理 |
| netbox-reconcile | 将JunOS设备信息(型号、序列号、版本)与NetBox数据源交叉核对 |
| nautobot-sot | 与NetBox类似——验证Nautobot中Juniper设备的IPAM数据 |
| infrahub-sot | 将Infrahub节点数据与Juniper设备清单交叉核对 |
| itential-automation | Itential工作流可编排JunOS配置部署;Junos命令模板可补充Itential的模板库 |
| servicenow-change-workflow | 所有JunOS配置提交必须经过ServiceNow变更请求的审批 |
| gait-session-tracking | 所有JunOS命令执行、配置推送、批量操作都会记录到GAIT中 |
| nso-device-ops | NSO用于多厂商编排,JunOS MCP用于直接访问Juniper设备 |
| te-network-monitoring | JunOS配置变更后,通过ThousandEyes验证网络健康状态 |
| fmc-firewall-ops | 将Juniper ACL/防火墙过滤配置与Cisco FMC安全策略关联分析 |
| subnet-calculator | 为Juniper接口地址规划提供VLSM计算支持 |
| nvd-cve | 扫描JunOS OS版本,对比NVD漏洞数据库 |
| Capability | JunOS MCP | pyATS MCP |
|---|---|---|
| Vendor | Juniper only | Cisco (IOS-XE, NX-OS, IOS-XR) |
| Protocol | NETCONF via PyEZ | SSH + Genie parsers |
| CLI Execution | | |
| Batch Operations | | |
| Config Retrieval | | |
| Config Push | | |
| Template Support | Built-in Jinja2 rendering + apply | External (Jinja2 → configure) |
| Config Diff | | Manual diff via show commands |
| Device Facts | | |
| Safety | | Built-in destructive command blocking |
| MCP Tools | 10 | 8 |
| 能力 | JunOS MCP | pyATS MCP |
|---|---|---|
| 支持厂商 | 仅Juniper | Cisco(IOS-XE、NX-OS、IOS-XR) |
| 协议 | 基于PyEZ的NETCONF | SSH + Genie解析器 |
| CLI执行 | | |
| 批量操作 | | |
| 配置获取 | | |
| 配置推送 | | |
| 模板支持 | 内置Jinja2渲染+应用 | 外部模板(Jinja2 → 配置) |
| 配置对比 | | 通过show命令手动对比 |
| 设备信息采集 | | |
| 安全机制 | | 内置破坏性命令拦截 |
| MCP工具数量 | 10个 | 8个 |
get_router_listget_junos_configload_and_commit_configdry_run=truerender_and_apply_j2_templateload_and_commit_configrender_and_apply_j2_template(apply_config=true)Implementexecute_junos_command_batchexecute_junos_commandcommit_commentget_junos_configblock.cmdblock.cfgget_router_listload_and_commit_configget_junos_configrender_and_apply_j2_templatedry_run=trueload_and_commit_configrender_and_apply_j2_template(apply_config=true)execute_junos_command_batchexecute_junos_commandcommit_commentget_junos_configblock.cmdblock.cfg