MCP Directory

Best MCP Servers for VS Code (2026)

Six MCP servers that earn their slot in VS Code's agent mode — plus the tool-budget math that tells you what to leave out.

Hua·June 30, 2026·6 min read
Colorful workspace featuring a laptop with code editor and vibrant screens.
Photo by Daniil Komov on Pexels

The best MCP servers for VS Code in 2026 are GitHub MCP Server, GitMCP, Package Registry MCP, Octocode, Anyquery, and Graphlit. VS Code's Copilot agent mode speaks MCP natively, so the only real question is which servers pull their weight against a limited tool budget — and which ones quietly wreck it. This guide is the short list, the config, and the honest cuts.

Most of these run locally over stdio, which matches the ecosystem: roughly 90% of MCP servers run locally over stdio rather than as remote HTTP services. That has real consequences for VS Code — local servers need Docker or a runtime on your machine, remote ones need OAuth and nothing else.

How VS Code loads MCP servers (and why the budget matters)

VS Code loads MCP servers from a .vscode/mcp.json file in your workspace (or your user settings), and every enabled server dumps its tools into one shared list the model sees. That shared list is the catch. Language models degrade as the tool count climbs, and most clients ship a soft ceiling around a 40-tool budget before selection accuracy falls off a cliff.

So adding servers is not free. A single server can register 20+ tools; two greedy ones and you have blown past the budget before writing a line of code. The tool-limit math is the same in VS Code as it is in Cursor: fewer, sharper servers beat a pile of overlapping ones.

The practical rule: install servers per-workspace, not globally, and disable the ones you are not using this week. VS Code lets you toggle individual servers and even individual tools — use it.

Here is the minimal shape of that file:

{
  "servers": {
    "github": {
      "type": "stdio",
      "command": "docker",
      "args": [
        "run", "-i", "--rm",
        "-e", "GITHUB_PERSONAL_ACCESS_TOKEN",
        "ghcr.io/github/github-mcp-server"
      ],
      "env": { "GITHUB_PERSONAL_ACCESS_TOKEN": "${input:github_pat}" }
    }
  }
}

If you would rather not hand-write JSON, each server's page in the best MCP servers catalog carries its ready-to-paste config block.

GitHub MCP Server — the one non-negotiable

GitHub MCP Server is the first server most VS Code users should add, because agent mode without repo, issue, and PR access is half a tool. It is GitHub's official server (not a community port), and it replaces the deprecated @modelcontextprotocol/server-github reference package.

You get two paths. Run it locally with the ghcr.io/github/github-mcp-server Docker image and a personal access token — that is the config above. Or connect to GitHub's hosted remote server at https://api.githubcopilot.com/mcp/ over OAuth, which skips Docker entirely and is the lower-friction choice on a fresh machine.

The trade-off is tool count: it exposes a lot of them, spanning repos, issues, PRs, and Actions. Turn off the toolsets you do not need (Actions, for instance) so it does not eat your whole budget alone.

GitMCP and Package Registry — kill hallucinated APIs

If your agent keeps inventing function signatures and outdated package versions, these two fix it directly. GitMCP is a free remote server that turns any GitHub repo into a live documentation source, so the model reads the actual current docs instead of guessing from training data. It is remote and hosted — no install, just a URL — which makes it the cheapest possible add to any workspace.

Package Registry MCP covers the other half: it searches NPM, crates.io, NuGet, PyPI, and Go registries for current versions, plus GitHub Security Advisories. When the agent proposes a dependency, it can check that the version exists and is not flagged, instead of pinning something from 2023.

Both are small, focused servers — exactly the profile that survives the tool budget. Add them early.

Octocode and Anyquery — code research and local data

For deeper code work, Octocode researches code the way a staff engineer does: it wires GitHub, your local filesystem, and LSP intelligence into the assistant, so it can trace how a symbol is actually used across a codebase rather than pattern-matching on names. It overlaps with GitHub MCP Server on the GitHub side, so pick one as your primary and disable the other's redundant tools.

Anyquery is the wildcard: it runs SQL over files, databases, and 40+ apps — GitHub, Notion, Chrome, Todoist — and exposes all of it to the model over MCP. In VS Code this is how you let the agent query a local SQLite file or a CSV without you writing a script. It is broad, so scope it to what you need per workspace.

Graphlit — when you need RAG over your team's data

Graphlit is the pick when the context you need lives outside the repo — in Slack, Discord, Google Drive, Jira, or Linear. It ingests those sources, indexes them, and serves search and RAG back to the agent, so "why did we decide X" can be answered from the actual thread instead of your memory.

This is not an everyday server. It is worth it on a team codebase where decisions and tickets carry as much weight as the code. Skip it for solo or greenfield work — the ingestion overhead is not justified.

What to install, and what to skip

Here is the short version, ranked by how often it earns its slot:

ServerTransportAdd it whenSkip it when
GitHub MCP Serverstdio (Docker) or remoteAlways — you work with GitHubNever; disable unused toolsets instead
GitMCPremote (hosted)Agent hallucinates APIsYou work fully offline
Package RegistrystdioYou add dependencies oftenConfig-frozen projects
OctocodestdioDeep cross-repo code researchGitHub MCP already covers you
AnyquerystdioYou query local files/DBsPure code editing
GraphlitstdioTeam context lives in Slack/JiraSolo or greenfield

What to skip in general: any server whose job overlaps one you already run, and anything with a huge undifferentiated tool count you cannot narrow. Two focused servers beat five broad ones every time in VS Code. For a wider catalog, browse the best MCP servers list or the picks tuned for coding agents.

FAQ

Are these MCP servers free to use in VS Code?

Yes — all six are free and open source, and GitMCP is a free hosted remote server with nothing to install. VS Code's MCP support in Copilot is built in. Your only costs are indirect: a GitHub personal access token for GitHub MCP Server, and any paid data sources you connect through Anyquery or Graphlit.

Where does VS Code store MCP server config?

VS Code reads MCP servers from a .vscode/mcp.json file in your workspace, or from your user settings for servers you want everywhere. The workspace file uses a top-level "servers" object keyed by server name. Prefer per-workspace config so each project only loads the servers it needs.

How many MCP servers can I add before VS Code slows down?

It is not the number of servers that hurts — it is the total tool count. Models start picking the wrong tool once the combined list passes roughly 40 tools, so a couple of tool-heavy servers can max the budget on their own. Enable only the servers and toolsets you're using, and disable the rest.

Do I need Docker to use these servers?

Only for some. GitHub MCP Server's local path uses Docker, but its remote OAuth endpoint skips it entirely, and GitMCP is remote with no runtime at all. The stdio servers like Package Registry MCP and Octocode run on Node, not Docker. Roughly 90% of MCP servers run locally, so most need some runtime on your machine — but not necessarily Docker.

GitHub MCP Server vs Octocode — which should I use?

Use GitHub MCP Server as your default for repos, issues, PRs, and Actions since it is GitHub's official server. Add Octocode when you need deeper code research — it combines GitHub, local filesystem, and LSP intelligence to trace real usage. Running both is fine, but disable the overlapping GitHub tools on one to protect your tool budget.

Put this into practice

Browse MCP servers by capability, or check your own setup's tool budget and security.

More essays