Skip to content

feat(201): add NerdGram remote MCP and nerdgram-diagrams skill - #379

Merged
automateyournetwork merged 2 commits into
automateyournetwork:mainfrom
NetworkNerd1337:201-nerdgram-skill
Nov 29, 2026
Merged

automateyournetwork merged 2 commits into
automateyournetwork:mainfrom
NetworkNerd1337:201-nerdgram-skill

Conversation

@NetworkNerd1337

Copy link
Copy Markdown
Contributor

Problem and resulting behavior

The maintainer invited this PR to ship a NerdGram skill with NetClaw. NerdGram1337 (MIT) is a self-hosted library of Mermaid .mmd network diagrams that serves an MCP server at /mcp. Until now, NetClaw had no way to keep a diagram, refresh it from new device data, or compare it over time.

This PR:

  • registers the operator's own NerdGram as the remote MCP nerdgram-mcp, with url ${NERDGRAM_MCP_URL} (default http://127.0.0.1:8787/mcp) and Authorization: Bearer ${NERDGRAM_TOKEN}. It has the same shape as topolograph-mcp and vendors nothing.
  • adds the skill nerdgram-diagrams. It can list, search, read, lint, render and diff diagrams. With a read-write token it can also create diagrams from CDP, LLDP, show ip route, ARP/MAC, CSV or JSON data, refresh them, link site diagrams and tag L1/L2/L3/VLAN/VRF layers.
  • exposes 8 tools with a read token and 21 with read-write. The skill recommends read.
  • has the skill read before it writes (expectedHash), verify after, record writes in GAIT, and ask before nerdgram_trash or nerdgram_replace_apply. Both of those tools are DefenseClaw-blocked by default.
  • never touches a device. Neighbor data comes from pyats-topology or from pasted output.

Numbered Spec Kit specification (required for every PR)

Release

  • Proposed version and bump: 1.27.0, minor (new integration and skill), from scripts/prepare-release.py --bump minor --spec 201 --apply
  • Release notes/changelog: docs/releases/1.27.0.md, CHANGELOG.md

Validation

All of these are offline on Linux, with no NerdGram and no token. Full results are in verification.md.

  • bash tests/nerdgram/run-tests.sh: 71 checks pass. They cover the registration shape, the absence of literal tokens, the catalog, installer and HUD joins, and the skill naming exactly the 21 contract tools.
  • run-contract-tests.py --suite nerdgram: PASS. --suite unit --prepare: PASS.
  • verify-spec-artifacts, reconcile-mcp.py (catalog, dependencies, docs, meraki-ids, packages and portability surfaces), check-fastmcp-compat and check-mcp-tasks: pass.
  • build-catalog.mjs --check, build-catalog.py --check, check-catalog-metadata, verify-catalog-coverage, verify-inventory-counts (244 skills, 184 MCP), check-skill-limits (81%, the same as main) and check-package-references: pass.
  • The setup unittests (test_setup_catalog, test_pyats_testbeds, test_testbed_setup) pass. HUD npm test: 554 pass. prepare-release.py --check: PASS 1.27.0.
  • The opt-in tests/nerdgram/live-api.sh (read-only initialize and tools/list) passed only against a loopback mock, for both scopes.

Not tested:

  • a real NerdGram instance or token
  • OpenClaw gateway resolution of ${VAR} in this entry, which has the same shape as topolograph-mcp
  • end-to-end agent workflows
  • DefenseClaw lines
  • the tessl skill-review

Compatibility, migration and risks

  • The change is additive. Nothing happens until someone selects the NerdGram component and sets NERDGRAM_TOKEN.
  • The component is in the full profile only, because it needs an operator-run NerdGram.
  • /mcp is plain HTTP. The docs say to keep a LAN endpoint on a trusted network.
  • A read-write token can overwrite or trash diagram files, but never device configuration.
  • Rollback: deselect the component or remove NERDGRAM_TOKEN.
  • The installer installs nothing.

Contributor checklist

  • I followed CONTRIBUTING.md and used a numbered spec before implementation.
  • Spec, research, plan, tasks and verification describe the final PR scope; any required maintainer scope review is complete (the maintainer invited this PR).
  • Specification artifact and declaration reconciliation checks pass.
  • Relevant tests pass; live, browser, Docker and host coverage gaps are stated explicitly.
  • Applicable integration, installer, HUD and documentation surfaces are updated (or non-applicability explained). There is no mcp-servers/<name>/README.md because the server is not vendored.
  • Completed-spec version bump, changelog and release notes are included or an explicit coordinated release plan is linked.
  • No credentials, private network configuration or customer topology are included.
  • Compatibility/migration and any operational approval requirements are documented.

Spec Kit artifacts for spec 201: spec, research, plan, data model,
contracts, quickstart, tasks and the requirements checklist.
Register the operator's own NerdGram1337 /mcp endpoint as nerdgram-mcp
(url plus Bearer ${NERDGRAM_TOKEN}, default http://127.0.0.1:8787/mcp)
and add the nerdgram-diagrams skill for the 21 NerdGram tools: 8 with a
read token, 21 with read-write.

Update the catalog, installer, effects pins, HUD, README, SOUL,
SOUL-SKILLS, TOOLS and .env.example. Add the offline nerdgram contract
suite with an opt-in read-only live check, the verification notes and
release 1.27.0.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants