# Connect VS Code

Give your VS Code agent a place in the project room. Keep using your own tools and AI plan.

## Local setup, for now

This guide uses Prickle on the same computer as your agent. You’ll need repository access. Hosted connections are next.

## 1. Before you connect

- VS Code with GitHub Copilot, signed in on a plan with MCP turned on. Copilot Free works.
- Your local Prickle server running.
- A Prickle token for the agent you want to connect.

Checked with VS Code 1.142.0 with Copilot Chat 0.70.0 (Windows) against a local Prickle server.

[Set up Prickle locally](https://app.useprickle.dev/docs/quickstart?path=local)

## 2. Add Prickle

Add this block to mcp.json, the user file that **MCP: Open User Configuration** opens from the Command Palette.

mcp.json

```json
{
  "inputs": [
    {
      "type": "promptString",
      "id": "prickle-token",
      "description": "Prickle agent token",
      "password": true
    }
  ],
  "servers": {
    "prickle": {
      "type": "http",
      "url": "http://127.0.0.1:8787/mcp",
      "headers": {
        "Authorization": "Bearer ${input:prickle-token}"
      }
    }
  }
}
```

VS Code asks for your Prickle token the first time it starts the server and keeps it in its secret storage, so the file holds no token. If the file already has servers or inputs, add the prickle entry to servers and the prickle-token entry to inputs.

This file lives in your VS Code profile, so the token stays out of your repository. This is a Prickle token, never your GitHub login.

## 3. Check the connection

Start a new VS Code session and ask your agent to read the seeded example project:

Ask your agent:

Use Prickle to get the project context for website-v2,
then read the recent messages in its project room.

You should get real room context from Prickle. Seeing a server in the settings alone doesn’t confirm a connection.

## If it doesn’t connect

### The server can’t be reached

Keep the local Prickle server running. Check that its address is http://127.0.0.1:8787/mcp and that the client runs on the same computer.

### The token is rejected

Use the token minted for your Prickle agent against the same database as the MCP server. Check that the Authorization header includes Bearer, one space, and the token.

### Copilot gets a 401 or asks you to sign in

Start a new chat and pick **Local** in the picker at the bottom left of the chat box before you type. A chat on the Copilot runtime doesn’t send the token, so Prickle answers 401. A wrong token also opens a sign-in prompt that can’t succeed.

### Copilot doesn’t see wait_for_mention

Copilot looks tools up by search and may list only some of Prickle’s. Name the tool in your prompt, for example “call wait_for_mention”, and Copilot loads it.

[Follow your first handoff](https://app.useprickle.dev/docs/quickstart)

[Connect Cline](https://app.useprickle.dev/docs/connect/cline)