Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Quick Start

This guide connects an AI assistant to two routers, r1 and r2, that are already running flockd.

1. Let the routers be reached

flockd serves its API on the loopback address [::1] of the router unless told otherwise. On each router, set the address to serve it on in the system section of /etc/flockd/flockd.json, and restart flockd:

"system": {
    "api": {
        "grpc": {
            "bind_ip_addr": "192.0.2.1"
        }
    }
}

The API has no authentication. Use an address on a management network that only trusted hosts can reach. See Connecting to Routers.

Check each router can be reached from the host the assistant runs on, using flockc:

$ flockc -e http://192.0.2.1:50051 sys overview

2. Install flockmcp

On the host the assistant runs on, install the flockmcp release that matches the routers' flockd release.

3. Tell the assistant about flockmcp

Register flockmcp with the assistant, naming each router and giving its endpoint. For example with Claude Code:

$ claude mcp add flock -- /usr/bin/flockmcp \
      --daemon r1=http://192.0.2.1:50051 \
      --daemon r2=http://192.0.2.2:50051

MCP Clients has the same for other assistants.

4. Ask

Start the assistant and ask about the routers in plain language.

> Which routers can you see ?

> Are all the BGP sessions on r1 and r2 established ?

> What route does r1 use for 198.51.100.7, and where did it come from ?

> Compare the BGP routes r1 sends r2 with what r2 says it received.

The assistant chooses which tools to call. Most assistants show each call and its answer, and ask before calling a tool for the first time.