
Connexion avec VS Code
VS Code with GitHub Copilot in agent mode — native MCP through mcp.json.
Ce contenu est disponible en anglais.
Quel MCP allez-vous connecter ? Les commandes ci-dessous s'adaptent à votre choix.
- 1
Check your VS Code version
Native MCP support arrived in VS Code 1.102. Under Help → About, check that the version is 1.102 or later, and update if it's older.
- 2
Turn on Copilot agent mode
Open Chat (Ctrl + Alt + I) and switch the mode picker to Agent. That's the mode that sees MCP tools.
- 3
Generate your API key
Sign in to app.newalgorithm.io with your account, open Keys & apps and generate a key. It is shown only once: copy it and store it somewhere safe.
Key formatna_live_xxxxxxxxxxxxxxxxx - 4
Add the server
In the Command Palette (Ctrl + Shift + P), run the command below and choose HTTP; VS Code asks for the URL and creates the configuration file.
MCP: Add Server - 5
Or write the configuration directly
To apply it to every project, use MCP: Open User Configuration. To apply it only to this repository, create .vscode/mcp.json:
.vscode/mcp.json{ "servers": { "NewAlgorithm-TOTVS": { "type": "http", "url": "https://totvs.mcp.newalgorithm.io/mcp", "headers": { "Authorization": "Bearer na_live_xxxxxxxxxxxxxxxxx" } } } } - 6
Start and confirm
Use the Start button that appears above the server block in mcp.json, or run MCP: List Servers to see the connection state.
Résultat attendu : NewAlgorithm-TOTVS — Running
- 7
Check the tools
In Chat, in Agent mode, open the tool picker (tool icon). The five na_* tools should be listed and checked.
The .vscode/mcp.json file lives inside the repository: if you're going to version it, replace the key with a VS Code input ("inputs" with "type": "promptString" and "password": true) instead of leaving the Bearer token in plain text.
Détails sur l'authentification et les outils dans la Documentation.