Connect VS Code

VS Code (GitHub Copilot's agent mode) signs in with your brainlets.ai account, so there's no key to copy. The server is https://brainlets.ai/mcp.

Steps to connect

  1. In VS Code, run MCP: Add Server... from the Command Palette, choose HTTP, and paste https://brainlets.ai/mcp. Name it brainlets, and add it to your user settings (or to this workspace).
  2. That writes the server below into mcp.json. To add it by hand instead, run MCP: Open User Configuration and paste it.
  3. VS Code starts the server and asks to sign in: choose Allow, and it opens brainlets.ai in your browser (see below).
  4. Open Copilot Chat in Agent mode: the brainlets tools are under the tools button.
{
  "servers": {
    "brainlets": {
      "type": "http",
      "url": "https://brainlets.ai/mcp"
    }
  }
}

What happens at sign-in

  • VS Code opens brainlets.ai. If you aren't signed in, sign in with GitHub or Google, the same account you use on the dashboard.
  • A page asks Connect Visual Studio Code? It names the app, the address it sends you back to, and the email you're signed in as. Check that it's the account you mean.
  • Allowing it lets VS Code create, change and delete your brainlets, run them, read their runs and your usage, and link services. It can add a service's key through a form, but never read one, and it can't see your API keys or secrets.
  • Allow sends you back to VS Code, connected. It stays signed in, renewing on its own; after 60 days without use, you'll sign in again.
  • The connection shows under API keys as a connected app.

A first prompt to try

List my brainlets

VS Code calls list_brainlets and shows what you have (nothing yet, on a new account). Then try:

  • Make a brainlet that takes a URL and returns a three-line summary of the page, then run it on https://example.com
  • Search the published brainlets for one that checks DNS records

Running a brainlet is an action that may not be undone, so VS Code asks before each run unless you've told it to always allow them.

Common problems and fixes

There are no MCP commands, or the server never asks to sign in.
Signing in needs a current VS Code with GitHub Copilot, and an organization can turn MCP servers off (chat.mcp.access). On an older VS Code, connect with an API key instead (below).
The browser says it can't reach VS Code after you choose Allow.
VS Code listens on your own machine for the answer. Remote sessions (SSH, Codespaces) go through vscode.dev instead; try again from the desktop window, or use an API key.
You'd rather use an API key, or sign-in isn't possible.
Create one under API keys and add "headers": { "Authorization": "Bearer ${input:brainlets-key}" } to the server, with a promptString input named brainlets-key ("password": true). VS Code asks for the key once and keeps it out of the file. A server with a key doesn't sign in.
"This sign-in request has expired or isn't valid."
The page is good for ten minutes. Start again from the app.
You connected the wrong brainlets.ai account.
Disconnect it (below), sign out of brainlets.ai, and connect again: the sign-in page names the account.
It worked, then asks you to connect again.
It was revoked under API keys, or not used for 60 days. Connect again; nothing is lost.
A run comes back refused, naming a quota.
You've used that resource for the period. Ask "What's my usage?" to see how much is left and when it resets.
"Too many requests" (429).
A rate limit: wait the time it gives and try again.

How to disconnect

In VS Code, remove the brainlets entry from mcp.json (or run MCP: List Servers → brainlets → Stop), and sign out from the Accounts menu (bottom left) → brainlets.ai → Sign Out.

Or from brainlets.ai: under API keys, revoke VS Code's connected app. It stops at once, and VS Code has to sign in again to reconnect.

Your brainlets, runs and linked services stay as they are.