Back to home

Connecting VS Code to Kubeara Using MCP

Enable GitHub Copilot in VS Code to query deployments, server health, and resource usage from Kubeara.

Introduction

VS Code with Kubeara MCP connected
VS Code with Kubeara MCP connected

Visual Studio Code (VS Code) is one of the world's most popular code editors, developed by Microsoft. It provides a lightweight yet powerful environment for writing code, debugging applications, managing source control, and using AI-powered development tools such as GitHub Copilot.

While GitHub Copilot can help write and explain code, it cannot directly access your servers or infrastructure. To securely connect Copilot with external services like Kubeara, VS Code uses the Model Context Protocol (MCP).

With MCP, GitHub Copilot can communicate with your Kubeara workspace, allowing it to retrieve deployment information, check server health, monitor resources, and perform infrastructure-related tasks directly from the chat interface.

How VS Code Uses MCP

The Model Context Protocol (MCP) is an open standard that allows AI assistants to securely interact with external tools and services.

In VS Code, MCP acts as a bridge between GitHub Copilot and your infrastructure. Instead of responding only from its training data, Copilot can send requests to an MCP server and receive real-time information from connected systems.

For example, once Kubeara is connected through MCP, you can ask Copilot questions like:

  • List all my deployed applications.
  • Check the status of my servers.
  • Show CPU, memory, or GPU usage.
  • View deployment logs.
  • Retrieve infrastructure details from Kubeara.

This enables Copilot to provide answers based on your live environment rather than static knowledge.

Why Connect Kubeara to VS Code?

Connecting Kubeara to VS Code allows you to manage your infrastructure without leaving your development environment.

After the connection is established, GitHub Copilot can securely interact with your Kubeara workspace to:

  • View deployed applications and services
  • Check server and deployment status
  • Monitor CPU, memory, disk, and GPU metrics
  • Access deployment information
  • Answer infrastructure-related questions using live data

This creates a more efficient workflow by combining coding and infrastructure management in a single interface.

Connecting Kubeara to VS Code via MCP

Follow these steps to connect your Kubeara workspace with GitHub Copilot in VS Code.

What You'll Need

  • Visual Studio Code installed
  • GitHub Copilot extension enabled
  • A Kubeara account with MCP Server enabled
  • A Kubeara MCP token generated from the MCP Servers page

Step 1: Open the Command Palette

Launch VS Code, open the Command Palette (Ctrl + Shift + P on Windows/Linux or Cmd + Shift + P on macOS), search for MCP: Add Server, and select it.

Step 2: Configure the MCP Server

Choose HTTP as the transport type, enter the Kubeara MCP endpoint: https://api.kubeara.dev/api/mcp — Then provide a name for the server, such as kubeara or Kubeara MCP.

Step 3: Configure Authentication

If VS Code displays a dynamic client registration is not supported message, click Cancel. When mcp.json opens, replace its contents with the Kubeara configuration and update YOUR_TOKEN_HERE with your Kubeara MCP token.

{
  "servers": {
    "kubeara": {
      "type": "http",
      "url": "https://api.kubeara.dev/api/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_TOKEN_HERE"
      }
    }
  }
}

Note: MCP tokens are displayed only once when generated. If you lose your token, create a new one from the MCP Servers page.

Step 4: Save the Configuration

Save the updated mcp.json file to apply your changes.

Step 5: Start the MCP Server

Open the Command Palette, run MCP: List Servers, select your Kubeara server, and click Start Server.

Step 6: Verify the Connection

Open GitHub Copilot Chat and ask a question about your Kubeara infrastructure, such as listing your servers or checking deployment status. If Copilot returns live data from your workspace, the connection has been successfully established.

Troubleshooting

IssueSolution
Dynamic client registration popup appearsClick Cancel and authenticate using the Bearer token in mcp.json.
Kubeara server does not appearVerify that mcp.json contains valid JSON and the server configuration is correct.
Authentication failsGenerate a new MCP token from the Kubeara MCP Servers page and update the Authorization header.
Unable to connectConfirm that the MCP endpoint URL is correct and the server has been started from MCP: List Servers.

Conclusion

By connecting VS Code to Kubeara through MCP, GitHub Copilot gains secure access to your infrastructure directly within your editor. Instead of switching between dashboards and terminal windows, you can query deployments, monitor servers, review resource usage, and retrieve operational information using natural language. This streamlines development and infrastructure management, allowing you to work more efficiently from a single workspace.

MCP FAQ

How Model Context Protocol works with Kubeara and your AI clients.

What is Model Context Protocol (MCP)?

MCP is an open standard that provides a common way for AI tools to connect with databases, files, APIs, and cloud platforms. Often described as the 'USB-C for AI,' it allows AI applications to work with different services consistently.

How does MCP work?

MCP follows a client-server architecture: the AI application (host) sends requests via an MCP client to an MCP server, which interacts with external services (GitHub, databases, local files, etc.) and returns results to the AI.

What are the benefits of MCP?

MCP offers simpler integrations with one common protocol, reusable connections across multiple AI tools, better security through consistent permission handling, and faster development by reducing duplicate work.

How does MCP compare to traditional APIs?

Traditional APIs are built for specific services with separate integrations and different request formats. MCP provides one standard protocol that works across many services and AI tools, sitting on top of existing APIs.

How does Kubeara integrate with MCP?

Kubeara connects natively to Claude, Cursor, and any MCP client. You can manage infrastructure through natural language—no dashboard needed. MCP integration is built in, not a third-party add-on.

What are real-world use cases for MCP?

MCP is used to review GitHub pull requests, query databases, read local files, manage Kubernetes clusters, send Slack messages, and more—all through AI assistants.