Large Language Models

Model Context Protocol (MCP)

Published 2025-09-07.
Time to read: 7 minutes.

This page is part of the llm collection.

The Model Context Protocol (MCP) is an open standard that helps AI systems easily and securely connect to external data and tools. Anthropic created the MCP.

LLM applications often need outside data. They might need to query databases, fetch documents, or use web APIs. MCP acts as a crucial middle layer. It lets models interact with these external resources smoothly, without needing manual steps.

I recommend you read this entire document:

MCP is often described as the “USB-C for AI applications.” Just as USB-C provides a standardized physical and logical interface for connecting various peripherals to computing devices, MCP offers a consistent protocol for linking AI models to external capabilities.

Cloudflare also has a good overview: Build and deploy Remote Model Context Protocol (MCP) servers to Cloudflare.

MCP Components

Some important components of the MCP architecture include hosts, clients, and servers.

MCP Hosts

An MCP host is the user-facing application that coordinates and manages one or more internal MCP clients on behalf of the user. Hosts initiate connections to MCP servers and orchestrate the overall flow between user requests, LLM processing, and external tools. MCP hosts include:

MCP Clients

MCP clients send requests to MCP servers and return the result to the MCP host. Clients reside within the host application and manage communication with a specific MCP server. They provide servers with access to files, database connections, provide API integrations, and other contextual services. MCP clients can access local services or remote servers.

For Ollama:

MCP Servers

MCP servers are external programs or services that expose capabilities such as tools, resources, and prompts via the MCP protocol. MCP servers connect LLMs to the outside world, dramatically expanding what LLMs can do for users.

Many MCP servers are built using Node.js, for example GitHub Copilot and Azure DevOps MCP servers, and those distributed as npm packages. This aligns well with Visual Studio Code’s ecosystem. Note that Cursor is just a customized version of Visual Studio Code.

For example, the File System MCP server and others mentioned in guides for setting up MCP servers in Visual Studio Code often use Node.js for operations like file management or API interactions. The npx command, which requires Node.js, is frequently used to run these servers. Before configuring MCP servers, ensure you have Node.js installed on your system with npx available for package execution. Most MCP servers require Node.js runtime environment for proper functionality.

A better approach, taken by some MCP servers, is to be bundled as Visual Studio Code extensions, where they run in the Extension Host process, bypassing the need for Node.js. The Extension Host is a Node.js process that runs extension code. Support for MCP servers running as Extension Host processes started with Visual Studio Code version v1.101 (May 2025).

Erroneous Information from OpenAI and Google

During the week I was writing this article (mid-August 2025), ChatGPT (GPT5), Google Gemini, and Google Search all confidently described Cursor as an MCP client and cited incorrect reasoning.

I can see why the confusion happened: the List of Claude MCP Clients contains these same miscategorizations. Ignore that web page. I see many websites confusing the MCP host and MCP client roles, even many websites that should be expected to be authoritative.

LLMs cannot be trusted

Cursor is actually an MCP host that contains many MCP clients.

Grok did not make that mistake, but sometimes it expanded MCP to Microsoft Code Push, which was erroneous.

Ranking Extension Host MCP Servers

I asked Grok to rank the extensions by inferred popularity. It considered factors like platform integration, use case breadth, and visibility in search results.

