Large Language Models

MCP Server for VSCode: Setup, Free Options and Not Working Fixes

A practical walkthrough for adding an MCP server to VS Code: the exact mcp.json format, free local servers you can run today, honest notes on the Copilot plan question, and a checklist of fixes for servers that refuse to start, connect or list tools.

MCP Server for VSCode: Setup, Free Options and Not Working Fixes
Cristian Da Conceicao

You added an MCP server to VS Code, pressed the play button, and nothing happened. Or the server started, but the chat panel never listed a single tool. This is the most common way an afternoon disappears for developers who try the Model Context Protocol for the first time, and almost every case comes down to one of about eight small mistakes. This article walks through the MCP server for VSCode from zero: the right config file, the right root property, free options you can run without paying for anything extra, and a fix list for the moments when it refuses to cooperate.

What an MCP Server Does in VS Code

The Model Context Protocol is an open standard that lets an AI assistant call outside tools in a predictable way. Instead of pasting a database schema or a log file into a chat window, you point VS Code at a small program that exposes tools, and the assistant calls them when it needs them.

Developer typing on a laptop in a quiet home office

Tools, Not Plugins

An MCP server is not a VS Code extension. It is a separate process that VS Code launches or connects to. It might read files, query a database, search documentation, or talk to a service like GitHub. The editor acts as the client, and the chat agent decides when a tool is worth calling.

That separation is useful. The same server can work in several editors, and you can write one in almost any language. It is also the reason so many problems show up as "the process did not start" instead of "the extension crashed."

Stdio or HTTP

Servers reach VS Code in two main ways:

TransportHow it runsConfig entryTypical use
stdioVS Code starts a local command and talks through its input and output streamscommand and argsLocal tools, file access, quick experiments
HTTP / SSEVS Code connects to a running URLurlHosted services, shared team servers, OAuth sign-in

If you are not sure which one to pick, begin with stdio. It has fewer moving parts, and you can read the process output directly when something breaks.

💡 Tip: MCP tools only appear in Copilot Chat Agent mode. If you are in Ask or Edit mode, the server can be perfectly healthy and you will still see no tools.

Setup in Five Minutes

Top-down view of a desk with a laptop and a handwritten checklist

Check Your VS Code Version

MCP support arrived in VS Code with version 1.99, so anything older will silently ignore your configuration. Open the Help menu, choose About, and confirm the number. If you are behind, update first. This single step removes a surprising share of "not working" reports, and it also protects you from a few known IPC bugs that were fixed in later builds.

Create the mcp.json File

VS Code reads MCP servers from a file called mcp.json. You have two choices:

  • Workspace level: .vscode/mcp.json inside your project. Good for team projects because you can commit it.
  • User level: the mcp.json in your user profile. Good for personal tools you want in every window.

The root property is servers. This is where most copied configs break, because many other clients use mcpServers instead. VS Code does not read that name. Here is a minimal working file for a local stdio server:

{
  "servers": {
    "memory": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-memory"]
    }
  }
}

And here is the shape of an HTTP entry:

{
  "servers": {
    "my-remote-server": {
      "type": "http",
      "url": "https://example.com/mcp"
    }
  }
}

Replace the URL with the address of a server you actually trust. The example.com address above is a placeholder.

Start the Server

Open mcp.json in the editor. A small play icon (a Start action) appears above or beside each server entry. Click it. VS Code launches the process, completes the handshake, and reports how many tools it found. You can also open the Command Palette and run MCP: List Servers to start, stop or restart any entry.

Switch to Agent Mode

Open Copilot Chat, switch the mode dropdown to Agent, and click the tools icon. Your server's tools should be listed there with checkboxes. Untick anything you do not want the agent to use. Then try a plain request such as "store a note that my project uses PostgreSQL" and watch for a confirmation prompt before the tool runs.

Programmer reading a laptop screen in a sunlit loft

Free MCP Options That Cost Nothing

The protocol itself is free and open. Most of the servers you will meet are open source and run on your own machine, so there is no per-call fee. What can cost money is the AI side, meaning the model that decides when to call a tool.

Free Local Servers

These are common picks that run through npx or a similar runner, and none of them requires a hosted subscription:

Server typeWhat it gives the agentNeeds an account?
MemoryA small knowledge store that persists between chatsNo
FilesystemControlled read and write access to folders you chooseNo
Fetch / webPulls a web page into a readable formNo
GitReads repository history and diffsNo
SQLiteLets the agent query a local database fileNo

Start with memory or filesystem. They have no sign-in, no tokens, and no network dependency, so a failure is almost always a path or version problem rather than a permissions problem.

The Copilot Plan Question

Here is the part where sources disagree. Some documentation says MCP support in VS Code needs a Copilot Individual, Business or Enterprise plan. Other pages are vague about what the free Copilot tier allows. Plans and limits change often, and I could not confirm a single clear answer, so check the current plan page inside your GitHub account before you assume either way.

What I can say with confidence: the servers are free to run. The agent that calls them is the part that depends on your plan. If your plan does not include agent mode, you may need another client that accepts MCP servers.

💡 Tip: If a server needs a GitHub sign-in, VS Code can handle it through its built-in OAuth flow. A browser tab opens, you approve access, and the token stays managed by the editor instead of sitting in a plain text config.

Free Models for Prompt Testing

Before wiring a new server into your project, it helps to test the prompts and the JSON you plan to use. A free or low-cost model is enough for that job. On PicassoIA you can try Granite 4.1 8B, a small model suited to chat and code, or Gemini 3.5 Flash for quick turnarounds. They do not replace the agent inside VS Code, but they are handy for drafting an mcp.json, reading an error message, or rewriting a tool description.

