Connect VS Code + Copilot
GitHub Copilot in Visual Studio Code supports agent mode, where Copilot can call MCP servers. Connecting Stack Automation gives Copilot Chat the ability to manage your spaces, blueprints, and deployments while you stay in your editor.
Setup is: install the Stack Automation VS Code extension, add one MCP server entry to your
mcp.json, and start the server.
Prerequisites
- Visual Studio Code with GitHub Copilot and Copilot Chat (agent mode).
- A Stack Automation API token
Install
-
In the VS Code + Copilot panel, click Download
stack-automation.vsix. -
Install the extension via the Command Palette (Extensions: Install from VSIX…) or from a terminal:
code --install-extension stack-automation.vsix -
Open the Command Palette and run MCP: Open User Configuration, then merge the snippet below into your
mcp.json. Replace the token with your own:{
"servers": {
"stack-automation": {
"type": "http",
"url": "https://stackautomation.cisco.com/mcp",
"headers": {
"Authorization": "Bearer <YOUR_STACK_AUTOMATION_TOKEN>"
}
}
}
}Use the exact
urlshown in your VS Code + Copilot panel — the MCP endpoint can differ per deployment. -
Click Start next to the server config in VS Code, open Copilot Chat in Agent mode, and try: "List my Stack Automation deployments."
When you're done, tick "I've completed the setup — mark as connected" in the panel.
Operate
In Copilot Chat (agent mode), ask for Stack Automation actions in plain language. Copilot
will call the stack-automation server and may ask you to confirm tool calls.
Verify the connection:
List my Stack Automation deployments.
Everyday examples:
- "Launch the
aws-eks-sandboxblueprint in thedevspace." - "Show me the status and endpoints of my running deployments."
- "Open the blueprint definition for
terraform-vpcso I can edit it." - "Deploy the module in this repo as a Stack Automation blueprint."
Troubleshooting
- Server won't start. Re-check the
mcp.jsonsnippet for valid JSON and confirm theurlmatches your panel. Then click Start again. - 401 / unauthorized. The
Authorizationheader must readBearer <token>with a valid, current token. Regenerate in Stack Automation if needed and updatemcp.json. - Copilot doesn't call the tool. Make sure you're in Agent mode (not Ask mode) and
that the
stack-automationserver shows as running.
Related
- AI Integrations overview
- OpenAI Codex — terminal agent
- MCP Server Config — Cursor, Windsurf, and other clients