An MCP (Model Context Protocol) server that exposes hier_config's network configuration comparison and remediation capabilities to AI assistants like Claude.
- Configuration Parsing: Parse network device configurations into hierarchical structures
- Configuration Comparison: Compare running vs intended configurations
- Remediation Generation: Generate commands to bring devices into compliance
- Rollback Generation: Generate commands to revert changes
- Future State Prediction: Predict configuration state after applying changes
- Unified Diff: Generate diffs between configurations
- CISCO_IOS - Cisco IOS (classic IOS for routers and switches)
- CISCO_NXOS - Cisco NX-OS (Nexus switches)
- CISCO_XR - Cisco IOS-XR (carrier-grade routers)
- ARISTA_EOS - Arista EOS (data center switches)
- ARUBA_AOSCX - Aruba AOS-CX
- HP_COMWARE5 - HP Comware 5
- HP_PROCURVE - HP ProCurve
- HUAWEI_VRP - Huawei VRP
- JUNIPER_JUNOS - Juniper Junos
- NOKIA_SRL - Nokia SR Linux
- VYOS - VyOS
- FORTINET_FORTIOS - Fortinet FortiOS
- GENERIC - Platform-agnostic parsing
# Clone the repository
git clone https://github.com/jtdub/hier-config-mcp.git
cd hier-config-mcp
# Install dependencies with Poetry
poetry install# Run the MCP server
poetry run hier-config-mcp
# Or use the MCP development server with inspector
poetry run mcp dev hier_config_mcp/server.pyAdd to your Claude Desktop configuration file (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):
{
"mcpServers": {
"hier-config": {
"command": "poetry",
"args": [
"-C",
"/path/to/hier-config-mcp",
"run",
"hier-config-mcp"
]
}
}
}List all supported network platforms.
Parse network device configuration text into a hierarchical format.
Parameters:
platform: Network platform name (e.g., "CISCO_IOS")config: Configuration text to parse
Compare running configuration against intended configuration and generate both remediation and rollback commands.
Parameters:
platform: Network platform namerunning_config: Current device configurationintended_config: Desired configuration
Returns: Object with remediation and rollback commands
Generate commands to transform running config to intended config.
Parameters:
platform: Network platform namerunning_config: Current configurationintended_config: Target configuration
Generate commands to revert from intended config back to running config.
Parameters:
platform: Network platform namerunning_config: Original configurationintended_config: Configuration to rollback from
Predict the configuration state after applying changes.
Parameters:
platform: Network platform namecurrent_config: Current configurationchange_config: Changes to apply
Generate a unified diff between two configurations.
Parameters:
platform: Network platform nameconfig_a: First configurationconfig_b: Second configurationlabel_a: Label for first config (optional)label_b: Label for second config (optional)
Full documentation — user, administrator, developer, and maintainer guides — lives in docs/ and is built with mkdocs:
poetry run mkdocs serveThis repo follows the same development standards as hier_config: ruff (select = ["ALL"], preview, line length 88), mypy strict, pyright strict, pylint, yamllint, and flynt, with a 95% test coverage floor. All checks run in parallel via scripts/build.py.
A Docker-based workflow modeled on Nautobot app development is available via invoke — see docs/dev/docker-development.md:
invoke build # build the dev image
invoke start # start the dev container
invoke tests # run everything CI runs, inside the container
invoke destroy # tear down# Full lint + test suite (what CI runs)
poetry run python scripts/build.py lint-and-test
# Lint only
poetry run python scripts/build.py lint
# Auto-fix formatting and fixable lint findings
poetry run python scripts/build.py lint --fix
# Tests with coverage (95% required)
poetry run python scripts/build.py pytest --coverage
# Tests directly
poetry run pytest# One-time setup; the hook runs the full lint suite before each commit
poetry run pre-commit installReleases are driven by two GitHub Actions workflows (admin permission required):
- Run the prepare release workflow (
Actions→prepare release→Run workflow), picking the branch to release from in the branch dropdown and the version bump type (major,minor,patch, orprerelease). It bumps the version withpoetry version, opens achore(release): prepare X.Y.ZPR against the chosen branch, and creates a draft GitHub release taggedvX.Y.Z. - Merge the release PR.
- Publish the draft release. Publishing triggers the release workflow, which builds and publishes the package to PyPI automatically (
poetry publish --build).
hier-config-mcp/
├── pyproject.toml
├── README.md
├── mkdocs.yml
├── docs/
│ ├── index.md
│ ├── user/
│ ├── admin/
│ └── dev/
├── hier_config_mcp/
│ ├── __init__.py
│ ├── py.typed
│ └── server.py
└── tests/
├── __init__.py
└── test_server.py
MIT