---
title: VS Code
description: Connect VS Code's chat to Hamloy in one click, or with one entry in .vscode/mcp.json, then sign in once in the browser when VS Code asks.
url: https://hamloy.com/docs/vs-code
---

[Docs](https://hamloy.com/docs)

# VS Code

Connect VS Code's chat to Hamloy in one click, or with one entry in .vscode/mcp.json, then sign in once in the browser when VS Code asks.

VS Code reads a project's MCP servers from `.vscode/mcp.json`. Add Hamloy there and the agent in VS Code's chat gets Hamloy's tools in that project.

## What you need

- A Hamloy account and a project. [Create a free board](https://hamloy.com/registration/new) if you have none.
- VS Code, with its chat and agent turned on.

## Connect

Add Hamloy to VS Code in one click, for every folder:

[Add to VS Code](https://vscode.dev/redirect/mcp/install?config=%7B%22type%22%3A%22http%22%2C%22url%22%3A%22https%3A%2F%2Fhamloy.com%2Fmcp%22%7D&name=hamloy) VS Code asks to install Hamloy, then you sign in in your browser.

Or, to keep it to one folder, put this in `.vscode/mcp.json` in the folder you work in. If the file already has servers, add `hamloy` beside them. Note that VS Code calls the key `servers`, not `mcpServers` as Cursor and Claude Code do, and wants the `type`.

```
{
  "servers": {
    "hamloy": {
      "type": "http",
      "url": "https://hamloy.com/mcp/YOUR_PROJECT_ID"
    }
  }
}
```

Your project's own address is on Hamloy's **Connect** page: pick the project, then the VS Code tab, and the file is there filled in. You can also use `https://hamloy.com/mcp`, which reaches every project you are on; the agent then says which project each time.

VS Code asks you to sign in the first time. Your browser opens on Hamloy and asks whether to let VS Code in, under the name VS Code gives itself. Choose **Allow**.

The file holds no secret, so it can be committed. Each person who opens the repo signs in as themselves.

## Check that it worked

In VS Code's chat, in agent mode, ask "What's open in Hamloy?" The agent calls the `list` tool:

```
Pebble · 3 open, 2 done
backlog
  ## Streaks
  [] B-dw8f@1 Keep a streak across a missed day (waits on Q-7hnc)
requests
  [] R-q4ve@1 Create an Apple developer account
questions
  [] Q-7hnc@1 How should a shared streak look? options: 1) A square card (recommended) 2) A story-sized image
```

B-dw8f waits on a question. Once you answer Q-7hnc on the board, the task is ready, and the agent hears your answer in Hamloy's news.

## With a token instead

For a machine nobody signs in on, make an [API token](https://hamloy.com/docs/api-tokens) on the Connect page. With this file VS Code asks for the token once and keeps it, so the token never goes in the repo:

```
{
  "servers": {
    "hamloy": {
      "type": "http",
      "url": "https://hamloy.com/mcp/YOUR_PROJECT_ID",
      "headers": {
        "Authorization": "Bearer ${input:hamloy-token}"
      }
    }
  },
  "inputs": [
    {
      "type": "promptString",
      "id": "hamloy-token",
      "description": "Hamloy API token",
      "password": true
    }
  ]
}
```

## If it doesn't work

- **No hamloy tools in the chat.** Check that the chat is in agent mode, and that VS Code shows the hamloy server as running. Start it again from there if not.
- **The key is `mcpServers`.** That is Cursor's and Claude Code's format. VS Code wants `servers`, with `"type": "http"`.
- **The browser window says "This link doesn't work."** Hamloy doesn't know the app that sent you. Take the entry out, save, put it back, and sign in again.
- **You want to cut the connection.** The Connect page lists VS Code under **Connected apps** , with **Disconnect**.

If you run Claude Code or Codex in VS Code's terminal, set them up with the program instead: [Claude Code](https://hamloy.com/docs/claude-code), [Codex](https://hamloy.com/docs/codex).
