Igor
# Igor
Igor is an MCP server that lets an AI agent read old network gear the way a network tech does: through a serial console server, over Telnet and over SNMP v2c. It can only read. An allowlist in code refuses any command that would change a device, before a connection is even opened.
Built for Kiroween 2026, Frankenstein category. License: Apache-2.0.
## Try it in 2 minutes
You need Python 3.12 or newer and git. No hardware.
```bash
git clone https://github.com/getlarkwright/igor.git
cd igor
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -e .
igor-fake-switch # fake 2950 switch: Telnet 127.0.0.1:2323, SNMP 127.0.0.1:1161
```
In a second terminal, point your MCP client at Igor. For Kiro, this goes in `.kiro/settings/mcp.json` (it's already in the repo):
```json
{
"mcpServers": {
"igor": {
"command": "igor",
"args": [],
"env": {
"IGOR_TELNET_USER": "igor",
"IGOR_TELNET_PASSWORD": "igor",
"IGOR_SNMP_COMMUNITY": "public"
}
}
}
}
```
Then ask the agent: "Why is Fa0/12 down on fake-switch?" The fake switch has a port-security violation built in, so there's a real answer to find. Then ask it to fix the port and watch Igor refuse.
Those credentials only open the fake switch. Everything in the demo runs on your machine.
## What Igor can do
- Run `show` commands on a device over a serial console server or Telnet.
- Filter output with `| include`, `| match` or `| no-more`.
- Read SNMP values with GET and WALK.
## What Igor refuses
The gate in `src/igor/allowlist.py` checks every command before a connection is opened. These are always refused:
- `configure` and `conf t` (configuration mode)
- `set`, `delete`, `commit`, `save` (EdgeOS changes)
- `write`, `copy`, `erase` (IOS changes)
- `reload`, `reboot`
- `clear`, `debug`, `shutdown`, `no ...`
- Shell escapes: `sudo`, `bash`, `sh`, `!`, backticks, `$(`
- Chaining: `;`, `&&`, `||`, newlines, or any pipe not listed above
- SNMP SET. Igor has no code that can build a SET request, so it can't send one.
A refusal names the rule it hit:
```
Refused: "configure" changes the device. Igor is read-only.
```
Igor never tries a refused command another way. There's a real log of an agent hitting this in `docs/demo-logs/2026-12-01-blocked-configure.txt`.
## How it was built
Kiro wrote Igor. The three steering files in `.kiro/steering/` set the product, the stack and the safety rules, and Kiro reads them on every run. The specs in `.kiro/specs/` (serial console, fake switch with Telnet and SNMP, and USB serial console) have the requirements, design and task lists that Kiro worked from. Kiro ran out of monthly credits after writing the USB serial requirements and design, so Claude Code wrote that code and its tests, and the commit and the task list say so.
Kiro CLI ran with permission to read and write files only, so it couldn't run commands or reach real gear while it built. Claude Code, an AI coding assistant, ran the tests, reviewed the changes and sent each failure back to Kiro with its cause. Every commit message says who made it, so the history shows each Kiro run and each fix.
The first real agent run found a bug no unit test caught: the Telnet code started its own asyncio loop inside the MCP server's loop, so every call failed over MCP. The fix came with end-to-end tests that go through the real MCP server.
## The fake switch
`src/igor/fake/switch.py` is a Cisco 2950-style switch running IOS 12.1. It has a Telnet server and an SNMP v2c agent, and it only listens on 127.0.0.1. Port Fa0/12 is err-disabled after a port-security violation (one violation, last source MAC 00ab.cdef.1234), and `show interfaces`, `show port-security`, `show errdisable recovery`, `show logging` and `show running-config` all tell the same story. Unknown commands get the real IOS error:
```
% Invalid input detected at '^' marker.
```
## Transports
| Transport | How it works | Notes |
|---|---|---|
| Serial console | SSH to a Digi CM 32 console server, then the device's console | The Digi only speaks old crypto (`diffie-hellman-group1-sha1`, `ssh-rsa`), so Igor passes those options to the system `ssh` client for that host only. It logs out every time and reports "port busy" instead of retrying. |
| USB serial console | A console cable plugged into the machine running Igor (`pyserial`) | Finds out what state the console was left in first. Logged out: logs in. Logged in: runs the command. Config mode: does nothing and says a human must finish the edit. |
| Telnet | `telnetlib3` client | For gear with no console server. |
| SNMP v2c | `pysnmp` GET and WALK | No SET. |
Credentials come from environment variables at run time (`IGOR_DIGI_PASSWORD`, `IGOR_DEVICE_USER`, `IGOR_DEVICE_PASSWORD`, `IGOR_TELNET_USER`, `IGOR_TELNET_PASSWORD`, `IGOR_SNMP_COMMUNITY`). They never go in the repo, logs or tool output.
## Tests
```bash
pip install -e .
pytest
```
227 tests. The fake switch is the fixture for Telnet, SNMP and the end-to-end MCP tests. No hardware needed.
TDQS
Scored across 4 tools
Each tool has a distinct purpose: inventory listing, read-only show commands, single-OID SNMP GET, and subtree SNMP WALK. SNMP get vs. walk are closely related but clearly differentiated by single-OID vs. subtree semantics.
All names are snake_case and generally verb_noun (list_devices, run_show) with snmp_get/snmp_walk following a protocol-prefix convention. The mix is readable and predictable, though not perfectly uniform.
Four tools is well-scoped for a read-only network inventory/query server. Each tool covers a distinct access method (inventory, CLI show, SNMP scalar, SNMP subtree) without redundancy.
The read-only surface covers the core workflows: device discovery, CLI show commands, and SNMP reads. Minor gaps exist, such as retrieving a single device's details or changing SNMP row limits, but agents can work around these via list_devices and parameters.