🔧 VS Code Setup

Configure Nexus MCP Server with Visual Studio Code and GitHub Copilot for an optimized development experience with 99 carefully curated tools.

🎯 VS Code Optimization: Nexus automatically provides a curated subset of 99 most useful tools when used with VS Code to respect editor performance and tool limits.

📋 Prerequisites

Required Software

  • Visual Studio Code - Latest version
  • Python 3.8+ - For running Nexus MCP Server
  • MCP Extension - Official Model Context Protocol extension
  • GitHub Copilot - VS Code extension (optional but recommended)

⚙️ Installation

Step 1: Install MCP Extension

Via VS Code Marketplace

  1. Open VS Code
  2. Go to Extensions (Ctrl/Cmd + Shift + X)
  3. Search for "Model Context Protocol"
  4. Install the official MCP extension

Via Command Line

code --install-extension modelcontextprotocol.mcp

Step 2: Configure Settings

Add the following configuration to your VS Code settings.json file:

{
  "mcp.servers": {
    "nexus": {
      "command": "python",
      "args": ["/absolute/path/to/nexus-mcp-server/multi_server_minimal.py"],
      "env": {
        "PYTHONPATH": "/absolute/path/to/nexus-mcp-server",
        "MCP_SERVER_NAME": "NexusServer",
        "LOG_LEVEL": "INFO"
      }
    }
  }
}
⚠️ Important: Replace /absolute/path/to/nexus-mcp-server with the actual absolute path to your Nexus installation directory.

Step 3: Alternative Configuration Files

Nexus provides pre-configured settings files for different use cases:

🎯 Optimized Config

config-vscode.json - Full feature set optimized for VS Code

cp config-vscode.json config.json

⚡ Minimal Config

config-minimal-vscode.json - Essential tools only

cp config-minimal-vscode.json config.json

✅ Verification

Test the Installation

  1. Restart VS Code after adding the configuration
  2. Open Command Palette (Ctrl/Cmd + Shift + P)
  3. Type "MCP" to see available MCP commands
  4. Check the status in the VS Code status bar
✅ Success indicators:
  • MCP status shows "Connected" in the status bar
  • Nexus tools appear in the command palette
  • No error messages in the Output panel (MCP section)

Test Available Tools

Use the command palette to test some Nexus tools:

🧮 Mathematical Operations

  • Search for "add" to test basic math
  • Try "calculate" for advanced calculations
  • Use "random" for random number generation

🔧 System Tools

  • Search for "system" to get system info
  • Try "timestamp" for current time
  • Use "uuid" for unique ID generation

⚙️ Advanced Configuration

Environment Variables

Customize Nexus behavior with these environment variables:

Variable Description Default
MCP_SERVER_NAME Server identification name NexusServer
LOG_LEVEL Logging verbosity level INFO
PYTHONPATH Python module search path Current directory
SAFE_FILES_DIR Directory for file operations safe_files

Tool Selection

VS Code configuration automatically uses the optimized tool set. To customize which tools are available:

  1. Edit config.json: Modify the enabled_tools list
  2. Use web interface: Dynamic tool management at runtime
  3. Environment flags: Set specific tool categories
{
  "enabled_tools": [
    "basic_tools",
    "calculator",
    "system_info",
    "crypto_tools",
    "file_operations",
    "datetime_tools"
  ],
  "client_detection": {
    "vscode_limit": 99,
    "claude_full_access": true
  }
}

🚀 Usage Examples

With GitHub Copilot

When using GitHub Copilot with Nexus, you can reference tools in your comments and code:

# Use Nexus to generate a UUID for this user
user_id = nexus.generate_uuid()

# Calculate the hash of this password
password_hash = nexus.generate_hash("user_password", "sha256")

# Get current system information
system_info = nexus.system_overview()

Command Palette Usage

📊 Data Processing

  • Nexus: JSON Validate - Validate JSON data
  • Nexus: String Clean - Clean and normalize text
  • Nexus: Base64 Encode - Encode data to base64

🔒 Security Tools

  • Nexus: Password Generate - Generate secure passwords
  • Nexus: Hash Generate - Create cryptographic hashes
  • Nexus: Port Scan - Network security scanning

🔍 Troubleshooting

Common Issues

Connection Failed

  • Check that Python path is correct and absolute
  • Verify that all required packages are installed
  • Ensure the Nexus server script is executable

Tools Not Appearing

  • Restart VS Code after configuration changes
  • Check the Output panel for MCP errors
  • Verify the config.json file is valid

Debugging Steps

  1. Enable Debug Logging:
{
  "mcp.servers": {
    "nexus": {
      "env": {
        "LOG_LEVEL": "DEBUG"
      }
    }
  }
}
  1. Check Output Panel:
  1. Manual Testing:
# Test the server directly
cd /path/to/nexus-mcp-server
python multi_server_minimal.py

# Test with client
python client.py add '{"a": 5, "b": 3}'

⚡ Performance Optimization

Tool Limits

VS Code has performance considerations when loading many tools. Nexus handles this by:

Configuration Tips

🎯 Essential Tools Only

Use config-minimal-vscode.json for basic functionality

🚀 Full Feature Set

Use config-vscode.json for comprehensive tools

🔧 Custom Selection

Edit config.json to choose specific tool categories

🎯 Next Steps

📚 Explore Tools

Learn about all available tools and their capabilities

Tools Overview →

🛠️ Dynamic Tools

Create custom tools on-the-fly for specific tasks

Dynamic Tools →

🌐 API Access

Use Nexus from any programming language

Enhanced API →