Skip to content
Guides & References

Claude Code MCP setup for rConfig: query network configs from your terminal

Connect Claude Code to rConfig's MCP server, set its permissions, add the rConfig Skill, and ask network config questions from the terminal or a CI job.

Iris: AI CenterUpdated
On this page

Claude Code MCP setup for rConfig: query network configs from your terminal

Claude Code connects to rConfig’s MCP server directly over Streamable HTTP with a bearer token, from the engineer’s machine or any server you run it on. Because it runs inside your network, rConfig can stay on a private address. One command connects it; a permission rule and the rConfig Skill make it efficient.

Best for: engineers who already work in a terminal, scripting and automation work that needs real device data, unattended jobs in CI.


Connect

Create an MCP token in rConfig (AI Center → MCP Server), then add the server. The MCP server page is the reference for these settings.

Terminal window
claude mcp add --transport http rconfig https://<your-rconfig-server>/mcp \
--header "Authorization: Bearer YOUR_MCP_TOKEN"

That stores the server for you only, in the current project. To share the setup with a team without sharing a token, put it in the project’s .mcp.json and read the token from an environment variable:

.mcp.json
{
"mcpServers": {
"rconfig": {
"type": "http",
"url": "https://rconfig.example.net/mcp",
"headers": { "Authorization": "Bearer ${RCONFIG_MCP_TOKEN}" }
}
}
}

Each engineer then sets RCONFIG_MCP_TOKEN to their own token, so the agent only sees the devices their rConfig role allows.

Check it: run /mcp inside Claude Code. rconfig should show as connected with eight tools.


Add the rConfig Skill

The rConfig Skill teaches the agent how to use the tools in order: find the device, list its history, diff the right versions. Copy the rconfig-core folder into ~/.claude/skills/ for yourself, or .claude/skills/ in a project for the whole team. Claude Code picks it up when a question involves rConfig.


Permissions

Claude Code asks before it calls an MCP tool. Every rConfig tool is read-only, so most teams allow them all. Add the rule to .claude/settings.json (project) or ~/.claude/settings.json (you):

.claude/settings.json
{
"permissions": {
"allow": ["mcp__rconfig__*"]
}
}

The rule depends on the server key. If you named the server something other than rconfig, change the prefix to match. To allow only some tools, list them one by one, for example mcp__rconfig__search_configs.


Things to ask

Claude Code’s strength is combining rConfig data with files and code in the repository you’re working in.

  • Estate-wide search: “Using rConfig, which devices in the Edge group still have snmp-server community public? Give me a table with the matching line and last backup time.”
  • Explain a change: “Compare the last two running-config versions of dub-core-01 in rConfig and explain what changed and what it affects.”
  • Build from real data: “Read the latest running configs for the three DUB access switches from rConfig and write a Jinja2 template in templates/access.j2 that reproduces their interface sections. Flag anything that differs between the three.”

For questions that span more than rConfig, see Using rConfig with other MCP servers.


Run it unattended

Claude Code runs headless with -p. Pre-approve the rConfig tools so the run never stops for a prompt:

Terminal window
export RCONFIG_MCP_TOKEN="..." # a service user's token, from your secret store
claude -p "Using rConfig, list every device whose running config changed in the last 24 hours and summarise each change in one line." \
--allowedTools "mcp__rconfig__*"

Use a token for a dedicated rConfig user whose role covers only the devices the job needs. The output goes to stdout, so a CI job can post it to chat, attach it to a ticket or store it as an artefact.


Quirks worth knowing

  • Which config you get: unless a command is named, get_latest_config returns the device’s newest stored output, whatever command produced it. Ask for the running config explicitly; Claude Code passes that to the tool’s command filter.
  • Context fills up: whole configs are long. Ask for matching lines (search_configs) or diffs before full configs, and start a fresh session for a new investigation.
  • Read-only means read-only: if you ask Claude Code to fix a device, it will draft the change. It can’t apply it through rConfig.

Frequently asked questions

How do I add rConfig to Claude Code?

Run claude mcp add --transport http rconfig https://<your-rconfig-server>/mcp --header "Authorization: Bearer <token>" with an MCP token from rConfig's MCP Server tab, then run /mcp in Claude Code to check that rconfig shows as connected with eight tools.

How do I stop Claude Code asking before every rConfig tool call?

Add an allow rule for the server's tools, mcp__rconfig__*, to permissions.allow in your Claude Code settings, or pass --allowedTools "mcp__rconfig__*" on a headless run. Every rConfig MCP tool is read-only.

Does Claude Code send my device configs to Anthropic?

Yes. Tool results, including configs, become part of the conversation that Claude Code sends to the model. Secrets are obfuscated by rConfig before they leave the server. Check that your Claude plan's data terms suit your configs.

Can Claude Code change a device through rConfig?

No. rConfig's MCP server has only read-only tools. Claude Code can draft changes as text or files; applying them goes through your normal change process.

Type to search.