#!/bin/bash

# add mcp servers to global/user config and not to specific projects
# disable all MCP servers using the agent /mcp commands and activate only when required

claude mcp add --scope user jcodemunch -- uvx --with "jcodemunch-mcp[watch]" jcodemunch-mcp serve --watcher
claude mcp add --scope user context7 -- npx -y @upstash/context7-mcp@latest

codex mcp add jcodemunch -- uvx --with "jcodemunch-mcp[watch]" jcodemunch-mcp serve --watcher
codex mcp add context7 -- npx -y @upstash/context7-mcp@latest

gemini mcp add -s user jcodemunch -- uvx --with "jcodemunch-mcp[watch]" jcodemunch-mcp serve --watcher
gemini mcp add -s user context7 -- npx -y @upstash/context7-mcp@latest

# Installing Chrome Headless Shell in Docker and using it from playwright
#
# Docker compose to serve chromedp headless-shell (Chromium browser for playwright)
# Filename: docker-compose.yaml
#
# MCP use: 
# Project-level (saved to .mcp.json in your repo)
#   claude mcp add-json playwright \
#     '{"command":"npx","args":["-y","@playwright/mcp@latest","--cdp-endpoint","http://localhost:9222"],"env":{"PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD":"1"}}' \
#     --scope user
#  TODO: add claude/codex
#
#
#name: headless-shell-localhost
#
#services:
#  headless-shell:
#    image: chromedp/headless-shell
#    container_name: headless-shell.localhost
#    hostname: headless-shell
#    restart: always
#    init: true
#
#    network_mode: host
#
#    shm_size: 2G
#
#    labels:
#      - com.centurylinklabs.watchtower.enable=true
