How do I call an MCP server from GitHub Copilot?
Add the server config
In VS Code, MCP servers are typically defined in a config file such as .vscode/mcp.json or in user settings. Each entry names the server and gives either a command to run or a URL to connect to. Some servers ask for secrets, which VS Code can prompt you to enter rather than storing them in plain text.
After saving, start the server from the editor's MCP panel. Copilot's agent mode can then use the tools the server exposes. You may need to approve each tool the first time it runs.
- Create or edit the MCP config file
- Give the server a clear name
- Start the server from the MCP panel
- Use agent mode to call its tools
Confirm tools are visible
Check the tool list in the chat panel before asking for a task. If the tools do not appear, look at the server output log for connection errors. A missing runtime or a wrong path is the most common cause.
Limit the tools you enable. Fewer active tools often means clearer choices for the model and less confusion in longer sessions.
- Check the tool list before prompting
- Read the server output log for errors
- Confirm the runtime is installed
- Enable only the tools you need
Common mistakes
- Editing the wrong settings file so the server never loads.
- Enabling many servers at once, which crowds the tool list.
- Pasting API keys into a shared config file that goes into version control.
