MCP Server - VSCode Tutorial

MCP Server - VSCode Tutorial

A tutorial to build an MCP server and use vscode as an MCP client

msalemor

Developer Tools
Visit Server

README

MCP Server - VSCode Tutorial

A tutorial to build an MCP server and use Visual Studio Code as an MCP client.

Overview

As of 04/2025, most MCP tutorials and demos are currently targeting the Claude Desktop application. However, you can also perform development and testing if you have GitHub Copilot with Agent mode and use Visual Studio Code as an MCP client.

MCP servers are being written in many languages. This demo implements a sample MCP server, from the mcp-go package samples, in Go becuse the build process generates a high performant, low resource, and small executable that requires no additional parameters to run. MCP servers can be written in languages like Node, Python, and others.

What is an MCP Server

An MCP (Model Context Protocol) server is a lightweight program designed to expose specific capabilities through the standardized Model Context Protocol. This protocol allows applications to provide context to large language models (LLMs) securely and efficiently.

Think of MCP servers as bridges that connect LLMs to various data sources and tools, both local and remote. They enable LLMs to access and interact with files, databases, APIs, and other services in a controlled manner. This makes it easier to build complex workflows and integrate AI models with different systems.

References:

MCP Server code

For my testing, I used the following sample code:

Requirements

  • Visual Studio Code
  • Github Copilot with Agent mode
  • Some Go knowledge

Building the Go server

Note: you can clone the repo and perform other steps, but these are the ones I followed:

  • Clone this repo
  • Change directory to: server
  • Get the required packages: go mod tidy
  • Built the mcp server: go build .
  • Copy the full executable path: C:\Users\user\git\msalemor\mcp-vscode-tutorial\server\mcpgo.exe

Deploying the server

  • Open Github Copilot Chat

  • Change Copilot to Agent mode

  • On the Agent pane, click on Tools

  • On the topbar popup, click + Add More Tools

  • On the topbar popup, click + Add MCP Server

  • On the topbar popup, select Command (stdio)

  • On the command to run, paste the full path to the Go executable

  • Name the server whatever you want

  • Save the MCP configuration as user (global) or workspace (only for the project) settings

  • If you select workspace, Visual Studio will generate the following settings at .vscode/mcp.json

{
    "servers": {
        "mcpgo1": {
            "type": "stdio",
            "command": "C:\\Users\\user\\git\\msalemor\\mcp-vscode-tutorial\\server\\mcpgo.exe",
            "args": []
        }
    }
}
  • Start the server
  • VSCode should show 5 tools (if you have not added others)

Expected results

In the screenshot, we can see that the MCP server is running, and that there are 5 tools registered in VSCode. We can also see that the agent has made to calls to add and notify.

alt text

Testing in the agent type:

  • add 1 + 1
I'll help you add 1 + 1 using the available tools in this MCP (Model Context Protocol) server workspace. It looks like you have an "add" tool implemented in your Go server that can handle addition operations.

Let me call the tool to add 1 + 1:

The result of adding 1 + 1 is 2.

I used the "add" tool that's implemented in your MCP server. The server returned: "The sum of 1.000000 and 1.000000 is 2.000000."
  • Notify: this is a test
I'll help you implement a notification test using the MCP server in your workspace. I see you have a "notify" tool defined but it has an empty description. Let me call this tool to send a notification:

The notification was successfully sent! I used the 9f1_notify tool in your MCP (Model Context Protocol) server, and it returned "notification sent successfully".

Node MCP Server

A Node based server was added to the repo, to run the Node MCP server:

  • Note that this server run with bun.sh instead of Node.
  • Add another MCP configuraiton to VSCode
{
    "servers": {
        "mcpgo-server": {
            "type": "stdio",
            "command": "C:\\Users\\user\\git\\msalemor\\mcp-vscode-tutorial\\server\\mcpgo.exe",
            "args": []
        },
        "bun-server": {
            "type": "stdio",
            "command": "bun",
            "args": [
                "run",
                "C:\\Users\\user\\git\\msalemor\\mcp-vscode-tutorial\\node-server\\index.ts"
            ]
        }
    }
}
  • Make sure that both servers are running
  • Both servers running

Result

  • Query: Get the table schema for users. Create a structure based on the schema. Notify the user when done.

Results from both servers

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
MCP Package Docs Server

MCP Package Docs Server

Facilitates LLMs to efficiently access and fetch structured documentation for packages in Go, Python, and NPM, enhancing software development with multi-language support and performance optimization.

Featured
Local
TypeScript
Claude Code MCP

Claude Code MCP

An implementation of Claude Code as a Model Context Protocol server that enables using Claude's software engineering capabilities (code generation, editing, reviewing, and file operations) through the standardized MCP interface.

Featured
Local
JavaScript
@kazuph/mcp-taskmanager

@kazuph/mcp-taskmanager

Model Context Protocol server for Task Management. This allows Claude Desktop (or any MCP client) to manage and execute tasks in a queue-based system.

Featured
Local
JavaScript
Linear MCP Server

Linear MCP Server

Enables interaction with Linear's API for managing issues, teams, and projects programmatically through the Model Context Protocol.

Featured
JavaScript
mermaid-mcp-server

mermaid-mcp-server

A Model Context Protocol (MCP) server that converts Mermaid diagrams to PNG images.

Featured
JavaScript
Jira-Context-MCP

Jira-Context-MCP

MCP server to provide Jira Tickets information to AI coding agents like Cursor

Featured
TypeScript
Linear MCP Server

Linear MCP Server

A Model Context Protocol server that integrates with Linear's issue tracking system, allowing LLMs to create, update, search, and comment on Linear issues through natural language interactions.

Featured
JavaScript
Sequential Thinking MCP Server

Sequential Thinking MCP Server

This server facilitates structured problem-solving by breaking down complex issues into sequential steps, supporting revisions, and enabling multiple solution paths through full MCP integration.

Featured
Python