Since version 1.99, VSCode has built-in support for MCP servers.
The tools that they supply can be used by Github Copilot in the context ofVSCode. In addition to the new agent mode, you can also add any of the MCP-supplied tools as context during a normal “ask” mode query for example by typing #search
.
This note shows how you can manually add MCP servers to the vscode settings.
For the first example, I added perplexity-mcp, invoked via npx (so you don’t have to download or build anything), to my user settings:
"mcp": {
"servers": {
"perplexity-mcp-server": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"perplexity-mcp"
],
"env": {
"PERPLEXITY_API_KEY": "your-key"
}
}
}
}
If you prefer to use locally installed code, perhaps because you’re working on theMCP server code itself, the configuration looks as follows:
"mcp": {
"servers": {
"perplexity-mcp-server-1": {
"type": "stdio",
"command": "node",
"args": [
"build/perplexity-mcp/build/index.js" // relative path here is relative to $HOME
],
"env": {
"PERPLEXITY_API_KEY": "your-key"
}
}
}
}