Skip to content

Latest commit

 

History

History
167 lines (124 loc) · 3.59 KB

installation.md

File metadata and controls

167 lines (124 loc) · 3.59 KB

Installation Guide

🚧 Documentation In Progress

This documentation is being actively developed. More details will be added soon.

Prerequisites

Before installing MCP Codebase Insight, ensure you have the following:

  • Python 3.11 or higher
  • pip (Python package installer)
  • Git
  • Docker (optional, for containerized deployment)
  • 4GB RAM minimum (8GB recommended)
  • 2GB free disk space

System Requirements

Operating Systems

  • Linux (Ubuntu 20.04+, CentOS 8+)
  • macOS (10.15+)
  • Windows 10/11 with WSL2

Python Dependencies

  • FastAPI
  • Pydantic
  • httpx
  • sentence-transformers
  • qdrant-client

Installation Methods

1. Using pip (Recommended)

# Create and activate a virtual environment
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate

# Install MCP Codebase Insight
pip install mcp-codebase-insight

# Verify installation
mcp-codebase-insight --version

2. Using Docker

# Pull the Docker image
docker pull modelcontextprotocol/mcp-codebase-insight

# Create necessary directories
mkdir -p docs knowledge cache

# Run the container
docker run -p 3000:3000 \
    --env-file .env \
    -v $(pwd)/docs:/app/docs \
    -v $(pwd)/knowledge:/app/knowledge \
    -v $(pwd)/cache:/app/cache \
    modelcontextprotocol/mcp-codebase-insight

3. From Source

# Clone the repository
git clone https://github.com/modelcontextprotocol/mcp-codebase-insight.git
cd mcp-codebase-insight

# Create and activate virtual environment
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate

# Install dependencies
pip install -r requirements.txt

# Install in development mode
pip install -e .

Environment Setup

  1. Create a .env file in your project root:
MCP_HOST=127.0.0.1
MCP_PORT=3000
QDRANT_URL=http://localhost:6333
MCP_DOCS_CACHE_DIR=./docs
MCP_ADR_DIR=./docs/adrs
MCP_KB_STORAGE_DIR=./knowledge
MCP_DISK_CACHE_DIR=./cache
LOG_LEVEL=INFO
  1. Create required directories:
mkdir -p docs/adrs knowledge cache

Post-Installation Steps

  1. Vector Database Setup

  2. Verify Installation

    # Start the server
    mcp-codebase-insight --host 127.0.0.1 --port 3000
    
    # In another terminal, test the health endpoint
    curl http://localhost:3000/health
  3. Initial Configuration

    • Configure authentication (if needed)
    • Set up logging
    • Configure metrics collection

Common Installation Issues

1. Dependencies Installation Fails

# Try upgrading pip
pip install --upgrade pip

# Install wheel
pip install wheel

# Retry installation
pip install mcp-codebase-insight

2. Port Already in Use

# Check what's using port 3000
lsof -i :3000  # On Linux/macOS
netstat -ano | findstr :3000  # On Windows

# Use a different port
mcp-codebase-insight --port 3001

3. Permission Issues

# Fix directory permissions
chmod -R 755 docs knowledge cache

Next Steps

Support

If you encounter any issues during installation:

  1. Check the Troubleshooting Guide
  2. Search existing GitHub Issues
  3. Open a new issue if needed