
Conectar con GitHub Copilot (agente)
GitHub Copilot cloud agent — MCP configured in the repository Settings. Support for remote servers still to be confirmed.
Este contenido está disponible en inglés.
¿Qué MCP vas a conectar? Los comandos de abajo cambian según tu elección.
- 1
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 - 2
Store the key as a repository secret
In the repository: Settings → Secrets and variables → Agents → Secrets tab → New repository secret. The name must start with COPILOT_MCP_ — only secrets with that prefix reach the MCP configuration.
Secret nameCOPILOT_MCP_NA_API_KEYResultado esperado: In the value, paste the API key. It stays in the repository vault and never appears in the JSON.
- 3
Open the MCP configuration
Still in Settings, in the sidebar under “Code, planning, and automation”: Copilot → MCP servers.
- 4
Declare the NewAlgorithm server
For remote servers, Copilot requires type, url and tools; headers is where authentication goes, with the secret referenced as $NAME.
Repository MCP configuration{ "mcpServers": { "NewAlgorithm-TOTVS": { "type": "http", "url": "https://totvs.mcp.newalgorithm.io/mcp", "tools": ["na_prepare", "na_search", "na_route", "na_specialists", "na_version"], "headers": { "Authorization": "Bearer $COPILOT_MCP_NA_API_KEY" } } } } - 5
Save
GitHub validates the syntax before saving. If the configuration doesn't save, the JSON is invalid — check commas and quotes.
- 6
Confirm on the first task
Assign an issue to Copilot or request a change through Agents. In the agent session, the startup log lists the loaded MCP servers and the enabled na_* tools.
Resultado esperado: NewAlgorithm-TOTVS na_prepare, na_search, na_route, na_specialists, na_version
It applies to the repository where it was configured — in organizations, you can define the same configuration at the organization level and inherit it in every repository. The tools field is required for remote servers: if you'd rather allow everything at once, use ["*"] instead of the list.
Detalles de autenticación y herramientas en la Documentación.