Skip to main content
Glama

Smart Code Search MCP Server

install.shโ€ข3.17 kB
#!/bin/bash # SCS MCP Server - One-line installer set -e echo "๐Ÿš€ Installing SCS MCP Server..." # Get the directory of this script SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" PROJECT_DIR="$(dirname "$SCRIPT_DIR")" # Check Python version echo "๐Ÿ“ฆ Checking Python..." if ! command -v python3 &> /dev/null; then echo "โŒ Python 3 is required but not installed." exit 1 fi PYTHON_VERSION=$(python3 -c 'import sys; print(".".join(map(str, sys.version_info[:2])))') echo " โœ… Python $PYTHON_VERSION found" # Install dependencies echo "๐Ÿ“ฆ Installing dependencies..." cd "$PROJECT_DIR" pip3 install -q -r requirements.txt 2>/dev/null || { echo " โš ๏ธ Some dependencies might have conflicts, but continuing..." } # Download and check the AI model python3 "$PROJECT_DIR/scripts/download_model.py" || { echo " โš ๏ธ Model download had issues but may work on first use" } # Create Claude Desktop config directory if it doesn't exist CLAUDE_CONFIG_DIR="$HOME/.config/claude" if [ ! -d "$CLAUDE_CONFIG_DIR" ]; then echo "๐Ÿ“ Creating Claude Desktop config directory..." mkdir -p "$CLAUDE_CONFIG_DIR" fi # Update Claude Desktop MCP config echo "๐Ÿ”ง Configuring Claude Desktop..." CLAUDE_CONFIG_FILE="$CLAUDE_CONFIG_DIR/claude_desktop_config.json" if [ -f "$CLAUDE_CONFIG_FILE" ]; then # Backup existing config cp "$CLAUDE_CONFIG_FILE" "$CLAUDE_CONFIG_FILE.backup.$(date +%Y%m%d_%H%M%S)" echo " ๐Ÿ“‹ Backed up existing config" # Add our server to existing config python3 -c " import json import sys config_file = '$CLAUDE_CONFIG_FILE' with open(config_file, 'r') as f: config = json.load(f) if 'mcpServers' not in config: config['mcpServers'] = {} config['mcpServers']['scs-mcp'] = { 'command': 'python3', 'args': ['-m', 'src.server'], 'cwd': '$PROJECT_DIR', 'env': { 'PYTHONPATH': '$PROJECT_DIR' } } with open(config_file, 'w') as f: json.dump(config, f, indent=2) print(' โœ… Updated Claude Desktop configuration') " else # Create new config cat > "$CLAUDE_CONFIG_FILE" << EOF { "mcpServers": { "scs-mcp": { "command": "python3", "args": ["-m", "src.server"], "cwd": "$PROJECT_DIR", "env": { "PYTHONPATH": "$PROJECT_DIR" } } } } EOF echo " โœ… Created Claude Desktop configuration" fi # Test the server echo "๐Ÿงช Testing server..." cd "$PROJECT_DIR" timeout 2 python3 -m src.server 2>/dev/null || { if [ $? -eq 124 ]; then echo " โœ… Server starts successfully" else echo " โš ๏ธ Server test had issues but may still work" fi } echo "" echo "โœจ Installation complete!" echo "" echo "๐Ÿ“ Next steps:" echo " 1. Restart Claude Desktop" echo " 2. The SCS MCP tools will be available in your conversations" echo "" echo "๐Ÿ› ๏ธ Available tools:" echo " โ€ข search - Search code by meaning" echo " โ€ข index - Index a project" echo " โ€ข analyze_symbol - Analyze a symbol" echo " โ€ข find_similar - Find similar code" echo " โ€ข get_context - Get relevant context" echo "" echo "๐Ÿ“ Project location: $PROJECT_DIR" echo ""

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/stevenjjobson/scs-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server