Skip to main content
Glama

Smart Code Search MCP Server

.env.example10.5 kB
# ===================================================== # SCS-MCP Configuration Example # ===================================================== # Copy this file to .env and update with your settings # All paths should be absolute or relative to the project root # ===================================================== # PROJECT SETTINGS # ===================================================== # PROJECT_ROOT: The root directory of the code you want to index and search # This should point to your actual project, not the SCS-MCP directory # Examples: # Windows: C:/Users/YourName/Projects/MyProject # WSL/Linux: /home/username/projects/myproject # macOS: /Users/username/Projects/MyProject PROJECT_ROOT=/path/to/your/project # PROJECT_NAME: A friendly name for your project (used in logs and UI) PROJECT_NAME=MyProject # ===================================================== # MODEL SETTINGS # ===================================================== # EMBEDDING_MODEL: The sentence transformer model for semantic search # Options: # - all-MiniLM-L6-v2 (default, 384 dimensions, fast, good quality) # - all-mpnet-base-v2 (768 dimensions, higher quality, slower) # - all-distilroberta-v1 (768 dimensions, good for longer texts) # Note: Changing this requires reindexing your project EMBEDDING_MODEL=all-MiniLM-L6-v2 # EMBEDDING_CACHE_SIZE: Number of embeddings to cache in memory # Higher values = faster repeated searches but more memory usage # Recommended: 500-2000 depending on available RAM EMBEDDING_CACHE_SIZE=1000 # ===================================================== # PERFORMANCE SETTINGS # ===================================================== # MAX_WORKERS: Number of parallel workers for indexing and analysis # Recommended: Number of CPU cores - 1 # Range: 1-16 MAX_WORKERS=4 # BATCH_SIZE: Number of files to process in each batch # Higher values = faster indexing but more memory usage # Recommended: 16-64 for most systems BATCH_SIZE=32 # CACHE_TTL: How long to cache search results (in seconds) # 300 = 5 minutes, 3600 = 1 hour, 86400 = 1 day CACHE_TTL=300 # INDEX_UPDATE_INTERVAL: How often to check for file changes (in seconds) # Set to 0 to disable automatic updates # Recommended: 3600 (1 hour) for active development INDEX_UPDATE_INTERVAL=3600 # ===================================================== # FEATURE FLAGS # ===================================================== # ENABLE_GIT_HISTORY: Enable searching through git commit history # Requires git repository in PROJECT_ROOT ENABLE_GIT_HISTORY=true # ENABLE_METRICS: Enable code metrics collection (complexity, quality scores) # Slightly increases indexing time but provides richer analysis ENABLE_METRICS=true # ENABLE_ORCHESTRATION: Enable multi-agent orchestration for complex analyses # Required for instant_review, debt_orchestrator, and other advanced tools ENABLE_ORCHESTRATION=true # ENABLE_VOICE: Enable voice assistant web interface # Starts a local web server for voice interactions ENABLE_VOICE=true # ENABLE_BROWSER_MCP: Enable browser automation tools # Requires Playwright installation (npm install playwright) ENABLE_BROWSER_MCP=false # ===================================================== # DATABASE SETTINGS # ===================================================== # DB_PATH: Path to the SQLite database file # Default creates it in .claude-symbols directory # You can specify an absolute path if needed DB_PATH=.claude-symbols/search_index.db # DB_POOL_SIZE: Number of database connections to maintain # Higher values allow more concurrent operations # Recommended: 3-10 DB_POOL_SIZE=5 # DB_TIMEOUT: Maximum time to wait for database lock (in seconds) # Increase if you get "database is locked" errors DB_TIMEOUT=30 # ===================================================== # VOICE ASSISTANT SETTINGS (Optional) # ===================================================== # VOICE_SERVER_PORT: Port for the voice assistant web interface # Make sure this port is not in use by other applications VOICE_SERVER_PORT=3000 # VOICE_WS_PORT: WebSocket port for real-time voice communication VOICE_WS_PORT=3001 # VOICE_AUTO_START: Automatically start voice server with MCP server # Set to true if you always want voice features available VOICE_AUTO_START=false # VOICE_LANGUAGE: Default language for speech recognition # Examples: en-US, en-GB, es-ES, fr-FR, de-DE, ja-JP, zh-CN VOICE_LANGUAGE=en-US # VOICE_WAKE_WORD: Optional wake word to activate voice commands # Leave empty to always listen when microphone is on VOICE_WAKE_WORD= # ===================================================== # API KEYS (Optional) # ===================================================== # ELEVENLABS_API_KEY: For high-quality text-to-speech responses # Get your API key from https://elevenlabs.io/ # Leave commented out to use browser's built-in TTS # ELEVENLABS_API_KEY=your_elevenlabs_api_key_here # ELEVENLABS_VOICE_ID: Specific voice to use (optional) # Browse voices at https://elevenlabs.io/voice-library # Default uses "Rachel" if not specified # ELEVENLABS_VOICE_ID=21m00Tcm4TlvDq8ikWAM # OPENAI_API_KEY: For enhanced natural language processing (future feature) # Currently not used but reserved for future enhancements # OPENAI_API_KEY=your_openai_api_key_here # ANTHROPIC_API_KEY: For direct Claude API access (future feature) # Currently not needed as we use MCP protocol # ANTHROPIC_API_KEY=your_anthropic_api_key_here # ===================================================== # SECURITY SETTINGS # ===================================================== # API_KEY: Optional API key for securing the MCP server # If set, clients must provide this key to connect # Leave empty for local-only access (recommended for personal use) API_KEY= # CORS_ORIGIN: Allowed origin for web interface CORS requests # Change this if hosting the voice assistant on a different domain # Use * to allow all origins (not recommended for production) CORS_ORIGIN=http://localhost:3000 # SECURE_MODE: Enable additional security checks # When true, enforces stricter input validation and sanitization SECURE_MODE=false # ALLOWED_HOSTS: Comma-separated list of allowed hostnames # Only relevant if exposing the server externally # Example: localhost,127.0.0.1,192.168.1.100 ALLOWED_HOSTS=localhost,127.0.0.1 # ===================================================== # LOGGING # ===================================================== # LOG_LEVEL: Minimum log level to record # Options: DEBUG, INFO, WARNING, ERROR, CRITICAL # DEBUG shows everything, ERROR shows only errors LOG_LEVEL=INFO # LOG_FILE: Path to the log file # Relative paths are from project root # Set to "console" to only log to console LOG_FILE=logs/scs-mcp.log # LOG_MAX_SIZE_MB: Maximum size of log file before rotation # When reached, creates numbered backup files LOG_MAX_SIZE_MB=10 # LOG_BACKUP_COUNT: Number of old log files to keep LOG_BACKUP_COUNT=5 # DEBUG_MODE: Enable verbose debug output # Shows detailed information about search queries and indexing # Warning: Generates a lot of output, only for troubleshooting DEBUG_MODE=false # ===================================================== # LIMITS AND CONSTRAINTS # ===================================================== # MAX_FILE_SIZE_MB: Maximum size of files to index (in megabytes) # Files larger than this are skipped during indexing # Recommended: 5-20 MB depending on your use case MAX_FILE_SIZE_MB=10 # MAX_SEARCH_RESULTS: Maximum number of results to return per search # Higher values provide more context but slower response # Recommended: 50-200 MAX_SEARCH_RESULTS=100 # MAX_INDEX_FILES: Maximum number of files to index # Safety limit to prevent accidental indexing of huge directories # Set to 0 for no limit MAX_INDEX_FILES=100000 # RATE_LIMIT_REQUESTS_PER_MINUTE: API rate limiting # Only applies if API_KEY is set and external access is enabled # 0 = no rate limiting RATE_LIMIT_REQUESTS_PER_MINUTE=100 # MIN_FILE_SIZE_BYTES: Minimum file size to index (in bytes) # Skip empty or very small files # Default: 10 bytes MIN_FILE_SIZE_BYTES=10 # ===================================================== # INDEXING SETTINGS # ===================================================== # EXCLUDED_DIRS: Comma-separated list of directories to exclude from indexing # These are in addition to the default exclusions # Default exclusions: .git, node_modules, __pycache__, .venv, venv, dist, build EXCLUDED_DIRS=.git,node_modules,__pycache__,.venv,venv,dist,build,target,.pytest_cache # INCLUDED_EXTENSIONS: Comma-separated list of file extensions to index # Leave empty to use defaults for each language # Example: .py,.js,.ts,.jsx,.tsx,.java,.go,.rs,.rb,.cpp,.h INCLUDED_EXTENSIONS= # EXCLUDED_EXTENSIONS: File extensions to never index # Useful for excluding generated or binary files EXCLUDED_EXTENSIONS=.pyc,.pyo,.pyd,.so,.dylib,.dll,.exe,.bin,.dat # INDEX_HIDDEN_FILES: Whether to index files starting with dot (.) # Set to true to include .env, .gitignore, etc. INDEX_HIDDEN_FILES=false # INDEX_DOCUMENTATION: Whether to index markdown and text files # Enables searching through README, docs, and comments INDEX_DOCUMENTATION=true # ===================================================== # ADVANCED SETTINGS # ===================================================== # VECTORDB_TYPE: Type of vector database to use (future feature) # Currently only sqlite is supported # Future options: chroma, pinecone, weaviate, qdrant VECTORDB_TYPE=sqlite # ENABLE_TELEMETRY: Send anonymous usage statistics (future feature) # Helps improve the project by understanding usage patterns # No personal data or code is ever sent ENABLE_TELEMETRY=false # PLUGIN_DIR: Directory containing custom plugins (future feature) # For extending SCS-MCP with custom analyzers and tools PLUGIN_DIR=plugins/ # EXPERIMENTAL_FEATURES: Enable experimental features # Warning: May be unstable or change in future versions EXPERIMENTAL_FEATURES=false # ===================================================== # NOTES # ===================================================== # 1. All paths can be absolute or relative to the SCS-MCP directory # 2. Windows users: Use forward slashes (/) or escaped backslashes (\\) # 3. WSL users: Use Linux-style paths (/mnt/c/... for Windows drives) # 4. Changes to most settings take effect on next server restart # 5. Changes to EMBEDDING_MODEL require full reindexing # For more information, see: https://github.com/StevenJJobson/scs-mcp/docs

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