Skip to content

Latest commit

 

History

History
202 lines (143 loc) · 5.19 KB

File metadata and controls

202 lines (143 loc) · 5.19 KB

N|Solid Migration Summary

Migration Completed

This document summarizes the changes made to migrate the MCP Server for VS Code to the N|Solid runtime.

Files Modified

1. package.json

  • Added nsolid configuration section with:
    • Application name: mcp-server-vscode
    • Tags: vscode,mcp,ai-assistant
    • Tracing enabled by default
    • OTLP exporter configuration
  • Updated start:mcp script to use nsolid instead of node
  • Added start:mcp:node script for fallback to standard Node.js
  • Added start:nsolid script for quick start with auto-configuration

2. src/mcp/standalone-server.ts

  • Added N|Solid environment variable support
  • Enhanced logging to display N|Solid configuration on startup
  • Added telemetry status reporting
  • Improved startup messages with runtime information

3. README.md

  • Added comprehensive "N|Solid Runtime Integration" section including:
    • What is N|Solid
    • Installation instructions (Linux, macOS, Docker)
    • Running with N|Solid (quick start, basic usage, environment variables)
    • Docker deployment instructions
    • Monitoring stack setup
    • Verification steps
    • Configuration options

Files Created

1. Dockerfile

  • Production-ready Dockerfile using nodesource/nsolid:krypton-latest base image
  • Non-root user for security
  • Health check configuration
  • N|Solid environment variables pre-configured
  • Multi-architecture support (x86 and ARM)

2. docker-compose.yml

  • Complete observability stack including:
    • MCP Server for VS Code
    • OpenTelemetry Collector
    • ClickHouse database
    • N|Solid API backend
    • N|Solid UI dashboard
  • Network configuration for service communication
  • Volume persistence for ClickHouse data

3. otel-collector-config.yaml

  • OpenTelemetry Collector configuration
  • OTLP receivers (gRPC and HTTP)
  • ClickHouse exporter configuration
  • Prometheus metrics endpoint
  • Batch processing for optimal performance

4. .dockerignore

  • Optimized Docker build context
  • Excludes unnecessary files (node_modules, test files, etc.)

5. start-nsolid.sh

  • Quick start script for running with N|Solid
  • Automatic N|Solid installation detection
  • OTLP collector auto-detection
  • Environment variable setup
  • User-friendly output with configuration details

Migration Benefits

Zero-Code Instrumentation

  • No changes required to application logic
  • Automatic CPU profiling, heap snapshots, and event loop metrics
  • Built-in security monitoring

Enhanced Observability

  • Distributed tracing with OpenTelemetry
  • Real-time metrics collection
  • Centralized logging
  • Performance monitoring dashboard

Production Ready

  • Docker deployment with N|Solid runtime
  • Health checks and monitoring
  • Multi-architecture support
  • Non-root container security

Developer Experience

  • Quick start script for easy setup
  • Comprehensive documentation
  • Fallback to standard Node.js if needed
  • Auto-detection of monitoring infrastructure

Usage

Local Development

# Quick start with N|Solid
npm run start:nsolid

# Or manual start
npm run start:mcp

# Fallback to Node.js
npm run start:mcp:node

Docker Deployment

# Build and run
docker build -t mcp-server-vscode .
docker run -p 8991:8991 mcp-server-vscode

# Or with full monitoring stack
docker-compose up -d

Verification

  1. Check N|Solid version: nsolid -vv
  2. Open N|Solid UI: http://localhost:3002
  3. Verify application appears in dashboard
  4. Check metrics and traces are flowing

Configuration

N|Solid can be configured via:

  1. package.json (default configuration)
  2. Environment variables (override defaults)
  3. JavaScript API (programmatic control)

Key Environment Variables

Variable Default Description
NSOLID_APPNAME mcp-server-vscode Application name
NSOLID_TRACING_ENABLED 1 Enable distributed tracing
NSOLID_OTLP otlp OTLP exporter type
NSOLID_OTLP_CONFIG localhost:4318 OTLP endpoint configuration
VSCODE_BRIDGE_PORT 8991 VS Code bridge port

Next Steps

  1. Install N|Solid runtime (if not using Docker)
  2. Start the monitoring stack (optional): docker-compose up -d
  3. Run the server: npm run start:nsolid
  4. Verify in N|Solid UI: http://localhost:3002

Troubleshooting

N|Solid Not Found

# macOS
brew install nsolid

# Linux
curl -fsSL https://deb.nodesource.com/setup_24.x | sudo -E bash -
sudo apt-get install nsolid -y

No Metrics in Dashboard

  1. Verify OTLP collector is running: docker-compose ps otel-collector
  2. Check collector logs: docker-compose logs otel-collector
  3. Ensure NSOLID_TRACING_ENABLED=1 is set

Docker Network Issues

  • Use service names (e.g., otel-collector) instead of localhost
  • Verify containers are on same network: docker network ls

References


Migration completed by GitHub Copilot on March 5, 2026