
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
vscode-remote-mcp
Advanced tools
The VSCode Remote MCP Server is an enhanced implementation of the Model Context Protocol (MCP) designed specifically for VSCode Remote integration. It provides a robust set of tools for code analysis, modification, searching, and VSCode instance management through Docker containers. This server enables AI assistants and other tools to interact with your codebase and manage development environments programmatically.
The VSCode Remote MCP Server follows a client-server architecture based on the Model Context Protocol (MCP) specification. The server exposes a set of tools and resources that clients can use to perform various operations on code files and manage VSCode instances.
┌─────────────┐ ┌───────────────────────┐ ┌─────────────────┐
│ │ │ │ │ │
│ MCP Client ├─────┤ VSCode Remote MCP ├─────┤ Code Files │
│ (AI Tool) │ │ Server │ │ VSCode Instances│
│ │ │ │ │ │
└─────────────┘ └───────────────────────┘ └─────────────────┘
The server implements the MCP protocol version 2024-11-05, which includes:
Code Analysis: Analyze code files for structure, complexity, and potential issues
Code Modification: Modify code files with various operations
Code Search: Search for patterns in code files
VSCode Instance Management: Deploy, list, and stop VSCode instances
Job Resource Management: Manage resources for VSCode instances and jobs
Robust Discovery Endpoints: Reliable discovery endpoints with proper timeout handling
Standardized Protocol: Follows the MCP protocol specification
git clone https://github.com/yourusername/vscode-remote-mcp.git
cd vscode-remote-mcp
npm install
.env file in the root directory (optional):PORT=3001
HOST=localhost
LOG_LEVEL=debug
REQUEST_TIMEOUT=45000
HEARTBEAT_INTERVAL=10000
MCP_DEBUG=1
Start the MCP server with the following command:
node run-mcp-server.js
Clients can connect to the server using the MCP protocol. The server exposes the following endpoints:
http://localhost:3001/mcp/discoveryhttp://localhost:3001/mcp/toolshttp://localhost:3001/mcp/resourcesTo integrate this MCP server with Roo, add the following configuration to .roo/mcp.json:
{
"mcpServers": {
"sparc2-mcp": {
"command": "node",
"args": [
"vscode-remote-mcp/run-mcp-server.js"
],
"alwaysAllow": [
"analyze_code",
"modify_code",
"search_code",
"deploy_vscode_instance",
"list_vscode_instances",
"stop_vscode_instance",
"manage_job_resources"
]
}
}
}
To deploy a new VSCode instance:
// Example client code
const response = await client.executeTool('deploy_vscode_instance', {
name: 'my-project',
workspace_path: '/path/to/workspace',
port: 8080,
extensions: ['ms-python.python', 'dbaeumer.vscode-eslint']
});
console.log(`VSCode instance deployed at: ${response.url}`);
To analyze a code file:
// Example client code
const response = await client.executeTool('analyze_code', {
file_path: '/path/to/file.js',
include_metrics: true,
include_structure: true,
include_issues: true
});
console.log(response.content[0].text);
The server can be configured through environment variables:
| Variable | Description | Default |
|---|---|---|
PORT | Port to listen on | 3001 |
HOST | Host to bind to | localhost |
LOG_LEVEL | Logging level | info |
REQUEST_TIMEOUT | Timeout for requests in milliseconds | 45000 |
HEARTBEAT_INTERVAL | Interval for heartbeat messages in milliseconds | 10000 |
MCP_DEBUG | Enable debug logging | 0 |
DEFAULT_PASSWORD | Default password for VSCode instances | changeme |
DEFAULT_EXTENSIONS | Default extensions for VSCode instances | ms-python.python,dbaeumer.vscode-eslint |
DEFAULT_CPU_LIMIT | Default CPU limit for VSCode instances | 1.0 |
DEFAULT_MEMORY_LIMIT | Default memory limit for VSCode instances | 2g |
src/tools/:// src/tools/my_new_tool.js
async function myNewTool(params) {
// Tool implementation
return {
content: [
{
type: 'text',
text: 'Tool executed successfully'
}
],
// Additional result data
};
}
module.exports = myNewTool;
src/tools/index.js:// src/tools/index.js
const analyzeCode = require('./analyze_code');
const modifyCode = require('./modify_code');
const searchCode = require('./search_code');
const deployVSCodeInstance = require('./deploy_vscode_instance');
const listVSCodeInstances = require('./list_vscode_instances');
const stopVSCodeInstance = require('./stop_vscode_instance');
const manageJobResources = require('./manage_job_resources');
const myNewTool = require('./my_new_tool');
module.exports = {
analyze_code: analyzeCode,
modify_code: modifyCode,
search_code: searchCode,
deploy_vscode_instance: deployVSCodeInstance,
list_vscode_instances: listVSCodeInstances,
stop_vscode_instance: stopVSCodeInstance,
manage_job_resources: manageJobResources,
my_new_tool: myNewTool
};
run-mcp-server.js.You can customize the Docker image used for VSCode instances by modifying the buildDockerCommand function in src/tools/deploy_vscode_instance.js.
The server includes a resource management system for VSCode instances and associated jobs. You can use the manage_job_resources tool to allocate, update, and deallocate resources.
Analyzes code files and provides insights about their structure, complexity, and potential issues.
Parameters:
file_path (required): Path to the file to analyzeinclude_metrics (optional, default: true): Whether to include complexity metricsinclude_structure (optional, default: true): Whether to include structure analysisinclude_issues (optional, default: true): Whether to include potential issuesReturns:
Example:
{
file_path: '/path/to/file.js',
include_metrics: true,
include_structure: true,
include_issues: true
}
Modifies code files with various operations like adding, updating, or removing code segments.
Parameters:
file_path (required): Path to the file to modifyoperation (required): Operation to perform (add, update, remove, replace)position (optional): Position to perform the operation at (line, column)content (optional): Content to add or updatepattern (optional): Pattern to match for update or remove operationsrange (optional): Range of lines to modify (start_line, end_line)Returns:
Example:
{
file_path: '/path/to/file.js',
operation: 'add',
position: { line: 10 },
content: 'console.log("Hello, world!");'
}
Searches for patterns in code files and returns matching results with context.
Parameters:
pattern (required): Pattern to search fordirectory (optional, default: '.'): Directory to search infile_pattern (optional, default: '*'): File pattern to matchcontext_lines (optional, default: 2): Number of context lines to includemax_results (optional, default: 100): Maximum number of results to returnignore_case (optional, default: false): Whether to ignore caseuse_regex (optional, default: true): Whether to use regexReturns:
Example:
{
pattern: 'function\\s+\\w+\\s*\\(',
directory: 'src',
file_pattern: '*.js',
context_lines: 2,
max_results: 50,
ignore_case: false,
use_regex: true
}
Deploys a new VSCode instance using Docker.
Parameters:
name (required): Instance nameworkspace_path (required): Path to workspace directoryport (optional): Port to expose (random if not specified)password (optional): Password for authenticationextensions (optional): Extensions to installcpu_limit (optional): CPU limitmemory_limit (optional): Memory limitenvironment (optional): Environment variablesReturns:
Example:
{
name: 'my-project',
workspace_path: '/path/to/workspace',
port: 8080,
extensions: ['ms-python.python', 'dbaeumer.vscode-eslint'],
cpu_limit: 2,
memory_limit: '4g'
}
Lists all deployed VSCode instances and their status.
Parameters:
filter (optional): Filter instances by namestatus (optional, default: 'all'): Filter instances by status (running, stopped, all)Returns:
Example:
{
filter: 'my-project',
status: 'running'
}
Stops a running VSCode instance.
Parameters:
name (required): Instance nameforce (optional, default: false): Force stopReturns:
Example:
{
name: 'my-project',
force: false
}
Manages resources for VSCode instances and associated jobs.
Parameters:
job_id (required): Job IDoperation (required): Operation to perform (allocate, deallocate, update, status)resources (optional): Resources to allocate or update (cpu, memory, disk)Returns:
Example:
{
job_id: '12345',
operation: 'allocate',
resources: {
cpu: 2,
memory: '4g',
disk: '20g'
}
}
If you encounter timeout issues with the discovery endpoints, check:
REQUEST_TIMEOUT environment variable (default: 45000ms)MCP_DEBUG=1node test-discovery-fix.jsIf you encounter issues with Docker:
docker logs <container-name>If you encounter issues with resource management:
MIT
FAQs
Enhanced MCP server for VSCode Remote integration
We found that vscode-remote-mcp demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

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.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.