Skip to main content

Overview

GitHub Copilot now has native MCP (Model Context Protocol) support in VS Code! Connect CodeAlive to enhance Copilot with deep understanding of your entire codebase.
Quick install: Run npx @codealive/installer to automatically configure CodeAlive for VS Code. See the Installation Guide for details.

Prerequisites

  • VS Code version 1.102 or higher
  • GitHub Copilot Business or Enterprise subscription (MCP access controlled by organization administrators)
  • CodeAlive account with API key (Sign up here)
  • Indexed repositories in your CodeAlive dashboard
MCP is disabled by default in Copilot. Your organization administrator must enable it via policy settings.

Setup

1

Add CodeAlive MCP Server

GitHub Copilot supports multiple MCP transports (stdio, HTTP Stream, SSE):
  1. Open Command Palette (Cmd/Ctrl+Shift+P)
  2. Run: “GitHub Copilot: Add MCP Server”
  3. Choose “HTTP Stream” server type (recommended)
  4. Enter configuration:
{
  "servers": {
    "codealive": {
      "type": "http",
      "url": "https://mcp.codealive.ai/api/",
      "headers": {
        "Authorization": "Bearer YOUR_API_KEY_HERE"
      }
    }
  }
}
Replace YOUR_API_KEY_HERE with your actual CodeAlive API key
2

Verify Integration

Test in GitHub Copilot Chat:
  • Open Copilot Chat (Cmd/Ctrl+I)
  • Ask: “What repositories are available in CodeAlive?”
  • Try: “Search for authentication code in my codebase”

Using CodeAlive with Copilot

In Copilot Chat

The MCP integration automatically provides context:
You: Explain how the user authentication works in this project

Copilot: [Uses CodeAlive to search for auth code]
         [Provides explanation with actual code references]

Enhanced Features

With CodeAlive connected, Copilot can:
  • Search across your entire codebase
  • Understand project architecture
  • Find similar implementations
  • Generate code matching your patterns

Alternative: Local MCP Server

Run CodeAlive MCP locally with Docker:
docker run -d \
  -p 8000:8000 \
  -e CODEALIVE_API_KEY=YOUR_API_KEY \
  --name codealive-mcp \
  ghcr.io/codealive-ai/codealive-mcp:main
Then configure MCP to use local server:
{
  "servers": {
    "codealive": {
      "type": "http",
      "url": "http://localhost:8000/api",
      "headers": {
        "Authorization": "Bearer YOUR_API_KEY"
      }
    }
  }
}

Configuration Options

Workspace Settings

Add to .vscode/settings.json:
{
  "github.copilot.enable": {
    "*": true
  },
  "mcp.servers": {
    "codealive": {
      "type": "http",
      "url": "https://mcp.codealive.ai/api/",
      "headers": {
        "Authorization": "Bearer ${env:CODEALIVE_API_KEY}"
      }
    }
  }
}

Team Setup

For teams, use environment variables:
  1. Add to .vscode/settings.json:
{
  "mcp.servers.codealive.headers.Authorization": "Bearer ${env:CODEALIVE_API_KEY}"
}
  1. Each team member sets:
export CODEALIVE_API_KEY="their_api_key"

Troubleshooting

Common causes:
  • MCP is disabled by organization policy (default)
  • Using Individual plan (requires Business/Enterprise)
  • VS Code version < 1.102
Solutions:
  1. Contact your GitHub organization administrator to enable MCP
  2. Upgrade to Copilot Business or Enterprise
  3. Update VS Code to version 1.102+
  4. Update GitHub Copilot extensions to latest versions
Solutions:
  1. Verify MCP server is configured
  2. Check API key is valid
  3. Run “MCP: List Servers” to verify CodeAlive is listed
  4. Try removing and re-adding the server
Solutions:
  1. Regenerate API key in CodeAlive dashboard
  2. Ensure “Bearer ” prefix is included
  3. Check for typos in configuration
  4. Test API key with curl
For more solutions, see the Troubleshooting Guide.

Best Practices

Keep Context Fresh

Regularly sync repositories in CodeAlive dashboard

Use Specific Queries

Be specific when asking Copilot to search

Leverage Context

Let CodeAlive provide context for large codebases

Team Consistency

Share workspace settings for team alignment