VS Code (GitHub Copilot)

Connect GitHub Copilot’s agent mode in VS Code to the hosted Trading Economics MCP server at mcp.tradingeconomics.com. VS Code authenticates via an OAuth 2.1 browser flow - you enter your API key once and VS Code caches the token automatically across sessions.

Agent mode required. MCP tools are only available in Agent mode. Make sure to select it in the Copilot Chat input before querying.

Requirements

Requirements
  • VS Code 1.99+ - check at Help > About
  • GitHub Copilot extension with an active subscription
  • A Trading Economics API key - or use guest:guest for limited testing. Get a key here.

Step 1

Step 1 - Add the server to .vscode/mcp.json

Open (or create) .vscode/mcp.json in your workspace root and add the Trading Economics HTTP server entry:

{
  "servers": {
    "tradingeconomics": {
      "type": "http",
      "url": "https://mcp.tradingeconomics.com",
    },
  },
}

Save the file. VS Code detects the change and shows a Start button directly in the editor.

VS Code showing the mcp.json file with the tradingeconomics HTTP server entry and a Start button

Step 2

Step 2 - Authorize via browser

Click the Start button in the editor (or open the Command Palette with Ctrl+Shift+P / Cmd+Shift+P and run MCP: List Servers, then click the start icon next to tradingeconomics).

VS Code shows a permission dialog asking to start the authentication flow - click Allow.

VS Code dialog asking permission to start the MCP authentication flow

A second dialog asks permission to open the authorization page in your browser - click Open.

VS Code dialog asking to open the Trading Economics authorization site in the browser

Your browser opens the Trading Economics authorization page. Enter your API key and click Authorize.

Trading Economics authorization page in the browser asking for the API key

After authorizing, the browser shows a confirmation and asks permission to return to VS Code - click Open Visual Studio Code (or equivalent).

Browser confirmation page asking to redirect back to VS Code after successful authorization

Your token is stored securely in VS Code’s secret storage and reused across sessions - you won’t need to repeat this step.

Step 3

Step 3 - Open Copilot Chat in Agent mode

Open Copilot Chat with Ctrl+Alt+I (Windows/Linux) or Cmd+Alt+I (macOS). At the bottom of the chat input, click the mode selector and choose Agent.

Copilot Chat panel with the Agent mode selected in the mode selector

Step 4

Step 4 - Verify the server is active

Click the tools icon in the Copilot Chat toolbar to open the tools panel.

Copilot Chat toolbar with the tools icon highlighted

In the tools panel, locate tradingeconomics and make sure its checkbox is checked. Click OK to confirm.

Tools panel showing the tradingeconomics MCP server with its checkbox enabled

Step 5

Step 5 - Ask a question

Type a question in the chat. The first time a tool is invoked, Copilot will ask for permission to call the MCP server - click Allow (or Always Allow to skip future prompts).

Copilot Chat asking for permission to call the tradingeconomics MCP tool

Copilot fetches the data from the Trading Economics API and renders the answer directly in the chat.

Copilot Chat showing the final answer from the Trading Economics MCP server

Try these example prompts:

What is the current inflation rate in the United States?
Compare GDP growth between Brazil, China, and Germany.
What economic events are scheduled for this week?