sheridan-lab-jack
sheridan-lab-jack — 网络 MCP 服务器
一个模型上下文协议 (MCP) 服务器,为运行在 ContainerLab 中的 Nokia SR Linux 设备提供 6 个网络管理工具。专为与 Claude Code AI 智能体配合使用而设计。
架构
┌──────────────┐ MCP (stdio) ┌──────────────────┐ SSH ┌──────────────┐
│ Claude Code │ ◄──────────────────► │ sheridan-lab-jack │ ◄──────────► │ Nokia SR │
│ (AI Agent) │ │ (MCP Server) │ │ Linux │
└──────────────┘ └──────────────────┘ │ (ContainerLab)│
└──────────────┘工具(共 6 个)
读取工具 (5)
工具 | 描述 |
| 返回主机名、软件版本、机箱类型、运行时间 |
| 列出所有接口及其管理/操作状态和 IP 地址 |
| 显示完整的路由表 |
| 获取运行配置(完整或按部分) |
| 列出所有 VRF/网络实例及其接口 |
写入工具 (1)
工具 | 描述 |
| 设置接口的 IP 地址、管理状态和描述 |
先决条件
Linux (推荐 Ubuntu 20.04+)
Docker (20.10+)
ContainerLab (0.44+)
Python 3.10+
Claude Code CLI (需要 Anthropic Pro 订阅)
sshpass (
sudo apt install sshpass)
快速入门
1. 安装 ContainerLab
sudo bash -c "$(curl -sL https://get.containerlab.dev)"2. 启动实验环境
cd sheridan-lab-jack
sudo containerlab deploy --topo topology.yml等待约 60 秒让 SR Linux 完全启动。通过以下命令验证:
sudo docker ps # should show clab-sheridan-lab-jack-srl running3. 安装 Python 依赖
pip install -r requirements.txt
sudo apt install sshpass -y4. 测试 SSH 连接
sshpass -p 'NokiaSrl1!' ssh -o StrictHostKeyChecking=no admin@clab-sheridan-lab-jack-srl -- "info from state /system information"5. 连接 Claude Code
cd sheridan-lab-jack
claudeClaude Code 会自动从项目目录读取 .mcp.json。进入 Claude Code 后,通过以下命令验证:
> use get_device_info to check the device环境变量
变量 | 默认值 | 描述 |
|
| SR Linux 容器的主机名或 IP |
|
| SSH 用户名 |
|
| SSH 密码 |
凭据绝不会硬编码在服务器代码中。 它们在运行时从环境变量读取,并通过 .mcp.json 传递。
输入验证
所有写入工具在执行前都会验证输入:
IP 地址:点分十进制正则表达式验证
前缀长度:范围检查 (0-32)
接口名称:SR Linux 格式模式匹配 (
ethernet-X/Y,lo0,mgmt0,system0)主机名:符合 RFC 标准的字母数字 + 连字符,1-63 个字符
描述:字母数字及基本标点符号,最多 80 个字符
配置部分名称:仅限字母数字和连字符
清理
sudo containerlab destroy --topo topology.ymlClaude Code 会话示例
You: get device info
Claude: [calls get_device_info] The device is a Nokia SR Linux running version...
You: show me all interfaces
Claude: [calls get_interfaces] Here are the interfaces...
You: configure ethernet-1/1 with IP 192.168.50.1/24 and description "uplink"
Claude: [calls configure_interface] Successfully configured ethernet-1/1...
You: verify the change by showing interfaces again
Claude: [calls get_interfaces] Confirmed — ethernet-1/1 now has IP 192.168.50.1/24...许可证
MIT
This server cannot be installed
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/JackG27/sheridan-lab-jack'
If you have feedback or need assistance with the MCP directory API, please join our Discord server