---
title: Connect GitHub Copilot in VS Code to Loom's MCP memory server
description: Connect GitHub Copilot in VS Code to Loom's MCP memory server. Save project decisions and recall them in any chat or editor that shares the namespace.
seo:
  title: Shared MCP memory for GitHub Copilot in VS Code
lastModified: '2026-12-02T12:26:40.000Z'
---

GitHub Copilot in VS Code can save and retrieve project decisions through Loom's
MCP server over streamable HTTP. Connect clients to the same Loom server and
give them access to the same namespace to share those decisions.

There is no VS Code extension: the `loom_*` tools are the integration,
with no session capture or code shunt; the [Claude Code](/docs/features/integrations/claude-code) and
[Codex](/docs/features/integrations/codex) plugins have those.

In VS Code, each chat runs on an
[agent harness](https://code.visualstudio.com/docs/agents/run/agent-harnesses), picked in
its **Session Target** control before the first prompt. Use Copilot: the Local harness is
deprecated. The Copilot harness reads its own MCP configuration, `mcp-config.json` (the
file Copilot CLI uses), not the editor profile's `mcp.json`; VS Code forwards eligible
editor-profile entries to it.

The Copilot steps below follow the linked VS Code documentation. No Copilot session has
been run against Loom, so the token expansion in its configuration file and whether the
harness offers the tools to the model are untested;
[verify the connection](#verify-the-connection) before relying on it.

## Check for an existing entry

In a new chat, select **Copilot** in the **Session Target** control before the first
prompt, then run **Chat: Open Customizations** and open **MCP Servers**. VS Code forwards
[eligible editor entries](https://code.visualstudio.com/docs/agents/reference/mcp-configuration#_editor-forwarding-to-copilot),
such as the one the install links or `loom install` write or one copied from the
dashboard, so Loom may already be listed. Add a Copilot entry only when no listed `loom`
entry points at your server: through the
[session's MCP settings](#local-single-user-server) for a local server, or the
[Copilot configuration file](#remote-or-authenticated-server).

## Local single-user server

Use the tokenless setup when the Copilot harness can reach your single-user Loom server at
`localhost:7777` from the machine or container where the harness runs. Otherwise, use the
[Copilot configuration file](#remote-or-authenticated-server) with an authenticated Loom
server the harness can reach.

In a chat with **Copilot** selected as the **Session Target**, run
**Chat: Open Customizations**, open **MCP Servers**, and select **Add Server** in the
**User** group
([adding an MCP server](https://code.visualstudio.com/docs/agent-customization/mcp-servers)).
Choose HTTP and enter `http://localhost:7777/mcp`, or
`http://localhost:7777/mcp?toolset=coding` if the session uses the code index
([choosing a toolset](/docs/features/integrations/mcp-clients#choosing-a-toolset)). Enter `loom` as the server ID,
select **Global → Copilot Global**, and review and accept the
[server trust request](https://code.visualstudio.com/docs/agents/run/manage-mcp-servers#_mcp-server-trust)
when VS Code shows it. If **Copilot Global** is missing, check the
[Copilot harness requirements](https://code.visualstudio.com/docs/agents/run/agent-harnesses#_requirements-and-setup).
You can also use the [Copilot configuration file](#remote-or-authenticated-server) with
the local URL and omit `headers` for a tokenless server.

### Install links for the editor profile

[Add Loom to VS Code](https://vscode.dev/redirect?url=vscode%3Amcp%2Finstall%3F%257B%2522name%2522%253A%2522loom%2522%252C%2522type%2522%253A%2522http%2522%252C%2522url%2522%253A%2522http%253A%252F%252Flocalhost%253A7777%252Fmcp%2522%257D) ·
[Add Loom to VS Code Insiders](https://insiders.vscode.dev/redirect?url=vscode-insiders%3Amcp%2Finstall%3F%257B%2522name%2522%253A%2522loom%2522%252C%2522type%2522%253A%2522http%2522%252C%2522url%2522%253A%2522http%253A%252F%252Flocalhost%253A7777%252Fmcp%2522%257D)

The links open the server details in VS Code. Review the configuration and select
**Install**. Both links carry this server configuration:

```json
{ "name": "loom", "type": "http", "url": "http://localhost:7777/mcp" }
```

To install directly from a terminal, run:

```bash
code --add-mcp '{"name":"loom","type":"http","url":"http://localhost:7777/mcp"}'
```

Both methods add `servers.loom` to the editor profile's `mcp.json`. The dashboard's
**VS Code** entry under **Settings → Tokens** has the same shape (`type: "http"` and
`url`) with your server's URL and a token header.

<a id="any-other-server"></a>

## Remote or authenticated server

On the host running the Copilot harness, add the entry below to `mcpServers` in
`$COPILOT_HOME/mcp-config.json`, or `~/.copilot/mcp-config.json` if `COPILOT_HOME` is
unset. For a remote session, edit the file on the remote host or in the container where
the harness runs. Replace `https://loom.example.com` with your server URL. Set
`LOOM_API_KEY` to your
[Loom token](/docs/getting-started/connect-a-coding-agent#what-you-need) in the
environment of the host that runs the harness so the token stays out of the file. If you
change that environment, quit VS Code and open it again (the
[Agent Host](https://code.visualstudio.com/docs/agents/concepts/agent-host), the process
that runs the harness, can keep running when only the project window closes), or restart
the remote session, so the harness sees the variable.

```json
{
  "mcpServers": {
    "loom": {
      "type": "http",
      "url": "https://loom.example.com/mcp?toolset=coding",
      "headers": { "Authorization": "Bearer ${LOOM_API_KEY}" },
      "tools": ["*"]
    }
  }
}
```

This is the file and entry GitHub Copilot CLI uses. The
[Copilot CLI plugin](/docs/features/integrations/mcp-clients#other-editors-and-agents) registers its own `loom`
entry at `localhost:7777`, which a user entry named `loom` does not replace; to use
another server, uninstall the plugin first. See the
[Copilot configuration reference](https://code.visualstudio.com/docs/agents/reference/mcp-configuration)
for other destinations and authentication options. The GitHub Copilot cloud agent is
configured in the repository's settings instead: see
[hosted builders](/docs/features/integrations/mcp-clients#hosted-builders-and-chat-apps).

### Editor profile entry

`loom install` writes the literal bearer token into the editor's `mcp.json`:

```bash
loom install --client vscode --server-url https://loom.example.com --token "$LOOM_API_KEY" --toolset coding
```

This merges a `servers.loom` entry into the `mcp.json` of the VS Code Stable default
profile at the standard user data location. The entry has no input prompt, so VS Code can
also forward it to the Copilot harness.

For a named profile, VS Code Insiders, or a different user data location:

1. Copy the dashboard's **VS Code** entry. It carries your server's URL and token; add
   `?toolset=coding` to its `url` for a session that uses the code index.
2. Open the intended profile and run **MCP: Open User Configuration**. It opens that
   profile's editor-managed `mcp.json`, not the Copilot file.
3. Add the entry under `servers`, keeping the other entries.

Editor entries that use `${input:...}` prompts are not forwarded to the Copilot harness.
For sessions that read the editor's `mcp.json` directly, such as the deprecated Local
harness, this form keeps the token out of the file: VS Code prompts for it once and stores
it.

```json
{
  "servers": {
    "loom": {
      "type": "http",
      "url": "https://loom.example.com/mcp?toolset=coding",
      "headers": { "Authorization": "Bearer ${input:loom-token}" }
    }
  },
  "inputs": [
    { "id": "loom-token", "type": "promptString", "password": true, "description": "Loom token" }
  ]
}
```

## Verify the connection

In a chat with **Copilot** as the **Session Target** and **Agent** selected in the
[agent picker](https://code.visualstudio.com/docs/agents/run/agent-harnesses#_choose-a-built-in-agent)
(the read-only **Ask** agent cannot call the write tools in step 3):

1. Run **Chat: Open Customizations**, open **MCP Servers** and select the `loom` entry.
   Check that the URL points to your Loom server and that the entry comes from the
   intended file: for a Copilot Global entry, use **Other Properties** to open its source
   JSON (`mcp-config.json` under `$COPILOT_HOME` or `~/.copilot`); a forwarded editor
   entry appears as read-only JSON from the editor profile's `mcp.json`.
2. Ask the agent to call `loom_activate` from that server. Expand the tool call and
   confirm which server answered and that it returned the Loom session primer. If the tool
   is missing, check the chat's **Session Target** and where you saved the entry. If the
   tool call fails with `401`, check the token the entry sends (for the Copilot file, that
   `LOOM_API_KEY` is set on the host where the harness runs), then see
   [checking the connection](/docs/features/integrations/mcp-clients#checking-the-connection).
3. Ask it to save a test fact with `loom_memory_set` under a key you choose, read it back
   with `loom_memory_get`, check the value, and delete it with `loom_memory_delete`.

To check that a second authorized client can retrieve a saved decision, run the
[two-session memory check](/docs/features/integrations/mcp-clients#verify-shared-memory-through-mcp).

## Agent instructions

Add the [agent instructions](/docs/features/integrations/agent-instructions) block to
`.github/copilot-instructions.md` so the agent knows when to call the tools, unless the
repository's `AGENTS.md` already carries it. The block names the `coding` toolset's
tools: connect with `?toolset=coding` on `url`; otherwise the tools it names that the
listing leaves out run through `loom_op`, as the block says.

## Related

- [Connecting an MCP client](/docs/features/integrations/mcp-clients): `loom install`, toolsets and the other editors.
- [MCP reference](/docs/reference/mcp): endpoint, auth modes and the tool list.
- [Integrations](/docs/features/integrations): everything Loom connects to.