Extension Name Description How It Runs in Extension Host Key Features/Tools Inferred Popularity
Atlassian MCP Server Extension Connects VS Code to Jira/Confluence for issue tracking and docs in AI workflows. Bundled server starts in Extension Host on activation, using MCP to expose Atlassian APIs as tools/resources without external setup. Tools for Jira tickets, Confluence pages; authentication via VS Code. High: Widely used in enterprise settings due to Jira/Confluence integration and Marketplace availability.
vscode-mcp-server Exposes the active VS Code workspace (files, diagnostics) as an MCP server for external clients like Claude Desktop to edit/code in VS Code. Runs entirely as an extension-activated server in the Extension Host, allowing project switching via workspace config and exposing "problems" tab data as tools. Inspired by Serena but lighter. Workspace access, diagnostics tools; enables AI coding in VS Code without Copilot limits. Moderate to High: Popular for AI-driven coding with external clients, supported by Marketplace and GitHub presence.
Code Runner MCP Server Bundles a Node.js MCP server for running code snippets, diagnostics, and workspace interactions. Starts a Streamable HTTP MCP server on localhost (e.g., port 3098) directly from extension code during activation, executing in the Extension Host for zero-setup. Bundle size: ~4MB. Code example: Uses startMcpServer("http") to get URL and updates mcp.servers config. Tools for code execution, file I/O; integrates with AI agents like Copilot. Moderate: General-purpose code execution and diagnostics, with community visibility via DEV Community.
MCP Diagnostics Extension Provides diagnostic info (errors, warnings) from VS Code to AI agents via MCP. Deploys a bundled MCP server to the user directory on activation, injecting config into VS Code/Cursor; runs in Extension Host with proper permissions for seamless tool exposure. Tools for querying linter/syntax issues; supports Cursor IDE integration. Moderate to Low: Niche diagnostics focus, but Marketplace-listed for VS Code/Cursor users.
PTY MCP Server Integration Enables MCP access to pseudo-terminal (PTY) environments for CLI/REPL automation. Extension bundles and runs the MCP server in Extension Host, dynamically executing CLI tools (e.g., GHCi) as MCP resources. PTY-based tools for interactive shells, REPLs; useful for dynamic CLI automation. Low: Specialized for CLI/REPL automation, limiting its audience.
MCP Software Consultant CLI tool + MCP server + VS Code extension for consulting external AI specialists. The extension component bundles the MCP server to run in Extension Host, allowing Cline (another extension) to query consultants via MCP. Tools for AI delegation; integrates with Cline for multi-agent workflows. Low: Niche AI delegation focus, distributed via GitHub only.
MCP Extension Sample (Official) Microsoft sample for building MCP-enabled extensions. Demonstrates bundling/discovery of MCP servers in Extension Host; registers via mcpServerProvider contribution point. Basic tools/resources; shows dynamic server discovery and bundling. Very Low: Developer sample, not intended for production use.

Grok thinks that all of these MCP servers should run on WSL. This table is also sorted by popularity.

Extension Name Can Run in WSL? Reasoning
Atlassian MCP Server Extension Likely Yes Runs in the Extension Host, exposing Jira/Confluence APIs. It relies on VS Code’s authentication APIs, which are cross-platform. While Atlassian integrations sometimes use platform-specific tools, no Windows-only dependencies are mentioned, and WSL supports Node.js and HTTP-based APIs, so it should work. Minor risk of Atlassian API quirks in WSL, but no evidence suggests incompatibility.
vscode-mcp-server Yes Runs entirely in the Extension Host, exposing workspace and diagnostics data. It’s a lightweight, cross-platform extension inspired by Serena, with no documented dependencies on Windows-specific features. WSL’s Node.js environment should handle it seamlessly, as it integrates with VS Code’s APIs, which are WSL-compatible.
Code Runner MCP Server Yes This server is bundled into an extension and runs a Streamable HTTP MCP server on localhost (e.g., port 3098) directly from extension code during activation, executing in the Extension Host for zero-setup. Bundle size: ~4MB. Code example: Uses startMcpServer("http") to get URL and updates mcp.servers config. WSL supports Node.js, and the extension’s lightweight nature and cross-platform design (no Windows-specific dependencies noted) make it compatible.
MCP Diagnostics Extension Yes Bundled in the Extension Host, this extension injects a server into the user directory on activation, injecting config into VS Code/Cursor; runs in Extension Host with proper permissions for seamless tool exposure. No Windows-specific dependencies are noted, and VS Code’s WSL support ensures the Node.js-based Extension Host can run it. Compatible with Cursor IDE, which also supports WSL.
PTY MCP Server Integration Yes Bundled in the Extension Host, it provides PTY (pseudo-terminal) access for CLI/REPL tools like GHCi. WSL excels at running Linux CLI tools, and VS Code’s terminal APIs are WSL-compatible. The extension’s Node.js-based server should run fine in WSL’s Node.js environment.
MCP Software Consultant Yes The extension component runs in the Extension Host, integrating with Cline for AI workflows. It’s designed to be cross-platform, with no Windows-specific dependencies noted. WSL’s Node.js support ensures compatibility, as it uses standard VS Code APIs and HTTP-based MCP communication.
MCP Extension Sample (Official) Yes Microsoft’s official sample for MCP servers runs in the Extension Host via the mcpServerProvider contribution point. As a cross-platform example designed for VS Code, it’s built to work in WSL, leveraging Node.js and standard APIs without platform-specific requirements.

