Skip to content
Guides & References

VS Code MCP server setup for rConfig with GitHub Copilot agent mode

Add rConfig's MCP server to VS Code so GitHub Copilot's agent mode can read device configs, history and compliance. Settings, secrets, approvals and prompts.

Iris: AI CenterUpdated
On this page

VS Code MCP server setup for rConfig with GitHub Copilot agent mode

VS Code connects to rConfig’s MCP server over Streamable HTTP with a bearer token, and GitHub Copilot’s agent mode can then call rConfig’s tools while it works in your workspace. VS Code can prompt for the token and store it securely, so the config file is safe to share.

Best for: teams that standardise on VS Code, reviewing template and playbook changes against real configs, remote and dev-container workflows.


Connect

Create .vscode/mcp.json in the workspace. The inputs block makes VS Code ask for the token the first time the server starts, then keep it in secure storage:

.vscode/mcp.json
{
"inputs": [
{
"type": "promptString",
"id": "rconfig-token",
"description": "rConfig MCP token",
"password": true
}
],
"servers": {
"rconfig": {
"type": "http",
"url": "https://<your-rconfig-server>/mcp",
"headers": { "Authorization": "Bearer ${input:rconfig-token}" }
}
}
}

The VS Code format uses a top-level servers key, not mcpServers. The MCP server page is the reference for these settings.

Then open Copilot Chat, switch to agent mode, and check that rConfig’s tools appear in the tools list.


Add the rConfig Skill

Download the rConfig Skill and add the content of SKILL.md to your repository’s Copilot custom instructions (.github/copilot-instructions.md). Copilot then knows to find the device first, check the config’s command, and prefer search and diff over full configs.


Tool approvals

VS Code asks you to confirm a tool call before it runs, and lets you allow a tool for the session or the workspace. Every rConfig tool is read-only, so allowing them for the workspace is reasonable. Keep confirmation on for tools from servers that can write.


Things to ask

  • Review a template change: “This branch changes the NTP block in templates/ntp.j2. Using rConfig, which Core devices currently run a different NTP config from the new template?”
  • Playbook from compliance: “Get the compliance status for the Edge group from rConfig. For devices failing the SSH hardening policy, draft an Ansible playbook in remediation/ssh.yml. Don’t run anything.”
  • Understand a device fast: “Explain the routing setup on dub-wan-02 from its latest running config in rConfig.”

Frequently asked questions

How do I add rConfig to VS Code as an MCP server?

Create .vscode/mcp.json with a server of type http pointing at https://<your-rconfig-server>/mcp and an Authorization header. Use a promptString input with password set to true so VS Code asks for the token once and stores it securely.

Where does the connection come from in a remote or container session?

From the remote host or container, not your laptop. That host must be able to reach rConfig and trust its certificate, and any environment variables for the token must be set there.

Can Copilot change device configs through rConfig?

No. rConfig's MCP tools are read-only. Copilot can edit files in your workspace, such as templates or playbooks, which you then review and run yourself.

Type to search.