VS Code Integration

Connect ContextGate MCP Server to GitHub Copilot in VS Code

GitHub Copilot in VS Code now supports the Model Context Protocol (MCP). Configure ContextGate to give Copilot instant access to your business data from Salesforce, QuickBooks, HubSpot, and more.

Once configured, Copilot Chat can directly query your connected apps using natural language. Ask questions about customers, sales, invoices, or any data in your connected systems.

📋 Prerequisites

  • VS Code (version 1.85 or later)
  • GitHub Copilot extension installed and active
  • GitHub Copilot Chat extension installed
  • ContextGate account with at least one connected app
  • Node.js installed (for MCP server runtime)
1

Get Your ContextGate Bearer Token

Navigate to the Install page in your ContextGate workspace. Click "View API Token" and copy your bearer token. You'll need this for authentication.

💡 Your token can be found on the Install page .

Keep your bearer token secure! Never commit it to version control.

2

Configure Your Toolbox (Optional)

On the Install page, you can customize which tools, connections, and datasets are available through the MCP server. This allows you to:

  • Limit access to specific connections (e.g., only Salesforce, not QuickBooks)
  • Enable only certain tools or operations
  • Control which datasets are accessible

Toolbox Manager Interface:

Toolbox Manager Configuration
3

Install ContextGate MCP Server

Install the ContextGate MCP server package globally via npm:

4

Configure VS Code Settings

Open your VS Code settings (JSON) and add the MCP server configuration. You can access settings JSON by:

  • Press Cmd/Ctrl + Shift + P
  • Type "Preferences: Open User Settings (JSON)"
  • Add the MCP configuration below

Replace YOUR_BEARER_TOKEN_HERE with your actual ContextGate bearer token.

5

Reload VS Code

Reload VS Code to apply the MCP server configuration:

  • Press Cmd/Ctrl + Shift + P
  • Type "Developer: Reload Window"
  • Press Enter
6

Test with Copilot Chat

Open Copilot Chat (click the chat icon in the sidebar or press Cmd/Ctrl + Shift + I) and try these prompts:

"Use ContextGate to show me the top 5 Salesforce opportunities by amount"

"Get recent QuickBooks invoices from ContextGate"

"Query ContextGate for HubSpot contacts created this month"

✓ If Copilot responds with data from your connected apps, the integration is working!

🔧 Troubleshooting

MCP Server Not Recognized

  • Verify the ContextGate MCP server package is installed globally
  • Check VS Code settings JSON syntax is correct
  • Reload VS Code window after configuration changes
  • Check VS Code developer console for errors (Help → Toggle Developer Tools)

Authentication Errors

  • Verify your bearer token is correct and not expired
  • Ensure the token is in the environment variables section
  • Check for extra spaces or quotes around the token

Copilot Doesn't Use ContextGate

  • Explicitly mention "ContextGate" or "use ContextGate" in your prompts
  • Ensure GitHub Copilot Chat extension is up to date
  • Check that MCP servers are enabled in VS Code settings

🚀 Next Steps

  • Connect More Apps: Add more data sources to your ContextGate workspace
  • Explore Queries: Try complex queries combining multiple data sources
  • Build Workflows: Use Copilot to generate code that integrates your data