netcfg-agent-mcp
Serveur MCP standalone pour netcfg-agent. Expose le code metier netcfg (inventaire Visio, preview deploy, topologie, terminal SSH live multi-vendor) comme tools MCP consommables par n importe quel client compatible (Claude Desktop, Gemini CLI 0.38+, Roo Code, Cline, Cursor, etc.).
Positionnement
Ce repo est le 4eme de la famille netcfg-agent :
- naarob/netcfg-agent : master, code metier complet (web + TUI + binaire PyInstaller)
- naarob/netcfg-agent-web : fork web-only
- naarob/netcfg-agent-tui : fork TUI-only
- naarob/netcfg-agent-mcp (ce repo) : fork serveur MCP standalone
Il n est pas un sous-ensemble fonctionnel du master mais une couche d exposition protocolaire par-dessus. Il depend du master pour le code metier.
Architecture (Phase 1 - Scenario 2)
+----------------------+ +--------------------+
| MCP client | | LaForge hub |
| (Claude/Gemini/Roo) | | 127.0.0.1:8766 |
+----------+-----------+ | (optionnel) |
| +----+---------------+
| Streamable HTTP | lib imports
| |
v v
+---------------------------------------------+
| netcfg-agent-mcp |
| 127.0.0.1:8767 |
| - Tools metier : list_equipments, |
| get_dashboard, preview_deploy, |
| topology, audit, open_terminal, |
| verify_chain, vendors |
| - Heritage optionnel : authority, |
| transport HTTP de LaForge si dispo |
+----------+----------------------------------+
| imports
v
+--------------------------+
| netcfg-agent (master) |
| Session, Visio parser, |
| PTY SSH, WAL hash-chain|
+--------------------------+
Port 8767 par defaut pour cohabiter avec LaForge sur 8766.
Installation via binaire (sans Python)
Les releases GitHub fournissent le binaire autonome netcfg-agent-mcp.exe
(Windows x64, ~130 MB) qui embarque :
- Python 3.12 runtime
- Le code netcfg-agent master (tous les tools metier)
- mcp SDK + FastAPI + uvicorn + asyncssh + pyte
- Les templates vendor et la demo
enterprise_network.vsdx
Telechargez depuis les releases et lancez directement :
netcfg-agent-mcp.exe --version
netcfg-agent-mcp.exe serve --transport http
Installation (Python)
pip install netcfg-agent-mcp
REM tire netcfg-agent[terminal] (code metier + terminal PTY SSH)
netcfg-agent-mcp --version
netcfg-agent-mcp --help
Developpement : depuis un clone, pip install -e ".[dev]".
Licence : AGPL-3.0-or-later (voir LICENSE).
Usage
Lancer le serveur
REM Mode HTTP (port 8767)
netcfg-agent-mcp serve
REM Mode stdio (pour spawn par Claude Desktop)
netcfg-agent-mcp serve --transport stdio
REM Mode standalone (aucun hook LaForge)
netcfg-agent-mcp serve --standalone
REM Custom port
netcfg-agent-mcp serve --port 8777
Configurer un client MCP
Claude Desktop (claude_desktop_config.json) :
{
"mcpServers": {
"netcfg-agent-mcp": {
"command": "netcfg-agent-mcp",
"args": ["serve", "--transport", "stdio"]
}
}
}
Gemini CLI (settings.json) :
{
"mcpServers": {
"netcfg-agent-mcp": {
"httpUrl": "http://127.0.0.1:8767/mcp",
"headers": {
"Authorization": "Bearer <token-genere-au-premier-run>",
"X-Agent-Name": "GEMINI"
}
}
}
}
Roo Code (.roo/mcp.json) :
Copier .roo/mcp.json.example en .roo/mcp.json et remplacer le placeholder.
Tools exposes (v0.1)
| Tool | Description |
|---|---|
netcfg_ping |
Health check (smoke test) |
netcfg_vendors |
Liste les vendors supportes (VRP, Comware, AOS-CX, ProCurve, Prosafe) |
netcfg_list_equipments |
Inventaire Visio |
netcfg_get_dashboard |
Severity counts + topology stats |
netcfg_preview_deploy |
Dry-run du plan de deploiement |
netcfg_topology |
Nodes + edges + SPOFs |
netcfg_audit |
Rapport drift multi-equipement |
netcfg_open_terminal |
Snapshot pyte d une session PTYSession |
netcfg_verify_chain |
Audit de la hash-chain WAL |
Authentification
- Bearer token local genere au premier run, stocke dans
%USERPROFILE%\.netcfg-agent-mcp\token(ACL user-only) - Permissions heritees de LaForge si hub dispo (authority_status)
- Fallback : lock SQLite local hash-chainee (via db_waldb du master)
Historique decisions
Voir ROADMAP_MCP_FORK.md dans le repo master pour l historique complet des decisions d architecture.
Points cles :
- Phase 1 (actuelle) : dep directe LaForge via pyproject (Scenario 2)
- Phase 2 (differee) : extraction
laforge-mcp-core(Scenario 3) - Budget binaire PyInstaller : < 180 MB
- Flag
--standalone: desactive tous hooks LaForge
Metadata
Release files for netcfg-agent-mcp 0.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| netcfg_agent_mcp-0.4.0.tar.gz | 37.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| netcfg_agent_mcp-0.4.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 75.9 kB
Release files / netcfg_agent_mcp-0.4.0.tar.gz
| Download URL | netcfg_agent_mcp-0.4.0.tar.gz |
|---|---|
| Size | 37.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9772e1bf7dea969ba3858e4dee72c0c95fa11e4b4efe8efd854bd9555e065117
|
|
BLAKE2b-256 checksum How to use checksums |
4b7d345fa33fd7cc68c288459cbac1d6c6e7854619d143b3d8b79525cf706f68
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 11, 2026.
Transparency logRelease files / netcfg_agent_mcp-0.4.0-py3-none-any.whl
| Download URL | netcfg_agent_mcp-0.4.0-py3-none-any.whl |
|---|---|
| Size | 38.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
deba9a77e616d03702d5da033edf7309b6262f46f101d920278eb328f9caf358
|
|
BLAKE2b-256 checksum How to use checksums |
476422d307b532c12a0fe9cd8652f39de177559b824bd8f1a5ae0f7cda94faeb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 11, 2026.
Transparency log