Skip to main content

VS Code with GitHub Copilot can query your AstroBee data layers and run SQL. All in natural language

When you’re working in VS Code, you often need to query your data layers to understand your data, validate transformations, or explore relationships. With AstroBee’s MCP (Model Context Protocol) integration, GitHub Copilot can directly access your data layers and execute queries without leaving your coding environment. This tutorial shows you how to connect VS Code to your AstroBee account in about 5 minutes.

What you’ll get

Once connected, GitHub Copilot can:
  • Browse your data layers and explore their structure
  • Run SQL queries against your data
  • Generate charts and visualizations
  • Discover hidden relationships across your data sources
For editing data layers, use the AstroBee web interface rather than MCP tools. The web interface provides optimized workflows that prevent token overhead and maintain data layer consistency. If you have a specific use case that requires programmatic data layer modifications, contact us at [email protected].

Prerequisites

Before you begin:
  1. AstroBee account with data: Complete the quickstart to set up your account and create the demo data layer. This gives Copilot something to explore.
  2. Visual Studio Code: Download and install the latest version of Visual Studio Code (available for Mac, Windows, and Linux).
  3. GitHub Copilot subscription: You’ll need an active GitHub Copilot subscription to use MCP servers with VS Code.
Learn more about MCP server integration in the VS Code documentation.

Connect VS Code to AstroBee

1

Create MCP configuration file

In your workspace, create a new file at .vscode/mcp.json. This file tells VS Code how to connect to AstroBee’s MCP server.Add the following configuration:
.vscode/mcp.json
{
  "servers": {
    "astrobee": {
      "type": "http",
      "url": "https://agent.production.bumblebee.kurtosis.io/mcp"
    }
  }
}
The astrobee name can be customized to anything you prefer. The URL points to AstroBee’s production MCP endpoint.
2

Start the MCP server

After saving the mcp.json file, VS Code will detect the new MCP server configuration.
VS Code showing the MCP server with a Start server button
Click Start server to initialize the connection. VS Code will begin the authentication flow.
3

Allow VS Code authentication

VS Code will prompt you to allow the connection to the AstroBee MCP server.
VS Code authentication prompt asking to allow connection to the MCP server
Click Allow to proceed. This opens your browser to complete the authorization.
4

Authorize AstroBee

Your browser opens with the AstroBee authorization screen. Select the Google account associated with your AstroBee account and sign in.
AstroBee authorization screen showing VS Code requesting access
GitHub Copilot is requesting permission to access your AstroBee account. Click Accept to authorize the connection.
5

Authorize GitHub

Complete the GitHub OAuth flow to finalize the connection between VS Code, GitHub Copilot, and AstroBee.
GitHub OAuth authorization screen for VS Code
After authorizing GitHub, you’ll be redirected back to VS Code automatically. The MCP server will show as connected and running.
6

Verify the connection

Back in VS Code, you should see the AstroBee MCP server listed as running with all available tools. The server status indicator will show it’s active and ready to use.If you see the server running successfully, you’re all set!

Start exploring your data

Open the GitHub Copilot Chat view using the keyboard shortcut:
  • Mac: ⌃⌘I
  • Windows/Linux: Ctrl+Alt+I
Try asking Copilot about your data:
List my models in AstroBee

Show me the entities, properties, and relationships in the Demo Business Model

What are the top 10 products by revenue?

Create a bar chart of sales by region
GitHub Copilot will use the AstroBee MCP tools to fetch your data and answer your questions directly in the chat.

How it works

When you ask a question, GitHub Copilot:
  1. Uses list-ontologies to see your available data layers
  2. Uses list-entities and list-relationships to understand the data structure
  3. Uses execute-sql to query your data
  4. Formats the results and generates visualizations
All of this happens in the conversation. You don’t need to write any SQL, switch between applications, or leave your editor. Now that GitHub Copilot has access to AstroBee, you can explore your data conversationally, run complex queries, build and modify data layers, and discover hidden patterns, all without leaving VS Code.

Troubleshooting

If the server doesn’t start after clicking Start server:
  • Verify the mcp.json file is correctly formatted with valid JSON
  • Check that you’re using the correct URL: https://agent.production.bumblebee.kurtosis.io/mcp
  • Try reloading VS Code completely (close and reopen)
  • Ensure you have an active GitHub Copilot subscription
  • Check the Output panel in VS Code for any error messages
If you see authentication errors during the connection process:
  • Make sure you’re logged into your AstroBee account at app.astrobee.ai
  • Check that pop-ups are allowed in your browser for the authentication flow
  • Verify your firewall or security software isn’t blocking the connection
  • Try disconnecting and reconnecting the MCP server in VS Code
  • Ensure you clicked Accept on all authorization screens (AstroBee and GitHub)
If GitHub Copilot reports that you don’t have any data layers:
  • Complete the quickstart to create the demo data layer first
  • Verify you can see your data layer at app.astrobee.ai
  • Make sure you’re using the same AstroBee account in both VS Code and the web app
  • Check that your data layer has completed generation and is not in a pending state
  • Try restarting the MCP server in VS Code
If the AstroBee tools don’t appear when asking questions:
  • Verify the MCP server shows as running in VS Code
  • Check that GitHub Copilot is properly activated (look for the Copilot icon in the status bar)
  • Try opening a new chat session (Copilot may need to refresh available tools)
  • Restart VS Code completely to reload the MCP configuration
  • Ensure your GitHub Copilot subscription is active and not expired