#!/bin/bash
echo "π³ Setting up CWA MCP Server with Docker..."
# Install dependencies (needed for development)
echo "π¦ Installing dependencies..."
npm install
# Configure Claude Desktop
CONFIG_DIR="$HOME/.config/claude"
CONFIG_FILE="$CONFIG_DIR/claude_desktop_config.json"
MCP_CONFIG='{
"mcpServers": {
"cwa": {
"command": "docker",
"args": [
"exec",
"-i",
"cwa-mcp-server",
"node",
"cwa-server.js"
]
}
}
}'
if [ ! -d "$CONFIG_DIR" ]; then
echo "π Creating Claude Desktop config directory..."
mkdir -p "$CONFIG_DIR"
fi
if [ -f "$CONFIG_FILE" ]; then
echo "βοΈ Claude Desktop config file found."
echo "π To manually update your configuration, add this to your $CONFIG_FILE file:"
echo "$MCP_CONFIG"
else
echo "π Creating Claude Desktop config file..."
echo "$MCP_CONFIG" > "$CONFIG_FILE"
echo "β
Configuration created at $CONFIG_FILE"
fi
echo ""
echo "π Starting Docker container..."
echo "β οΈ Make sure to edit docker-compose.yml to add your CWA API key before running Docker!"
echo ""
echo "To start the container, run:"
echo " docker-compose up -d"
echo ""
echo "π Setup complete! You can now use the CWA MCP server with Claude Desktop and Docker."
echo "βΉοΈ After starting the Docker container, restart Claude Desktop to apply the changes."