FROM kalilinux/kali-rolling
# Update and install required tools
RUN apt-get update && apt-get install -y \
nmap \
john \
gobuster \
nikto \
nodejs \
npm \
curl \
git \
wordlists \
seclists \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# Create app directory
WORKDIR /app
# Copy package files first for better caching
COPY package*.json ./
COPY tsconfig.json ./
# Install npm dependencies
RUN npm ci
# Copy source files
COPY src ./src
COPY *.md ./
# Build TypeScript
RUN npm run build
# Make the index.js executable
RUN chmod +x dist/index.js
# Create directories for logs and wordlists
RUN mkdir -p scan_logs temp_wordlists
# Create symlinks to common wordlist locations
RUN ln -s /usr/share/wordlists /app/wordlists && \
ln -s /usr/share/seclists /app/seclists
# Set up a non-root user for better security
# Note: Some operations like SYN scans will still need privileged mode
RUN useradd -m -s /bin/bash pentester && \
usermod -aG sudo pentester && \
echo "pentester ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
# Give ownership to pentester user
RUN chown -R pentester:pentester /app
# Switch to non-root user by default
USER pentester
# Set environment variables
ENV NODE_ENV=production
ENV PATH="/app/node_modules/.bin:${PATH}"
# The MCP server uses stdio, so we use CMD not ENTRYPOINT
CMD ["node", "dist/index.js"]
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/DMontgomery40/pentest-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server