Skip to main content
Glama

CodeGraph CLI MCP Server

by Jakedismo
install-codegraph-osx.shโ€ข5.95 kB
#!/bin/bash # CodeGraph Universal AI Development Platform - Installation Script # Revolutionary 11-language semantic analysis with optimized tool descriptions set -e # Exit on any error echo "๐Ÿš€ Installing CodeGraph Universal AI Development Platform..." echo "๐Ÿ“‹ Features: 11 languages, 8 essential MCP tools, REVOLUTIONARY AI pattern learning, 85%+ resolution, zero overlap with Claude Code" echo "" # Color codes for output RED='\033[0;31m' GREEN='\033[0;32m' BLUE='\033[0;34m' YELLOW='\033[1;33m' NC='\033[0m' # No Color # Check if we're on macOS if [[ "$OSTYPE" != "darwin"* ]]; then echo -e "${RED}โŒ This script is optimized for macOS. For other platforms, adjust the FAISS paths accordingly.${NC}" exit 1 fi # Check if Homebrew is installed if ! command -v brew &> /dev/null; then echo -e "${RED}โŒ Homebrew not found. Please install Homebrew first: https://brew.sh${NC}" exit 1 fi # Check if FAISS is installed if ! brew list faiss &> /dev/null; then echo -e "${YELLOW}โš ๏ธ FAISS not found. Installing FAISS via Homebrew...${NC}" brew install faiss echo -e "${GREEN}โœ… FAISS installed successfully${NC}" else echo -e "${GREEN}โœ… FAISS found${NC}" fi # Check if Cargo is available if ! command -v cargo &> /dev/null; then echo -e "${RED}โŒ Cargo (Rust) not found. Please install Rust: https://rustup.rs${NC}" exit 1 fi echo -e "${BLUE}๐Ÿ”ง Building CodeGraph with universal language support...${NC}" echo "๐Ÿ“Š Languages: Rust, Python, JavaScript, TypeScript, Swift, C#, Ruby, PHP, Go, Java, C++" echo "๐Ÿ› ๏ธ Tools: enhanced_search, semantic_intelligence, impact_analysis, pattern_detection, vector_search, graph_neighbors, graph_traverse, performance_metrics" echo "" # Set up environment variables for FAISS linking export LIBRARY_PATH="/opt/homebrew/opt/faiss/lib:$LIBRARY_PATH" export LD_LIBRARY_PATH="/opt/homebrew/opt/faiss/lib:$LD_LIBRARY_PATH" export DYLD_LIBRARY_PATH="/opt/homebrew/opt/faiss/lib:$DYLD_LIBRARY_PATH" export MACOSX_DEPLOYMENT_TARGET=11.0 echo -e "${BLUE}๐Ÿ”— Environment configured:${NC}" echo " LIBRARY_PATH: /opt/homebrew/opt/faiss/lib" echo " LD_LIBRARY_PATH: /opt/homebrew/opt/faiss/lib" echo " DYLD_LIBRARY_PATH: /opt/homebrew/opt/faiss/lib" echo " MACOSX_DEPLOYMENT_TARGET: 11.0" echo "" FEATURE_FLAGS="ai-enhanced,qwen-integration,embeddings,faiss,embeddings-ollama,codegraph-vector/onnx" INSTALL_DIR="${CODEGRAPH_INSTALL_DIR:-$HOME/.local/bin}" echo -e "${BLUE}๐Ÿš€ Building CodeGraph Universal AI Development Platform...${NC}" echo "โฑ๏ธ This may take a few minutes depending on your system..." echo " Features: ${FEATURE_FLAGS}" echo "" cargo build --release \ --package codegraph-mcp \ --bin codegraph \ --features "${FEATURE_FLAGS}" || { echo "" echo -e "${RED}โŒ Build failed. Please review the error log above.${NC}" exit 1 } echo -e "${BLUE}๐Ÿ“ฆ Installing binary to ${INSTALL_DIR}${NC}" mkdir -p "${INSTALL_DIR}" cp -f "$(pwd)/target/release/codegraph" "${INSTALL_DIR}/codegraph" chmod +x "${INSTALL_DIR}/codegraph" if [ $? -eq 0 ]; then echo "" echo -e "${GREEN}๐ŸŽ‰ SUCCESS! CodeGraph Universal AI Development Platform installed!${NC}" echo "" echo -e "${BLUE}๐Ÿ“‹ What you now have:${NC}" echo " ๐ŸŒ Universal Language Support: 11 programming languages" echo " ๐Ÿง  AI Intelligence Tools: 4 revolutionary analysis tools" echo " ๐Ÿ” Graph Navigation Tools: 3 dependency analysis tools" echo " ๐Ÿ“Š Performance Tools: 1 system monitoring tool" echo " ๐Ÿค– REVOLUTIONARY AI: Pattern learning, semantic caching, parallel processing with 85%+ resolution rates" echo " ๐ŸŽฏ Total: 8 essential tools + COMPLETE next-generation AI intelligence system" echo "" echo -e "${BLUE}๐Ÿš€ Quick Start:${NC}" echo " 1. Navigate to any project directory" echo " 2. Run: ${GREEN}codegraph init .${NC}" echo " 3. Run: ${GREEN}codegraph index .${NC} (auto-detects all 11 languages)" echo " 4. Ensure ${INSTALL_DIR} is on your PATH (e.g. export PATH=\"${INSTALL_DIR}:4PATH\")" echo " 5. Use CodeGraph tools in Claude Code!" echo "" echo -e "${BLUE}๐Ÿ”— MCP Configuration:${NC}" echo " Global config works from any directory - no manual setup needed!" echo "" echo -e "${BLUE}๐Ÿค– AI Embedding Providers:${NC}" echo " โ€ข ONNX (default): Fast, local embeddings for quick indexing" echo " โ€ข Ollama: Advanced code-specialized embeddings for maximum quality" echo " Set CODEGRAPH_EMBEDDING_PROVIDER=onnx or =ollama" echo "" echo -e "${BLUE}โšก Performance Configuration:${NC}" echo " โ€ข High-memory systems: Auto-detected and optimized" echo " โ€ข Workers: Auto-scaled to CPU cores (customize with --workers N)" echo " โ€ข Batch size: Auto-optimized for system memory" echo " โ€ข REVOLUTIONARY AI: Pattern learning, semantic caching, 1000ร— re-indexing speed" echo "" echo -e "${BLUE}๐Ÿ“– Documentation:${NC}" echo " โ€ข CODEGRAPH-MCP-TOOLS-GUIDE.md - Copy to other projects" echo " โ€ข CHANGELOG.md - Complete v1.0.0 release notes" echo " โ€ข README.md - Full platform documentation" echo "" echo -e "${GREEN}๐ŸŒŸ Ready to revolutionize development with COMPLETE next-generation AI intelligence!${NC}" else echo "" echo -e "${RED}โŒ Installation failed. Common issues and solutions:${NC}" echo "" echo -e "${YELLOW}๐Ÿ”ง If FAISS linking fails:${NC}" echo " brew reinstall faiss" echo " brew link faiss" echo "" echo -e "${YELLOW}๐Ÿ”ง If Rust compilation fails:${NC}" echo " rustup update" echo " cargo clean" echo "" echo -e "${YELLOW}๐Ÿ”ง If dependency issues:${NC}" echo " brew update" echo " brew upgrade" echo "" echo "Please resolve the issue and run this script again." exit 1 fi

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/Jakedismo/codegraph-rust'

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