Skip to content

Configuration

j0KZ edited this page Oct 2, 2025 · 1 revision

Configuration Guide

Complete configuration guide for all MCP-compatible editors.

πŸ“‹ Configuration Overview

MCP Agents can be configured in two ways:

  1. Global installation - Install once, use in all projects
  2. Project-level - Install per project (recommended for teams)

🎯 Editor-Specific Configuration

Claude Code

Location: Settings β†’ MCP Servers

Method 1: Using GUI

  1. Open Settings: Ctrl+, (Windows/Linux) or Cmd+, (Mac)
  2. Search for "MCP"
  3. Click "Edit in settings.json"

Method 2: Direct File Edit

File location:

  • Windows: %APPDATA%\Claude Code\User\settings.json
  • macOS: ~/Library/Application Support/Claude Code/User/settings.json
  • Linux: ~/.config/claude-code/settings.json

Configuration:

{
  "mcpServers": {
    "smart-reviewer": {
      "command": "npx",
      "args": ["-y", "@j0kz/smart-reviewer-mcp"]
    },
    "test-generator": {
      "command": "npx",
      "args": ["-y", "@j0kz/test-generator-mcp"]
    },
    "architecture-analyzer": {
      "command": "npx",
      "args": ["-y", "@j0kz/architecture-analyzer-mcp"]
    },
    "security-scanner": {
      "command": "npx",
      "args": ["-y", "@j0kz/security-scanner-mcp"]
    },
    "api-designer": {
      "command": "npx",
      "args": ["-y", "@j0kz/api-designer-mcp"]
    },
    "db-schema": {
      "command": "npx",
      "args": ["-y", "@j0kz/db-schema-mcp"]
    },
    "doc-generator": {
      "command": "npx",
      "args": ["-y", "@j0kz/doc-generator-mcp"]
    },
    "refactor-assistant": {
      "command": "npx",
      "args": ["-y", "@j0kz/refactor-assistant-mcp"]
    }
  }
}

Cursor

Location: Settings β†’ MCP Configuration

File location:

  • Windows: %APPDATA%\Cursor\User\settings.json
  • macOS: ~/Library/Application Support/Cursor/User/settings.json
  • Linux: ~/.config/cursor/settings.json

Configuration (same as Claude Code):

{
  "mcpServers": {
    "smart-reviewer": {
      "command": "npx",
      "args": ["-y", "@j0kz/smart-reviewer-mcp"]
    }
  }
}

Windsurf

Location: Project root .windsurf/mcp_config.json

{
  "servers": {
    "smart-reviewer": {
      "command": "npx",
      "args": ["-y", "@j0kz/smart-reviewer-mcp"]
    },
    "test-generator": {
      "command": "npx",
      "args": ["-y", "@j0kz/test-generator-mcp"]
    }
  }
}

Roo Code

Location: .roo/mcp.json in project root

{
  "mcpServers": {
    "smart-reviewer": {
      "command": "npx",
      "args": ["-y", "@j0kz/smart-reviewer-mcp"]
    }
  }
}

πŸ”§ Installation Methods

Method 1: npx (Recommended)

Pros:

  • No installation needed
  • Always uses latest version
  • No PATH issues
  • Works on all platforms

Cons:

  • Slower first run
  • Requires internet

Configuration:

{
  "command": "npx",
  "args": ["-y", "@j0kz/smart-reviewer-mcp"]
}

Method 2: Global Installation

Pros:

  • Faster startup
  • Works offline
  • Specific version control

Cons:

  • Need to install manually
  • PATH configuration required
  • Manual updates needed

Installation:

npm install -g @j0kz/smart-reviewer-mcp

Configuration:

{
  "command": "smart-reviewer-mcp",
  "args": []
}

Method 3: Local Project Installation

Pros:

  • Version locked per project
  • Team consistency
  • No global pollution

Cons:

  • Larger node_modules
  • Duplicate installations

Installation:

npm install --save-dev @j0kz/smart-reviewer-mcp

Configuration:

{
  "command": "npx",
  "args": ["@j0kz/smart-reviewer-mcp"]
}

βš™οΈ Advanced Configuration

Custom Arguments

{
  "smart-reviewer": {
    "command": "npx",
    "args": ["-y", "@j0kz/smart-reviewer-mcp"],
    "env": {
      "NODE_ENV": "production",
      "LOG_LEVEL": "debug"
    }
  }
}

Memory Limits

For large projects:

