Skip to content

Commit 875d986

Browse files
committed
Pre-install MCP server deps in copilot-setup-steps
Warm the npm cache for the stdio MCP servers the Copilot coding agent launches (@playwright/mcp, fast-filesystem-mcp, octocode-mcp, yggdrasil-mcp) and install Chromium for the playwright server, so they start reliably once the agent runtime firewall is enabled. https://claude.ai/code/session_01AfnF51garpZ7ajmV6M7ZMF
1 parent 4e534c7 commit 875d986

1 file changed

Lines changed: 29 additions & 0 deletions

File tree

.github/workflows/copilot-setup-steps.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ permissions:
1313
contents: read
1414

1515
jobs:
16+
# NOTE: The job MUST stay named `copilot-setup-steps` or the Copilot coding
17+
# agent will not pick it up. These steps run BEFORE the agent's firewall is
18+
# enabled, so anything the agent's MCP servers need at runtime should be
19+
# downloaded/cached here.
1620
copilot-setup-steps:
1721
runs-on: ubuntu-latest
1822
steps:
@@ -22,6 +26,31 @@ jobs:
2226
with:
2327
node-version: "24"
2428

29+
- name: Pre-install local (stdio) MCP server packages
30+
shell: bash
31+
env:
32+
NPM_CONFIG_FUND: "false"
33+
NPM_CONFIG_AUDIT: "false"
34+
run: |
35+
set -euxo pipefail
36+
# The agent launches these servers via `npx -y <pkg>@latest`. Installing
37+
# them globally warms the npm cache so they resolve quickly/offline once
38+
# the runtime firewall is in place. Keep this list in sync with the
39+
# `type: "local"` servers in the repo's Copilot MCP configuration.
40+
npm install -g \
41+
@playwright/mcp@latest \
42+
fast-filesystem-mcp@latest \
43+
octocode-mcp@latest \
44+
yggdrasil-mcp@latest
45+
46+
- name: Install Playwright browser (Chromium)
47+
shell: bash
48+
run: |
49+
set -euxo pipefail
50+
# The playwright MCP server needs a browser binary present. Fetch
51+
# Chromium and its OS dependencies before the firewall blocks downloads.
52+
npx --yes playwright install --with-deps chromium
53+
2554
- name: Note Windows validation workflows
2655
shell: bash
2756
run: |

0 commit comments

Comments
 (0)