🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

vscode-mcp-server

Package Overview
Dependencies
Maintainers
2
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vscode-mcp-server

VSCode MCP Server for AI assistants to interact with VSCode

0.2.0
latest
npm
Version published
Weekly downloads
430
-15.85%
Maintainers
2
Weekly downloads
 
Created
Source

Code MCP Server

A Model Context Protocol (MCP) server for VS Code integration, enabling AI agents like Goose or Claude to interact with VS Code.

Features

  • File diffing
  • Opening files
  • more to come

Installation

You can install the Code MCP Server using npx:

npx vscode-mcp-server install

This command will:

  • Check your operating system compatibility (Windows/macOS)
  • Install the server
  • Generate a Goose install URL that you can copy and paste it into a browser to easily istall the Goose Extension.

Local Installation Using npm pack

If you want to test the package locally before publishing to npm, you can use npm pack:

  • Clone the repository and navigate to the server directory:

    git clone https://github.com/block/code-mcp.git
    cd code-mcp/server
    
  • Create a tarball of the package:

    npm pack
    

    This will create a file like vscode-mcp-server-X.X.X.tgz in the current directory.

  • Install the package globally from the local tarball:

    npm install -g ./vscode-mcp-server-X.X.X.tgz
    

Usage

Once installed, you can configure your AI assistant to use this server. The server provides various tools for interacting with VS Code, including:

  • Opening files
  • Creating Diffs of file changes that require Accept/Reject

Configuration

After installation, you'll need to configure your AI assistant to use this server.

Goose Desktop Configuration

Goose Settings

  • ID: vscode-mcp-server
  • Name: VSCode MCP Server
  • Description: Allows interaction with VSCode through the Model Context Protocol
  • Command: npx vscode-mcp-server

Claude Desktop Configuration

Add the following to your Claude Desktop configuration file:

  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "vscode-mcp-server": {
      "command": "npx",
      "args": ["vscode-mcp-server"],
      "env": {}
    }
  }
}

Other AI Assistants

For other AI assistants that support the Model Context Protocol, refer to their documentation for how to configure external MCP servers. You'll typically need to provide:

  • The command npx vscode-mcp-server
  • Any required environment variables

Development

Automated Publishing with GitHub Actions (WIP)

  • release.yml: Automatically creates a new release when you push to the main branch with conventional commit messages
  • npm-publish.yml: Automatically publishes to npm when a new release is created

To use these workflows:

  • Push your changes to GitHub with conventional commit messages (e.g., "feat: add install command")
  • The release workflow will create a new release with an incremented version
  • The npm-publish workflow will then publish the new version to npm

You'll need to add an npm token to your GitHub repository secrets:

  • Generate an npm token: npm token create
  • Add the token to your GitHub repository secrets as npm_token

Updating the Package

Update the version

npm version patch/minor/major

Publish

npm publish

Keywords

vscode

FAQs

Package last updated on 28 Mar 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts