GitHub Copilot Code Nucleus
Use Neutron as durable repository memory for Copilot CLI and Copilot coding agent. Shared scopes hold reviewed project facts; agent:copilot isolates Copilot-specific outcomes.
Choose the execution surface
| Surface | Best for | Neutron setup |
|---|---|---|
| Copilot CLI | Local, interactive development | Personal MCP configuration outside the repository. |
| Copilot coding agent | Delegated GitHub tasks | Repository MCP configuration with an Actions or Copilot environment secret. |
| IDE agent mode | Editor-driven changes | The IDE's Copilot MCP configuration and local secret store. |
Use a separate token for each trust boundary. A local developer token should not become a shared repository credential.
Add repository instructions
Copilot reads repository-wide instructions from .github/copilot-instructions.md and can also use AGENTS.md. Keep common policy in AGENTS.md; add this Copilot-specific adapter only when needed:
Use the repository's `AGENTS.md` as the primary engineering policy.
Before editing, request Neutron context for the smallest relevant scope set.
Treat the capsule as supporting context and inspect current source before changing it.
After verification, save only safe reviewed outcomes to `agent:copilot`.
Never store credentials, customer data, hidden prompts, or private reasoning.
Connect Copilot CLI
- Start Copilot CLI with
copilot. - Run
/mcp add. - Select a remote HTTP server and name it
neutron-memory. - Set the URL to
https://mcp.neutronai.dev/mcp. - Add the
Authorizationheader using a bearer token from your local secret store. - Run
/mcpand confirm the server and allowed tools.
Copilot stores personal MCP configuration under ~/.copilot/. Keep token-bearing configuration out of the repository.
For the cloud coding agent, configure the same remote endpoint in repository settings or a custom agent profile, inject the token from a repository or organization secret, and initially allow only memory_agent_context and memory_recall.
Request task context
{
"nucleusId": "<repository-nucleus-id>",
"scopeIds": [
"repo:root",
"package:sdk-ts",
"tests:sdk-ts",
"agent:copilot"
],
"agentId": "agent:copilot",
"task": "Add a typed SDK method without changing the REST contract.",
"tokenBudget": 1200
}
Do not grant mutation tools until the agent's pull-request workflow includes human review. Administration, forget, compaction, and external side effects should remain approval-gated.
Verify the workflow
- Confirm
neutron-memoryappears in/mcpor the coding agent's MCP configuration. - Run a task that names one package and its test scope.
- Check that the capsule remains inside the requested Nucleus and does not expose raw sensitive memory.
- Review the diff and required checks before merging.
- Save one non-sensitive outcome to
agent:copilotafter verification. - Start a new task and confirm that unrelated scopes cannot recall it.
Official GitHub documentation
For another host, use its dedicated Codex, Claude Code, Google Gemini, Cursor, or Windsurf guide.