Skip to main content
Glama

From Chat to MCP: A Network Engineer's MCP Lab

A compact demo MCP server (FastMCP) that lets an LLM safely drive a network lab. Runs in mock mode with no hardware, or against a real EVE-NG lab by swapping one inventory file. Works from Claude Code, Claude Desktop, or a fully local LLM stack (Ollama / vLLM).

Tool

Purpose

list_lab_devices

Show the inventory the server can reach.

send_command

Run a read-only show command on one device.

run_health_check

Health bundle against one device or the whole lab.

get_ospf_neighbors

OSPF neighbor state (right command per platform).

get_bgp_summary

BGP summary state (right command per platform).

configure_device

Push config — gated by an out-of-band confirm code (read-only is one flag).

Quickstart (Docker)

Spins up the whole stack — chat UI, lab tools, and a local model — with one command.

git clone https://github.com/E-Conners-Lab/Packet-Coders-Demo.git
cd Packet-Coders-Demo
docker compose up        # first run pulls images + the qwen3:8b model (a few minutes)

Open http://localhost:3000 (no login) → Settings → Integrations → add http://localhost:8000 as a tool server → set the model's Function Calling → Native → ask "list the lab devices." Defaults to the mock lab (no hardware needed).

Want…

Do this

Faster on a Mac (host Ollama, Metal GPU)

make up-host (then ollama pull qwen3:8b yourself)

The real EVE-NG lab

docs/real-lab.md

Change port / model / inventory

copy .env.example → .env — docs/configuration.md

Read-only (hide the write tool)

make readonly

Stop everything

make down

Port 8000 already in use? Set MCPO_PORT in .env. More fixes in docs/troubleshooting.md.

Related MCP server: meraki-dashboard-api

Connect a client

Point any MCP client at the server (start with the mock inventory). Full per-client steps — Claude Code, Claude Desktop, Ollama / vLLM + Open WebUI — are in docs/clients.md.

# Claude Code, from the repo root:
claude mcp add packet-coders-lab \
  --env PACKET_CODERS_INVENTORY="$PWD/configs/inventory.mock.yaml" \
  -- uv run --project "$PWD" packet-coders-mcp

Verify with claude mcp list, then ask it to list_lab_devices.

Safety

A demo, not a production change tool. Strongest guardrails:

  • Writes need an out-of-band code the model never sees — configure_device prints a one-time code to the server console; a human reads it back, so the model can't self-approve.

  • Read-only is one flag — PACKET_CODERS_ALLOW_WRITES=false hides the write tool entirely.

  • Hosts that confirm each call (Claude Desktop / Code) can use their own approval instead — set PACKET_CODERS_REQUIRE_CONFIRM_CODE=false.

Don't point it at production. Full model: docs/safety.md.

Docs

Develop

uv run --extra dev pytest
uv run --extra dev ruff check .

Available Tools

6 tools
configure_deviceA
Destructive

Apply config lines to a lab device, with dry-run enabled by default.

Inputs: device_name (required), commands (required), dry_run, confirm. Returns: object

get_bgp_summaryA
Read-only

Read BGP summary from a lab device using a platform-appropriate command.

Inputs: device_name (required). Returns: object

get_ospf_neighborsA
Read-only

Read OSPF neighbors from a lab device using a platform-appropriate command.

Inputs: device_name (required). Returns: object

list_lab_devicesA
Read-only

List lab devices available to this MCP server without returning secrets.

Inputs: no named parameters. Returns: object

run_health_checkA
Read-only

Run basic health checks against one device, or all devices when omitted.

Inputs: device_name. Returns: object

send_commandA
Read-only

Run one read-only show/display command on a lab device.

Inputs: device_name (required), command (required). Returns: object

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.2/5.0

    Scored across 6 tools

    Disambiguation5/5

    Each tool targets a distinct operation: configure_device for config, get_bgp_summary and get_ospf_neighbors for specific routing info, list_lab_devices for device enumeration, run_health_check for overall health, and send_command for generic show commands. No overlapping purposes.

    Naming Consistency5/5

    All tool names follow a consistent verb_noun pattern with underscores (e.g., configure_device, get_bgp_summary, list_lab_devices). No mixing of conventions or irregular naming.

    Tool Count5/5

    With 6 tools, the set is well-scoped for a network lab management server. Each tool covers a core need without redundancy or excessive specialization.

    Completeness4/5

    The tool set covers essential lifecycle operations: listing devices, configuring, retrieving BGP/OSPF status, health checks, and a generic command. Minor gaps include missing support for other routing protocols, but send_command provides a fallback.

    Maintenance

    ActivityInactive
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers