HomeGuidesAPI ReferenceGuidesMRT APIConfiguration API
GitHubAirheads Developer Community
Guides

Setup: GitHub Copilot in VS Code

Connect the Central MCP Server to GitHub Copilot Chat to query your HPE Aruba Networking Central directly from VS Code in agent mode.


Requirements

Before you begin, confirm you have all of the following:

RequirementHow to verify
VS Code 1.99 or laterHelp → About, or code --version
GitHub Copilot Chat extension (not just base Copilot)Extensions panel — search "GitHub Copilot Chat"
"chat.mcp.enabled": true in VS Code settingsSettings UI → search "chat mcp" or add to settings.json
Central credentials from the main setup guideCENTRAL_BASE_URL, CENTRAL_CLIENT_ID, CENTRAL_CLIENT_SECRET
uv installeduv --version in terminal

Important

Without "chat.mcp.enabled": true in your VS Code settings, VS Code silently ignores the .vscode/mcp.json file. This is the most common reason MCP tools don't appear in Copilot Chat. Set this first before adding the config file.

To enable MCP in VS Code settings:

  • Open Settings (Ctrl/Cmd+,), search for chat.mcp, and toggle Chat: MCP Enabled to on
  • Or add directly to settings.json: "chat.mcp.enabled": true

Create the MCP Config File

Create .vscode/mcp.json in your workspace root (the file and directory won't exist by default):

{
  "servers": {
    "central-mcp": {
      "type": "stdio",
      "command": "uvx",
      "args": ["--prerelease=allow", "central-mcp-server"],
      "env": {
        "CENTRAL_BASE_URL": "your-central-base-url",
        "CENTRAL_CLIENT_ID": "your-client-id",
        "CENTRAL_CLIENT_SECRET": "your-client-secret"
      }
    }
  }
}

Replace all placeholder values with your actual credentials.

📘

Credential security

See How credentials stay secure.

VS Code uses a different JSON schema

VS Code's MCP config uses "servers" (not "mcpServers") and requires "type": "stdio" for each server entry. This is different from other MCP clients like Claude Desktop using the wrong schema will cause the server to be ignored silently.


Add mcp.json to .gitignore

The config file contains your credentials and must not be committed to version control. Add it to your .gitignore:

.vscode/mcp.json

If your workspace doesn't have a .gitignore yet, create one at the workspace root with this line.

After saving, reload the VS Code window: Ctrl/Cmd+Shift+P → Developer: Reload Window.


Approve Tool Calls

On the first time a Central MCP tool is used, VS Code will prompt you to approve it. Click Allow to proceed. You can also set tools to always allow from the same dialog.

[GIF: VS Code tool approval dialog appearing when a Central MCP tool is called, showing Allow / Allow Always / Deny buttons, user clicking Allow Always]


Verify the Connection

Open the Copilot Chat panel (View → GitHub Copilot → Open Chat). Switch to Agent mode using the mode selector at the top of the panel.

Click the tools icon to expand the tool list. You should see the central-mcp server listed with discovery tools (Search, GetSchemas, Execute).


Run Your First Query

In the Copilot Chat panel (Agent mode), ask:

Which sites have poor health scores right now?

A successful response retrieves live site data from your Central instance. If Copilot runs tool calls and returns a structured response, the connection is working.