How to Add an MCP Server in VS Code

Open User Settings JSON (Ctrl+Shift+P → "Open User Settings JSON"), add an "mcp" object with a "servers" key, and list each server with its command, args, and optional env. Reload the window after saving. Claude for VS Code and GitHub Copilot read this config; Cursor and Windsurf each use their own config file.

MCP servers give AI assistants in VS Code access to files, databases, and APIs. Here is exactly where the config lives, how to write it, and how to verify the server is connected.