
EOS MCP
io.github.shigechika由 GitHub 账号 shigechika 发布v1.4.0更新于 Oct 25, 2026
MCP server for Arista EOS device operations via eAPI
概览
本地 MCP 服务器,让 AI 助手通过 eAPI 查看和配置 Arista EOS 交换机,从 show 命令到受保护的配置下发。
- 可以做什么
- 检查服务器健康状态、列出已登记设备,并读取设备信息、版本和运行时长,支持按标签筛选和批量并行查询。在单台或多台设备上执行 enable 模式命令,支持并行。获取 running-config、查看相对回滚检查点的配置差异、列出 configure 会话。通过带提交定时器的 configure 会话下发配置,随后确认或中止待提交会话。收集 tech-support 输出,并生成多设备日常健康简报,涵盖环境、errdisabled 端口、运行时长、MLAG 和近期 syslog 告警。
- 适用场景
- 适合让助手协助运维一批 Arista EOS 交换机:收集设备信息和配置、跨设备执行 show 命令,或在提交前先审阅差异再暂存配置变更。
- 运行要求
- 本地 Python 包(Python 3.10 及以上),通过 stdio 运行;Claude Code 插件用 uvx 启动,因此 uvx 需在 PATH 中。需要 config.ini 保存各设备的 eAPI 凭据,查找顺序为 EOS_MCP_CONFIG 环境变量、./config.ini、~/.config/eos-mcp/config.ini。目标设备需启用 eAPI,并可通过 HTTPS 访问 443 端口。
安装
在 SourceWeft 中
- 打开 控制台中的 EOS MCP,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
eos-mcp
English | 日本語
MCP server for Arista EOS device operations via eAPI.
Exposes EOS show commands, running-config retrieval, configuration push (via configure session with commit timer), and tech-support collection to MCP-compatible AI assistants.
Documentation: https://shigechika.github.io/eos-mcp/
Installation
Configuration
Copy config.ini.example to ~/.config/eos-mcp/config.ini and fill in credentials:
Config file discovery order:
EOS_MCP_CONFIGenvironment variable./config.ini(current directory)~/.config/eos-mcp/config.ini
(Individual MCP tool calls may also override the path via a config_path
parameter.)
Write operations
Three tools change device state through a guarded path:
Give the config.ini account for a device a lower-privilege, show-only role
and these three tools fail against the EOS API instead of writing; every
read-only tool for that device keeps working.
run_command, run_commands, run_command_batch, and
run_commands_batch are not restricted to show ... commands, despite
being documented and grouped as command runners. Nothing in the server
validates or whitelists the command text — it is passed to the eAPI Command
API verbatim — so these tools can execute arbitrary enable-mode EOS
commands, including configure terminal ... or reload, on any configured
device (a single host, or fleet-wide via tags in the _batch variants).
This is gated by the same EOS account privilege as push_config, but
without push_config's dry_run / commit-timer safety net — a de facto
second write path worth remembering when deciding how privileged a device's
config.ini account should be.
Usage
Claude Code (plugin)
This repository doubles as a single-plugin marketplace, so Claude Code can install the server for you:
The plugin launches uvx eos-mcp and reads EOS_MCP_CONFIG, the same
variable described in Configuration. Leave it unset and
the server falls through to its normal discovery order (./config.ini,
then ~/.config/eos-mcp/config.ini). /plugin install only wires up the
server process — it cannot create the config.ini file or the per-device
eAPI credentials it holds; that file must already exist on the machine
running the plugin before any tool but health_check will succeed.
uvx must be on the PATH of the process that runs Claude Code — a login
shell usually has it, but a GUI-launched app may not; install
uv system-wide if the plugin fails to start.
Claude Code (manual)
In .mcp.json:
Add "env": { "EOS_MCP_CONFIG": "..." } only if config.ini is not at one
of the default discovery locations above.
Claude Desktop
Add the same entry to claude_desktop_config.json.
Codex
Add --env EOS_MCP_CONFIG=... (before --) only if config.ini is not at
one of the default discovery locations above.
Any other MCP client that launches stdio servers works the same way: give it
eos-mcp as the command.
From a shell
Tools
Development
Live smoke test
Unit tests check logic against fixtures; they cannot tell you that a tool has
stopped returning real data. scripts/smoke_test.py runs every registered
tool against the configured devices and fails on empty, malformed or error
answers:
- Read-only.
push_config,confirm_config_sessionandabort_config_sessionare skipped by name, and a test enforces that.collect_tech_supportis skipped too — it changes nothing, but it is minutes of device CPU for an answer no assertion would read. The command-running tools are exercised withshow version: they accept enable-mode commands in general, and a smoke test must not be the thing that types one that matters. - No payloads in the report. Tool names and statuses only; error text is redacted too, since every error here is prefixed with the device it came from and the payloads are configuration.
- Nothing estate-specific in the specs. The device the per-host tools need is discovered at run time from the configured inventory, and skipped when it is empty. Two tests keep it that way: one refuses those parameters as literals, the other bans anything address-shaped anywhere in the file, because this repository is public.
- Every probe refuses the
Error (<host>): ...line these tools return in place of raising — otherwise an unreachable device would read as a successful call. - CI enforces the cheap half: a tool registered without a probe spec fails the
build (
tests/test_smoke_probes.py), so adding a tool forces the question "how would we know it works?". scripts/smoke_harness.pyis the engine and holds no EOS knowledge: it is kept identical across the servers that share it, so fix engine bugs once and sync the file rather than patching this copy.
Requirements
- Python >= 3.10
- Arista EOS with eAPI enabled (
management api http-commands) - Network access to port 443 (HTTPS) on target devices
License
Apache-2.0
来源:README.md,提交 e7bb2a5
工具
0版本历史
2- v1.4.0最新Sep 29, 2026
- v1.3.0Sep 16, 2026
评分
已满足适用检查项的 40%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分
请在仓库或注册中心条目中声明许可证。