Wide view of a shared workspace with developers at long tables

Not Working? Start Here

Hand resting on a keyboard beside a cold cup of tea

Work through these in order. They are sorted from the most common cause to the rarest.

Read the Output Log First

Do not guess. Run MCP: List Servers, pick the failing entry, and choose Show Output. You can also open the Output panel and select the server's channel from the dropdown. The first red line usually names the problem: a missing command, bad JSON, a rejected token, or a crash message from the server itself.

Copy that line before you change anything. It is your best search term and the most useful thing to paste into an assistant later.

The Wrong Root Property

If you pasted a config from a README written for another client, check the first line. VS Code wants servers. If the file says mcpServers, the editor will show no entries or no play icon at all. Rename the property, save, and the entries should appear.

Also check for a trailing comma or a missing quote. JSON is strict, and a single stray character can make the whole file unreadable.

spawn ENOENT and Missing Commands

An error containing spawn ... ENOENT means VS Code could not find the command you asked it to run. Common causes:

  • Node.js is not installed, so npx does not exist.
  • Node is installed, but VS Code was opened before it was added to PATH.
  • You use a version manager, and its shims are not visible to the editor.

Fix it by installing Node, then fully quitting and reopening VS Code. If that does not work, replace the command with a full absolute path, for example the exact location of npx on your machine. On Windows, remember to escape backslashes in JSON or use forward slashes.

Developer in glasses leaning toward a monitor while debugging

Error -32000 and Noisy Output

For stdio servers, standard output is reserved for protocol messages. If your server prints debug text, a banner, or a stack trace to stdout, the client reads it as corrupted data and the connection closes. You will often see error -32000 or a message about a closed connection.

The rule is simple: send all logs to stderr. In Node that means console.error, and in Python it means writing to sys.stderr. If you did not write the server, check its settings for a quiet or log-file option.

Workspace Trust and OAuth Loops

Two quieter causes are worth checking:

  1. Workspace trust. If the folder is in restricted mode, VS Code may refuse to start servers defined in it. Trust the workspace and try again.
  2. Sign-in loops. Remote servers that use OAuth can get stuck repeating the browser step. A common workaround is to sign out in the browser, restart VS Code, and run the sign-in again so the cached state is replaced.

The MessagePort Error

If you see "Failed to acquire MessagePort", the problem is generally not your config. It is described as an inter-process communication bug in the editor. The first fix to try is an update to the latest VS Code, followed by a full restart rather than a window reload.

Test the Server Alone

When nothing above helps, separate the two halves. Run the server by itself with the MCP Inspector, a small debugging tool for the protocol. If the server fails there too, the fault is in the server. If it works there but not in VS Code, the fault is in the config or the editor integration, and you can stop poking at the code.

Quick Fix Table

SymptomLikely causeFix
No play icon, no entriesmcpServers used instead of serversRename the root property
Server never lists toolsChat is not in Agent modeSwitch the mode dropdown
spawn npx ENOENTNode missing or not in PATHInstall Node, restart, or use a full path
Error -32000Logs written to stdoutMove logs to stderr
Server blockedWorkspace not trustedTrust the folder
Repeated sign-inCached OAuth stateSign out, restart VS Code, retry
MessagePort errorEditor IPC bugUpdate VS Code, full restart
Works in Inspector onlyConfig or editor issueRecheck JSON and paths

Smiling developer with a thumbs up beside a laptop

Stay Safe With Third-Party Servers

An MCP server runs code on your machine or sends your data to someone else's. Treat it like any dependency you install.

Small padlock hanging on a weathered wooden gate

Check Before You Run

  • Read the source or at least the README of any server you did not write.
  • Pin the package version in args when you can, so an update does not change behavior without you noticing.
  • Limit folder access. For a filesystem server, point it at one project directory, not your whole home folder.
  • Approve tool calls. VS Code asks for confirmation before running a tool. Read the prompt instead of clicking through it.

Keep Secrets Out of the File

If a server needs an access token, do not paste it into a committed mcp.json. VS Code supports input prompts and environment variables in the config, so the value is requested at start time or read from your environment. A leaked token in a public repository is a far bigger problem than any broken server.

Use LLMs to Debug Your Config

A language model is surprisingly good at the boring part of this job: reading a stack trace, spotting a missing bracket, or explaining what an error code means. Paste in your mcp.json with secrets removed, along with the first red line from the output log, and ask for the single most likely cause.

A few models on PicassoIA suit this kind of work:

ModelGood for
Claude Sonnet 5Reading long logs and explaining a fix step by step
GPT 5.6 SolHarder coding questions, such as writing your own server
Kimi K2.6Agent-style tasks and code generation
Granite 4.1 8BCheap, quick checks on small config files

💡 Tip: Ask for one change at a time. If an assistant rewrites your whole file, you will not know which edit fixed the issue, and you may add a new problem.

Try It Yourself on PicassoIA

Getting an MCP server running is mostly patience and a clear order of checks: right VS Code version, right file, right root property, right mode, then the output log. Once the first tool call works, adding more servers takes minutes.

If you want a place to draft configs, test prompts, or ask a model to explain an error, open the full model list on PicassoIA and try a language model from the table above. The same platform also generates photorealistic images, so you can create diagrams-style visuals, blog covers, or documentation artwork for your own project without leaving the page. Pick a model, write a prompt, and see what comes back.

Share this article

Choose your language

FreeCreate AI Images and VideosFree, No Credit CardFree Generations to StartSeedance 2.5 Lite IncludedStart Free Now