Grok supplied the following information.

Extension Name Accesses Remote Resources? Reasoning
Atlassian MCP Server Extension Yes Exposes Jira and Confluence APIs, which are cloud-based services hosted remotely, allowing AI workflows to interact with tickets and pages over the internet.
vscode-mcp-server Potentially Yes Primarily exposes local workspace data but supports external clients (e.g., Claude Desktop) that may be remote, enabling potential interaction with internet-hosted tools or services.
Code Runner MCP Server No Focuses on local code execution and workspace interactions, running on localhost (port 3098) with no indication of connecting to external APIs or remote services.
MCP Diagnostics Extension No Limited to providing local diagnostic information (linter/syntax errors) from the VS Code environment, with no mention of external API or remote service access.
PTY MCP Server Integration No Focuses on local pseudo-terminal (PTY) environments for CLI/REPL automation (e.g., GHCi), with no indication of connecting to external APIs or internet-hosted services.
MCP Software Consultant Yes Involves consulting external AI specialists via integration with Cline, implying interaction with remote AI services or agents over the internet.
MCP Extension Sample (Official) No A demo extension for MCP server bundling and discovery, with no production-level functionality for accessing external APIs or remote services.

Installing an MCP Server Into Visual Studio Code

Most MCP servers require uvx, which is provided by the PyPi uv package. WSL users should install uv in WSL; there is no need to install Python for Windows or uv for Windows.

If you have not installed uvx, MCP installations can silently fail. Ensure it is installed by typing:

WSL
$ which uvx
/home/mslinn/.local/bin/uvx 

Now that uvx is available on your computer, you have several choices for how you might install an MCP server:

  • Via command line
  • Via .vscode/mcp.json
  • Guided installation

Via Command Line

If you know the name of an MCP server you can use the command line interface to install it. For example, to install vscode-mcp-server, type:

Shell
$ code --add-mcp '{"name":"vscode-mcp-server","command":"uvx","args":["mcp-server-fetch"]}'
Added MCP servers: vscode-mcp-server 

Via .vscode/mcp.json

If you prefer to manually insert the definition that the above command-line interface generates, create this file in your Visual Studio Code project:

.vscode/mcp.json
{
  "servers": {
    "vscode-mcp-server": {
      "command": "uvx",
      "args": ["mcp-server-fetch"]
    }
  }
}

Guided Installation

When I typed @mcp into the Extensions search area as shown above, and then pressed Browse MCP Servers, the following appeared:

The image above is impressive, but I was really impressed when I typed “@popular mcp server” into the Visual Studio Code extension marketplace search area. So many MCP servers! The mind boggles.

Remember to pay attention to whether or not any MCP Server that you are interested in runs as an Extension Host process.

MCP Server extensions for Visual Studio Code
MCP Server extensions for Visual Studio Code

vscode-mcp-server

I decided to give vscode-mcp-server a try.

Note that this extension uses the streamable HTTP API, not the SSE API.

This extension can allow for execution of shell commands. This means that there is a potential security risk, so use with caution, and ensure that you trust the MCP client that you are using and that the port is not exposed to anything. Authentication would help, but as the MCP authentication spec is still in flux, this has not been implemented for now.

