mcpField
M
MCP Server - VSCode Tutorial

MCP Server - VSCode Tutorial

Local
github.com/msalemorDeveloper Tools6Updated 72w ago

About MCP Server - VSCode Tutorial

A tutorial for building and running Go and Node MCP servers in Visual Studio Code, aimed at developers using GitHub Copilot Agent mode. It walks through deployment, configuration, and invoking server tools through an agent.

Key features

  1. 01Build a Go MCP server
  2. 02Deploy a Node MCP server
  3. 03Configure VS Code MCP servers
  4. 04Test tools through an agent

Use cases

  1. 01Test MCP servers in VS Code
  2. 02Call tools to retrieve table schemas
  3. 03Generate Go types from a schema

MCP support

The tutorial shows how to configure Go and Node MCP servers in Visual Studio Code and use their tools through GitHub Copilot Agent mode.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

No install method listed yet

We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.

Repository

Tools

No tool list yet

Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.

Details

From the project README

Tutorial: Running two MCP Servers in Visual Studio Code

A tutorial to build a Go and deploy and MCP server and, deploy a Node one 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 guide implements two MCP servers. One in Go and another in Node (bun.sh). The Go MCP server is based on the mcp-go package, and the Go server is based on one of the samples in package's repo. The Node package is something that I am developing to get table schemas.

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:

Requirements

  • Visual Studio Code
  • Github Copilot with Agent mode
  • Some Go knowledge and Go installed
  • Some Node knowledge (or bun.sh) and Node or bun installed

Building and deploying the servers in Windows

Building the Go server
MCP Go package

For my testing, I used the following sample code:

Building the Go server
  • 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\go-server\mcpgo.exe
Deploy the Go server
  • Open Github Copilot Chat

  • Change Copilot to Agent mode

  • README image

  • On the Agent pane, click on Tools

  • On the topbar popup, click + Add More Tools

  • README image

  • On the topbar popup, click + Add MCP Server

  • README image

  • On the topbar popup, select Command (stdio)

  • README image

  • 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\\go-server\\mcpgo.exe",
            "args": []
        }
    }
}
  • Start the server
  • README image
  • VSCode should show 5 tools (if you have not added others)

Deploy the Node Server

  • Open the .vscode/mcp.json file
  • Add the Node bun-server MCP configuration as below:
  • Note: I am using bun.sh instead of node

{
    "servers": {
        "mcpgo-server": {
            "type": "stdio",
            "command": "C:\\Users\\user\\git\\msalemor\\mcp-vscode-tutorial\\go-server\\mcpgo.exe",
            "args": []
        },
        "bun-server": {
            "type": "stdio",
            "command": "bun", // change to Node if using node and do not add this comment
            "args": [
                "run",
                "C:\\Users\\user\\git\\msalemor\\mcp-vscode-tutorial\\node-server\\index.ts"
            ]
        }
    }
}

Running the servers

  • Make sure that both servers are running
  • Status srvers running in the MCP configuration
  • If they are not running, click on start

Testing the servers

  • Create a file called: types.go
  • Make sure the file is the Agent context
  • In the agent type: Get the table schema for users. Create a structure for the schema. Notify the user when done.

Expected results

Servers running

In the screenshot, we can see that the MCP servers are running, and that there are 6 tools registered in VSCode. We can also see that the Agent has used two tools to create a Go types.go file that is based on the users schema.

Screenshot of servers running

Sample query and results
  • On the Agent window type: Get the table schema for users. Create a structure based on the schema. Notify the user when done.
  • Press Enter
Results

Results from both servers

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.