Skip to content
Agentmart
Submit a tool

How to add an MCP server to VS Code

This guide adds MCP servers to VS Code, using Playwright MCP, Figma MCP Server and Firecrawl MCP Server from the catalog. Playwright MCP runs locally, Figma MCP Server is hosted and connects by URL, and Firecrawl MCP Server runs locally and can take an API key. The local and remote steps give a code --add-mcp terminal command for your user profile as well as a workspace entry in .vscode/mcp.json. The key step gives a workspace entry only. Commands come from each listing's install data, and paths come from VS Code's own documentation.

Updated Oct 26, 2026 · Built from catalog data; how we rank and grade

Checked against VS Code's documentation on Oct 26, 2026. Commands and config blocks are generated from the same install data as each listing page.

Before you start

  • VS Code installed and able to start.
  • Node.js with npx for local servers that run through npx (check with node --version), or the runtime the server's listing names.
  • An API key or account only for servers that need one; hosted servers that sign in with OAuth need an account with that service.
  1. 1. Choose a server and see what it needs

    VS Code can keep a server in a workspace file or in your user profile, so decide which fits each server. The notes below say what each example server needs.

    • Playwright MCP: runs locally, no key needed.
    • Figma MCP Server: hosted, connect by URL, no key needed.
    • Firecrawl MCP Server: runs locally, can take FIRECRAWL_API_KEY.
    • Where VS Code can keep a server: workspace (.vscode/mcp.json) and user profile (mcp.json).
  2. 2. Add a local server (Playwright MCP)

    Playwright MCP runs locally, so it is described by a command and its arguments. The terminal command adds it to your user profile, and the workspace entry goes in .vscode/mcp.json.

    Add it to your user profile from a terminal
    code --add-mcp '{"name":"playwright-mcp","type":"stdio","command":"npx","args":["-y","@playwright/mcp@0.0.82"]}'
    Add this to .vscode/mcp.json in the workspace.vscode/mcp.json
    {
      "servers": {
        "playwright-mcp": {
          "type": "stdio",
          "command": "npx",
          "args": [
            "-y",
            "@playwright/mcp@0.0.82"
          ]
        }
      }
    }
  3. 3. Add a remote server (Figma MCP Server)

    Figma MCP Server is hosted and connects by URL. The terminal command and the workspace entry each show the server with an http type and the URL.

    Add it to your user profile from a terminal
    code --add-mcp '{"name":"figma","type":"http","url":"https://mcp.figma.com/mcp"}'
    Add this to .vscode/mcp.json in the workspace.vscode/mcp.json
    {
      "servers": {
        "figma": {
          "type": "http",
          "url": "https://mcp.figma.com/mcp"
        }
      }
    }
    • If the server uses OAuth, VS Code prompts you to sign in when it first starts the server.
  4. 4. Keep API keys out of the file (Firecrawl MCP Server)

    Firecrawl MCP Server can take FIRECRAWL_API_KEY. The entry declares an input of type promptString, and the env entry refers to it as ${input:firecrawl-api-key}, so no secret is written to the file.

    Add this to .vscode/mcp.json in the workspace.vscode/mcp.json
    {
      "inputs": [
        {
          "type": "promptString",
          "id": "firecrawl-api-key",
          "description": "Your API key for Firecrawl",
          "password": true
        }
      ],
      "servers": {
        "firecrawl-mcp-server": {
          "type": "stdio",
          "command": "npx",
          "args": [
            "-y",
            "firecrawl-mcp@3.34.1"
          ],
          "env": {
            "FIRECRAWL_API_KEY": "${input:firecrawl-api-key}"
          }
        }
      }
    }
    • Put a secret in the inputs array as a promptString with password: true and refer to it as ${input:id}. VS Code asks for it on first start and stores it securely.
    • VS Code asks for each secret the first time the server starts and stores it securely, so nothing secret is written to the file.
    • FIRECRAWL_API_KEY (optional): Your API key for Firecrawl.
  5. 5. Restart or reload if the server does not appear

    Use this step if the server does not appear. It covers the Restart Server action, chat.mcp.autostart and Workspace Trust, as the notes describe them.

    • The docs do not require a restart after editing the file. The Restart Server action in MCP: List Servers is for use after a configuration change, and chat.mcp.autostart starts new or changed servers automatically by default.
    • Workspace MCP files follow Workspace Trust; they cannot start in Restricted Mode. MCP: Reset Trust clears trust decisions.

Check that it works

Run MCP: List Servers from the Command Palette, where you can start, stop or restart a server and open its output. Then call one of its tools in Agent mode.

  • Run MCP: List Servers from the Command Palette to start, stop, restart a server and open its output, then call one of its tools in Agent mode.

Troubleshooting

A stdio server fails to start
Check command, args and that the runtime (such as Node.js for npx) is installed and on PATH where VS Code runs, which on a remote host can differ from your laptop. Source
A Docker-based server exits or will not connect
Do not run it in detached mode (-d) in a stdio configuration. Source
The server runs but its tools are unavailable
Confirm the server is enabled and its tools are selected under Chat: Open Customizations > Tools, then restart the server. Source
The server is blocked
Workspace Trust or an enterprise MCP allowlist can block it; a local config cannot override an enterprise restriction. Source

Security notes

  • A local server runs with your user account's permissions and can do whatever you can on that machine; read what it does before you add it (MCP's security guidance says the same).
  • A remote server receives what the agent sends it. Check who runs it and what the service does with your data.
  • Put a secret in the inputs array as a promptString with password: true and refer to it as ${input:id}. VS Code asks for it on first start and stores it securely.
  • Agent Market does not grade security yet, so a listing page shows no security grade today; read the server's source and permissions yourself (see How we grade security).

How we grade security · Trust policy

Servers and skills in this guide

From here, browse the listings that name VS Code as a supported host, or open a guide for one specific tool.

  1. 1
    Playwright MCP

    microsoftOfficial

    Playwright Tools.

    ★ 38.6KLast active Oct 22, 2026Local (stdio)Claude Code, Codex, VS Code, Cursor +2

  2. 2
    Figma MCP Server

    mcp.figma.comOfficial

    The Figma MCP server brings Figma design context directly into your AI workflow.

    ★ 2.1KLast active Oct 20, 2026Remote (HTTP)Claude Code, VS Code, Cursor, Windsurf

  3. 3
    Firecrawl MCP Server

    firecrawlOfficial

    Firecrawl, the context API for AI agents: search, scrape, interact with the web, plus paper search.

    ★ 7.7KLast active Oct 23, 2026Local (stdio), Remote (HTTP)Claude Code, VS Code, Codex, Cursor +2

Sources

Cite this page

How to add an MCP server to VS Code. Agent Mart. https://agentmart.dev/guides/add-mcp-server-vscode (last updated 2026-10-26)