This MCP-compliant server allows AI models and other MCP clients to:

  • List files and directories in your VS Code workspace
  • Read file contents with encoding support and size limits
  • Search for symbols across your workspace
  • Get symbol definitions and hover information by line and symbol name
  • Create new files using VS Code's WorkspaceEdit API
  • Make line replacements in files
  • Check for diagnostics (errors and warnings) in your workspace
  • Execute shell commands in the integrated terminal with shell integration
  • Toggle the server on and off via a status bar item

Currently, only one workspace is supported. The extension also only works locally, to avoid exposing your VS Code instance to any network you may be connected to.

Using with MCP Clients

To connect MCP clients to this server, configure them to use http://localhost:3000/mcp

Remember that you need to enable the server first by clicking on the status bar item!

I could not find a status bar item to control MCP servers, but I did find a menu to control them. Read on to learn more.

After installation, the Visual Studio Code Extensions panel now contained a new section, entitled MCP SERVERS - INSTALLED. You can open this subpanel by pressing CTRL-SHIFT-P to open the Command Palette, and type MCP: Show Installed Servers.

I installed a few more MCP servers, so it looked like this, but vscode-mcp-server was not shown:

The Marketplace page has lot more information. The enablement warning is somewhat misleading. The next section has more information.

Visual Studio Code Extension MCP Servers Do Not Appear

Several issues have been raised on the vscode GitHub project about this problem. It is easy to fix.

The "MCP Servers - Installed" panel in VS Code is designed to display user-installed or manually registered MCP servers (e.g., those configured via an mcp.json file or similar manual setup). However, MCP servers provided by extensions, such as vscode-mcp-server, are not displayed in this panel. This is intentional in the current VS Code implementation, as the panel only lists servers that are explicitly installed or managed by the user, not those bundled or registered automatically by extensions.

This design choice has been noted as confusing by some users, as it creates an expectation that all MCP servers, including those from extensions, should appear in the panel. There have been discussions in the VS Code community about potentially changing this behavior to include extension-provided MCP servers in the future, but as of now, it remains unchanged.
 – Grok

If you want vscode-mcp-server to appear in the MCP Servers - Installed panel, you can manually add an entry to your project’s .vscode/mcp.json. Create this file if it does not exist.

.vscode/mcp.json
{
  "servers": {
    "vscode-mcp-server": {
      "command": "uvx",
      "args": [
        "mcp-server-fetch"
      ]
    }
  }
}

MCP Server Health

  1. Check the logs displayed by the Visual Studio Code Output panel by selecting ChatGPT Copilot, GitHub Copilot, and MCP Server Extension from the dropdown menu and examine the displayed logs to discover whether the server is being detected or used.
    MCP Server Extension log
    [2025-09-08T12:24:22.377Z] INFO: Activating vscode-mcp-server extension
    [2025-09-08T12:24:22.377Z] INFO: [activate] Using port 3000 from configuration
    [2025-09-08T12:24:22.377Z] INFO: [activate] Server enabled: true
    [2025-09-08T12:24:22.377Z] INFO: [getExtensionTerminal] Created new terminal for shell commands
    [2025-09-08T12:24:22.379Z] INFO: Setting up MCP tools with configuration: {"file":true,"edit":true,"shell":true,"diagnostics":true,"symbol":true}
    [2025-09-08T12:24:22.380Z] INFO: MCP file tools registered successfully
    [2025-09-08T12:24:22.380Z] INFO: MCP edit tools registered successfully
    [2025-09-08T12:24:22.380Z] INFO: MCP shell tools registered successfully
    [2025-09-08T12:24:22.380Z] INFO: MCP diagnostics tools registered successfully
    [2025-09-08T12:24:22.380Z] INFO: MCP symbol tools registered successfully
    [2025-09-08T12:24:22.380Z] INFO: [MCPServer.start] Starting MCP server
    [2025-09-08T12:24:22.380Z] INFO: [MCPServer.start] Connecting transport
    [2025-09-08T12:24:22.419Z] INFO: [MCPServer.start] Transport connected (took 39ms)
    [2025-09-08T12:24:22.419Z] INFO: [MCPServer.start] Starting HTTP server
  2. If an MCP server is non-functional, ensure that chat.mcp.enabled is not set false Settings UI or settings.json.
  3. Visual Studio Code employs several caches for MCP servers. To clear the caches, open the Command Palette and run MCP: Reset Cached Tools, then restart Visual Studio Code.

