This shows how to use a tool that lets the model build its own MCP UI, and how to test this w/ the Goose Desktop app in a fully dockerized environment.
Use w/ Goose in a dockerized Linux desktop (webtop):
export ANTHROPIC_API_KEY="..."
docker stop webtop
docker rm webtop
export WEBTOP_HOME="$HOME/.webtop-config"
mkdir -p "$WEBTOP_HOME"
echo "npx -y --silent https://gist.github.com/ochafik/9f892589844d238aa6871f47c31e3142" > "$WEBTOP_HOME/MCP.md"
docker run -d \
--platform linux/amd64 \
--name=webtop \
-e PUID=1000 \
-e PGID=1000 \
-e ANTHROPIC_API_KEY="${ANTHROPIC_API_KEY}" \
-e TZ=Etc/UTC \
-p 3000:3000 \
-p 3001:3001 \
-p 9222:9222 \
-v $WEBTOP_HOME:/config \
--shm-size="1gb" \
--restart unless-stopped \
lscr.io/linuxserver/webtop:debian-kde
docker exec webtop bash -c "
apt-get update && \
apt-get install -y wget nodejs xdo && \
wget https://github.com/block/goose/releases/download/v1.9.1/goose_1.9.1_amd64.deb && \
sudo dpkg -i goose_1.9.1_amd64.deb && \
git clone https://gist.github.com/ochafik/9f892589844d238aa6871f47c31e3142 mcp_ui_server
"
docker exec webtop bash -c "cd mcp_ui_server && git pull && npm i"
docker exec -d webtop konsole -e "bash -c ' \
goose --no-sandbox > /goose.log 2>&1 & \
echo \"Setup Anthropic provider with model: claude-sonnet-4-5-20250929\" ; \
echo \" ANTHROPIC_API_KEY: $ANTHROPIC_API_KEY\" ; \
echo \" MCP Server: /mcp_ui_server/run.sh\" ; \
echo \" Prompt: create a simple mcp ui example; avoid remote dom\" ; \
bash'"Then:
- Open http://localhost:3000/ in your browser
- Configure your Anthropic API key in Goose (copy it from the konsole terminal that opened up)
- Add the MCP server in Goose (custom extension + MCP_UI_Server name + command
/mcp_ui_server/run.sh) - In a chat, say "create a simple mcp ui example; avoid remote dom"
Inspect the server:
npx -y @modelcontextprotocol/inspector \
docker -- run --rm -i node:latest \
npx -y --silent https://gist.github.com/ochafik/9f892589844d238aa6871f47c31e3142