Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Server Configuration
MCP_HOST=0.0.0.0
MCP_PORT=4242
MCP_LOG_LEVEL=INFO

# Redis Configuration
REDIS_HOST=localhost
REDIS_PORT=6379
REDIS_PASSWORD=
REDIS_DB=0

# Docker Configuration
DOCKER_HOST=unix:///var/run/docker.sock
JOERN_IMAGE=joernio/joern:latest
JOERN_MEMORY_LIMIT=4g
JOERN_CPU_LIMIT=2

# Session Configuration
SESSION_TTL=3600
SESSION_IDLE_TIMEOUT=1800
MAX_CONCURRENT_SESSIONS=10
PREWARM_POOL_SIZE=2

# CPG Generation
CPG_GENERATION_TIMEOUT=600
MAX_REPO_SIZE_MB=500

# Query Execution
QUERY_TIMEOUT=30
QUERY_CACHE_ENABLED=true
QUERY_CACHE_TTL=300

# Storage
WORKSPACE_ROOT=/tmp/joern-mcp
CLEANUP_ON_SHUTDOWN=true

# GitHub (optional)
GITHUB_TOKEN=
35 changes: 0 additions & 35 deletions Dockerfile

This file was deleted.

41 changes: 41 additions & 0 deletions Dockerfile.joern
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Dockerfile for Joern - Code Property Graph Analysis Tool
# This builds a local Joern image with all necessary tools for C/C++ analysis

FROM eclipse-temurin:21-jdk-jammy

# Install system dependencies
RUN apt-get update && apt-get install -y \
curl \
git \
wget \
unzip \
build-essential \
&& rm -rf /var/lib/apt/lists/*

# Set Joern version
ENV JOERN_VERSION=4.0.429
ENV JOERN_HOME=/opt/joern

# Download and install Joern from joernio/joern GitHub releases
RUN mkdir -p ${JOERN_HOME} && \
cd /tmp && \
wget -q https://github.com/joernio/joern/releases/download/v${JOERN_VERSION}/joern-install.sh && \
chmod +x joern-install.sh && \
sed -i 's/sudo //g' joern-install.sh && \
./joern-install.sh && \
rm -rf joern-install.sh

# Add Joern CLI tools to PATH
ENV PATH="${JOERN_HOME}/joern-cli:${JOERN_HOME}/joern-cli/bin:${PATH}"

# Create workspace directory
RUN mkdir -p /workspace /playground

# Set working directory
WORKDIR /workspace

# Verify installation - check both joern and c2cpg
RUN joern --help && /opt/joern/joern-cli/c2cpg --help

# Default command - keep container running for interactive use
CMD ["tail", "-f", "/dev/null"]
Loading