MCP Server Control

Start an MCP server by clicking on its settings icon and selecting Start Server.

Open the settings menu for an MCP server by clicking on its gear icon
Open the settings menu for an MCP server by clicking on its gear icon

The Output for MCP: vscode-mcp-server should show:

2025-09-08 11:19:25.503 [info] Starting server vscode-mcp-server
2025-09-08 11:19:25.503 [info] Connection state: Starting
2025-09-08 11:19:25.503 [info] Starting server from Remote extension host
2025-09-08 11:19:25.519 [info] Connection state: Starting
2025-09-08 11:19:25.519 [info] Connection state: Running

Now you will be presented with this dialog:

The Output log should display new information:

2025-09-08 11:19:26.037 [warning] [server stderr] Downloading lxml (5.0MiB)
2025-09-08 11:19:26.038 [warning] [server stderr] Downloading pydantic-core (1.9MiB)
2025-09-08 11:19:26.131 [warning] [server stderr] Downloading pydantic-core
2025-09-08 11:19:26.205 [warning] [server stderr] Downloading lxml
2025-09-08 11:19:26.221 [warning] [server stderr] Installed 40 packages in 15ms
2025-09-08 11:19:27.034 [info] Discovered 1 tools

Visual Studio Code MCP Settings

VS Code can automatically detect and reuse MCP servers that are defined in other tools, such as Claude Desktop.

User Settings

Visual Studio Code user settings for Windows reside in %AppData%/Code/User/settings.json; for macOS. it resides in $HOME/Library/Application Support/Code/User/settings.json. For me, this file now contained:

%AppData%/Code/User/settings.json
"chat.mcp.discovery.enabled": true,
"vscode-mcp-server.defaultEnabled": true,
"vscode-mcp-server.enabledTools": {
  "file": true,
  "edit": true,
  "shell": true,
  "diagnostics": true,
  "symbol": true
}

All MCP installed servers are mentioned in the Visual Studio Code user settings directory, in a file called %AppData%/Code/User/mcp.json.

%AppData%/Code/User/mcp.json
{
  "servers": {
    "github": {
      "url": "https://api.githubcopilot.com/mcp/",
      "type": "http"
    },
    "markitdown": {
      "command": "uvx",
      "args": [
        "markitdown-mcp"
      ],
      "type": "stdio"
    },
    "huggingface": {
      "type": "http",
      "url": "https://huggingface.co/mcp?login"
    },
    "vscode-mcp-server": {
      "command": "uvx",
      "args": [
        "mcp-server-fetch"
      ]
    }
  },
  "inputs": []
}

Workspace Settings

Visual Studio Code workspace settings are stored in the project, in a subdirectory called .vscode/. The file that contains the settings for MCP servers defined for this workspace is .vscode/mcp.json. My workspace just had settings for the Hugging Face MCP Server:

.vscode/mcp.json
{
  "servers": {
    "hf-mcp-server": {
      "url": "https://huggingface.co/mcp",
      "headers": {
        "Authorization": "Bearer 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"
      }
    }
  }
}

Resources

https://mcpservers.org is a collection of MCP clients and servers. There were 1968 MCP servers listed on 2025-09-06, and several dozen clients listed. Surprisingly, the website has no search capability.

OpenAI Connectors and MCP Servers
This is a great resource: Using MCP with OpenAI & MCP Servers

Flowise allows users to visually build AI agents.

Future Interest

Introducing gpt-realtime and Realtime API updates for production voice agents

* indicates a required field.

Please select the following to receive Mike Slinn’s newsletter:

You can unsubscribe at any time by clicking the link in the footer of emails.

Mike Slinn uses Mailchimp as his marketing platform. By clicking below to subscribe, you acknowledge that your information will be transferred to Mailchimp for processing. Learn more about Mailchimp’s privacy practices.