{
  "smart-reviewer": {
    "command": "node",
    "args": [
      "--max-old-space-size=4096",
      "node_modules/@j0kz/smart-reviewer-mcp/dist/mcp-server.js"
    ]
  }
}

Timeout Configuration

{
  "smart-reviewer": {
    "command": "npx",
    "args": ["-y", "@j0kz/smart-reviewer-mcp"],
    "timeout": 60000
  }
}

🎨 Per-Tool Configuration

Smart Reviewer

{
  "smart-reviewer": {
    "command": "npx",
    "args": ["-y", "@j0kz/smart-reviewer-mcp"],
    "config": {
      "severity": "strict",
      "autoFix": false,
      "excludePatterns": ["*.test.ts", "*.spec.ts"]
    }
  }
}

Architecture Analyzer

{
  "architecture-analyzer": {
    "command": "npx",
    "args": ["-y", "@j0kz/architecture-analyzer-mcp"],
    "config": {
      "detectCircular": true,
      "generateGraph": true,
      "maxDepth": 10
    }
  }
}

Security Scanner

{
  "security-scanner": {
    "command": "npx",
    "args": ["-y", "@j0kz/security-scanner-mcp"],
    "config": {
      "minSeverity": "medium",
      "scanSecrets": true,
      "scanDependencies": true
    }
  }
}

πŸ” Environment Variables

Setting Environment Variables

Windows PowerShell:

$env:MCP_LOG_LEVEL = "debug"

macOS/Linux:

export MCP_LOG_LEVEL=debug

Available Variables

Variable Values Description
MCP_LOG_LEVEL error, warn, info, debug Logging verbosity
MCP_CACHE_DIR Path Cache directory location
MCP_TIMEOUT Milliseconds Default operation timeout
NODE_ENV production, development Environment mode

πŸ“ Project-Level Configuration

.mcprc.json

Create in project root:

{
  "excludePatterns": [
    "node_modules/**",
    "dist/**",
    "build/**",
    "coverage/**"
  ],
  "severity": "moderate",
  "autoFix": false,
  "cache": true
}

package.json Integration

{
  "mcp": {
    "reviewRules": {
      "complexity": 15,
      "maintainability": 70
    },
    "excludePatterns": ["*.test.ts"]
  }
}

πŸ”„ Multiple Configurations

Development vs Production

Development (.mcp.dev.json):

{
  "severity": "lenient",
  "autoFix": true,
  "verbose": true
}

Production (.mcp.prod.json):

{
  "severity": "strict",
  "autoFix": false,
  "failOnError": true
}

Team Shared Configuration

Commit .mcprc.json to git:

{
  "version": "1.0.0",
  "extends": "@company/mcp-config",
  "rules": {
    "no-console": "error",
    "max-complexity": 10
  }
}

βœ… Validation

Check Configuration

# Validate JSON syntax
cat settings.json | jq .

# Check MCP is configured
grep -r "mcpServers" ~/.config/claude-code/

# Test MCP directly
npx @j0kz/smart-reviewer-mcp --help

Common Mistakes

❌ Trailing commas:

{
  "mcpServers": {
    "smart-reviewer": {
      "command": "npx",
      "args": ["-y", "@j0kz/smart-reviewer-mcp"],  // Remove this comma
    }
  }
}

❌ Wrong command path:

{
  "command": "smart-reviewer"  // Missing -mcp suffix
}

❌ Missing quotes:

{
  "command": npx  // Should be "npx"
}

πŸš€ Quick Setup Wizard

Run this script to auto-configure:

#!/bin/bash
# setup-mcp.sh

EDITOR=$1

if [ "$EDITOR" = "claude-code" ]; then
  CONFIG_PATH="$HOME/.config/claude-code/settings.json"
elif [ "$EDITOR" = "cursor" ]; then
  CONFIG_PATH="$HOME/.config/cursor/settings.json"
else
  echo "Usage: ./setup-mcp.sh [claude-code|cursor]"
  exit 1
fi

# Backup existing config
cp "$CONFIG_PATH" "$CONFIG_PATH.backup"

# Add MCP configuration
jq '.mcpServers += {
  "smart-reviewer": {
    "command": "npx",
    "args": ["-y", "@j0kz/smart-reviewer-mcp"]
  }
}' "$CONFIG_PATH" > "$CONFIG_PATH.tmp"

mv "$CONFIG_PATH.tmp" "$CONFIG_PATH"

echo "βœ… MCP configured for $EDITOR"
echo "Restart your editor to activate"

πŸ“– See Also


← Back to Home | Quick Start β†’