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.
Installation
pip install eos-mcp
Configuration
Copy config.ini.example to ~/.config/eos-mcp/config.ini and fill in credentials:
[DEFAULT]
username = admin
password = yourpassword
transport = https
verify = false
[switch1.example.com]
tags = main,dc1
[switch2.example.com]
tags = main,dc1
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.)
Usage
# Verify config and list devices
eos-mcp --check
# Test connectivity to a specific host
eos-mcp --check --check-host switch1.example.com
# Start MCP server (stdio transport)
eos-mcp
Tools
| Tool | Description |
|---|---|
health_check |
Report server version and config status (lightweight; does NOT connect to devices) |
get_router_list |
List registered devices (optional tag filter) |
get_device_facts |
Return structured facts for one device (model, serial, EOS version, uptime, memory) |
get_device_facts_batch |
Return device facts for multiple devices in parallel |
get_version |
Return EOS version string (quick connectivity check) |
run_command |
Run a single enable-mode command on one device |
run_commands |
Run multiple enable-mode commands on one device |
run_command_batch |
Run an enable-mode command on multiple devices in parallel |
run_commands_batch |
Run multiple enable-mode commands on multiple devices in parallel |
get_config |
Retrieve running-config |
get_config_diff |
Show config diff vs rollback checkpoint |
list_config_sessions |
List configure sessions and their state |
push_config |
Push config via configure session (dry_run=True by default) |
confirm_config_session |
Confirm a pending commit timer session |
abort_config_session |
Abort a pending session |
collect_tech_support |
Collect show tech-support output |
daily_brief |
Health check (environment, errdisabled, uptime, MLAG, recent syslog alerts) across multiple devices |
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:
# uses the same inventory file as the server (EOS_MCP_CONFIG)
uv run python scripts/smoke_test.py
uv run python scripts/smoke_test.py --only facts --traceback
- 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
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file eos_mcp-1.2.1.tar.gz.
File metadata
- Download URL: eos_mcp-1.2.1.tar.gz
- Upload date:
- Size: 30.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
82d2b023d3e7b091b05f98cc46e3c2a6ac361956d30d40669cd32fef2ebd4a12
|
|
| MD5 |
548bae05355b0657dcd5a02f0700b23e
|
|
| BLAKE2b-256 |
df1a2a6c0b433a1003c13283e2f09bccd55e56cec9d61e73ec1fd007c8c36c22
|
Provenance
The following attestation bundles were made for eos_mcp-1.2.1.tar.gz:
Publisher:
release.yml on shigechika/eos-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
eos_mcp-1.2.1.tar.gz -
Subject digest:
82d2b023d3e7b091b05f98cc46e3c2a6ac361956d30d40669cd32fef2ebd4a12 - Sigstore transparency entry: 2418450994
- Sigstore integration time:
-
Permalink:
shigechika/eos-mcp@3afeef2b19ae22a36afd6bd22e5e6cdb33fdc595 -
Branch / Tag:
refs/tags/v1.2.1 - Owner: https://github.com/shigechika
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@3afeef2b19ae22a36afd6bd22e5e6cdb33fdc595 -
Trigger Event:
release
-
Statement type:
File details
Details for the file eos_mcp-1.2.1-py3-none-any.whl.
File metadata
- Download URL: eos_mcp-1.2.1-py3-none-any.whl
- Upload date:
- Size: 18.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e8fc0491907053aa8bd00ce38d15b0e1b6502e464d28e902ea509e3016fd382f
|
|
| MD5 |
c87c97850a3def2795d8d21cd6413f79
|
|
| BLAKE2b-256 |
689e5d1d2be8c46a0a1da3751b4b343bb948afee51e1beec6b0870f7cabcc891
|
Provenance
The following attestation bundles were made for eos_mcp-1.2.1-py3-none-any.whl:
Publisher:
release.yml on shigechika/eos-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
eos_mcp-1.2.1-py3-none-any.whl -
Subject digest:
e8fc0491907053aa8bd00ce38d15b0e1b6502e464d28e902ea509e3016fd382f - Sigstore transparency entry: 2418451122
- Sigstore integration time:
-
Permalink:
shigechika/eos-mcp@3afeef2b19ae22a36afd6bd22e5e6cdb33fdc595 -
Branch / Tag:
refs/tags/v1.2.1 - Owner: https://github.com/shigechika
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@3afeef2b19ae22a36afd6bd22e5e6cdb33fdc595 -
Trigger Event:
release
-
Statement type: