🔧 VS Code Setup
Configure Nexus MCP Server with Visual Studio Code and GitHub Copilot for an optimized development experience with 99 carefully curated tools.
📋 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
- Open VS Code
- Go to Extensions (Ctrl/Cmd + Shift + X)
- Search for "Model Context Protocol"
- 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"
}
}
}
}
/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
- Restart VS Code after adding the configuration
- Open Command Palette (Ctrl/Cmd + Shift + P)
- Type "MCP" to see available MCP commands
- Check the status in the VS Code status bar
- 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:
- Edit config.json: Modify the enabled_tools list
- Use web interface: Dynamic tool management at runtime
- 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 dataNexus: String Clean- Clean and normalize textNexus: Base64 Encode- Encode data to base64
🔒 Security Tools
Nexus: Password Generate- Generate secure passwordsNexus: Hash Generate- Create cryptographic hashesNexus: 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
- Enable Debug Logging:
{
"mcp.servers": {
"nexus": {
"env": {
"LOG_LEVEL": "DEBUG"
}
}
}
}
- Check Output Panel:
- Open Output panel (View → Output)
- Select "Model Context Protocol" from dropdown
- Look for connection and error messages
- 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:
- Automatic Detection: Uses optimized tool set for VS Code
- Lazy Loading: Tools are loaded on-demand
- Caching: Results are cached to improve response times
- Resource Limits: Memory and CPU usage is controlled
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