Skip to content

Commit e63dbc6

Browse files
committed
chore: Makefile의 mcp 개발 환경 세팅을 위한 커맨드에 대해 playwright에 대응하도록 수정
1 parent 34e5f7f commit e63dbc6

1 file changed

Lines changed: 11 additions & 5 deletions

File tree

Makefile

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,12 @@ local-setup:
2525
local-api: local-collectstatic
2626
@ENV_PATH=envfile/.env.local uv run python app/manage.py runserver 8000
2727

28+
# One-time: install the Chromium binary the mdx_preview tool drives (python deps come via `uv sync --group mcp`).
29+
local-mcp-setup:
30+
@uv run --group mcp playwright install chromium
31+
2832
# Run the standalone MCP server (Django-free, calls the backend API; needs the API running).
29-
local-mcp:
33+
local-mcp: local-mcp-setup
3034
@uv run --group mcp python -m mcp_app
3135

3236
# Run local Celery worker (requires `make docker-compose-up` for redis)
@@ -158,11 +162,13 @@ docker-server-stop:
158162
docker-server-rm: docker-server-stop
159163
docker rm $(SERVER_CONTAINER_NAME) || true
160164

161-
# Smoke-test the built image's MCP role without a running API: only checks deps
162-
# import (fastmcp installed + mcp_app importable). build() itself needs the API.
163-
docker-mcp-smoke:
165+
# Smoke-test the server image's MCP role: deps import (fastmcp + mcp_app) and the
166+
# bundled Chromium actually launches (catches container sandbox issues). build()
167+
# itself needs the API, so it's not exercised here.
168+
docker-mcp-smoke: docker-server-build
164169
@docker run --rm $(IMAGE_NAME):server \
165-
python -c "import fastmcp, mcp_app.server; print('mcp ok:', fastmcp.__version__)"
170+
python -c "import fastmcp, mcp_app.server; from playwright.sync_api import sync_playwright; \
171+
p=sync_playwright().start(); b=p.chromium.launch(); print('mcp ok:', fastmcp.__version__, b.version); b.close(); p.stop()"
166172

167173
# Run the MCP server from the same server image (CMD override). Needs the API
168174
# container up (docker-server-run); reaches it via host.docker.internal:8000.

0 commit comments

Comments
 (0)