Fix Twilio MCP integration with baked-in credentials

- Add proper type and env sections to mcp-config.json
- Remove dynamic MCP add command, use pre-configured MCP
- Bake .env credentials into Docker image at build time
- Remove runtime .env volume mount - true one-time setup
- Auto-rebuild image when .env file changes
- Export Twilio env vars for MCP server subprocess
- Remove conflicting .mcp.json file
This commit is contained in:
Vishal Jain
2025-06-13 09:53:43 +01:00
parent 8f637508f4
commit 6cb57c9dc6
9 changed files with 262 additions and 35 deletions

View File

@@ -12,8 +12,11 @@ RUN apt-get update && apt-get install -y \
sudo \
&& rm -rf /var/lib/apt/lists/*
# Create a non-root user
RUN useradd -m -s /bin/bash claude-user && \
# Create a non-root user with matching host UID/GID
ARG USER_UID=1000
ARG USER_GID=1000
RUN groupadd -g $USER_GID claude-user && \
useradd -m -s /bin/bash -u $USER_UID -g $USER_GID claude-user && \
echo "claude-user ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
# Create app directory
@@ -38,6 +41,10 @@ COPY config/mcp-config.json /app/config/
COPY scripts/startup.sh /app/
RUN chmod +x /app/startup.sh
# Copy .env file during build to bake credentials into the image
# This enables one-time setup - no need for .env in project directories
COPY .env /app/.env
# Set proper ownership
RUN chown -R claude-user:claude-user /app /home/claude-user