Skip to content

Pre-cache MCP server packages and Playwright browser for Copilot#108

Merged
Ven0m0 merged 2 commits into
mainfrom
claude/practical-cray-bGBuo
Jun 3, 2026
Merged

Pre-cache MCP server packages and Playwright browser for Copilot#108
Ven0m0 merged 2 commits into
mainfrom
claude/practical-cray-bGBuo

Conversation

@Ven0m0
Copy link
Copy Markdown
Owner

@Ven0m0 Ven0m0 commented Jun 3, 2026

Summary

Extends the copilot-setup-steps workflow to pre-install and cache MCP (Model Context Protocol) server packages and Playwright browser binaries before the Copilot agent's runtime firewall is enabled. This ensures the agent can launch its local stdio MCP servers and use Playwright without network access once the firewall is active.

Key Changes

  • Added clarifying comment on the copilot-setup-steps job explaining its role in the agent setup pipeline and the requirement to maintain the job name for agent discovery.

  • Pre-install local MCP server packages via npm install -g:

    • @playwright/mcp@latest
    • fast-filesystem-mcp@latest
    • octocode-mcp@latest
    • yggdrasil-mcp@latest
    • Disables npm fund and audit output to reduce noise
    • Includes inline comment noting these must stay in sync with the repo's Copilot MCP configuration
  • Pre-install Playwright browser (Chromium):

    • Runs npx --yes playwright install --with-deps chromium to fetch the browser binary and OS dependencies
    • Ensures Playwright MCP server has required browser binaries available before firewall activation

Implementation Details

Both new steps run before the agent's firewall is enabled, warming the npm cache and pre-staging runtime dependencies so the agent can operate offline once network restrictions are in place. The steps include inline documentation to clarify their purpose and maintenance requirements.

https://claude.ai/code/session_01AfnF51garpZ7ajmV6M7ZMF

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
Copilot AI review requested due to automatic review settings June 3, 2026 20:01
@gemini-code-assist
Copy link
Copy Markdown

Note

Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the Copilot agent bootstrap workflow to pre-fetch MCP server npm packages and Playwright Chromium binaries before the agent runtime firewall is enabled, aiming to keep local MCP servers and Playwright usable without network access.

Changes:

  • Added documentation clarifying the role and required name of the copilot-setup-steps job.
  • Added a step to globally install several MCP server npm packages to warm caches ahead of firewall enablement.
  • Added a step to install Playwright Chromium (and OS deps) ahead of firewall enablement.

Comment thread .github/workflows/copilot-setup-steps.yml
Comment thread .github/workflows/copilot-setup-steps.yml Outdated
Comment thread .github/workflows/copilot-setup-steps.yml
@kilo-code-bot
Copy link
Copy Markdown
Contributor

kilo-code-bot Bot commented Jun 3, 2026

Code Review Summary

Status: No Issues Found | Recommendation: Merge

The incremental changes address the previous review concern about the MCP configuration comment by clarifying that MCP servers are configured in repo Settings -> Copilot -> coding agent (not in a file in this repo). This is a documentation improvement that resolves the issue.

All previously flagged issues remain unchanged and will carry forward.

Files Reviewed
  • .github/workflows/copilot-setup-steps.yml - No new issues in incremental changes

Reviewed by laguna-m.1-20260312:free · 258,297 tokens

Address PR review: the inline comment implied an in-repo Copilot MCP
config file. It is configured under repo Settings -> Copilot -> coding
agent, so reword to avoid pointing maintainers at a non-existent path.

https://claude.ai/code/session_01AfnF51garpZ7ajmV6M7ZMF
@Ven0m0
Copy link
Copy Markdown
Owner Author

Ven0m0 commented Jun 3, 2026

Thanks for the review. Addressing the three points:

  • Line 39 (misleading comment): Fixed in 454d3fd — reworded to clarify the type: "local" MCP servers are configured under repo Settings → Copilot → coding agent, not in a file in this repo.
  • Lines 40 & 52 (pin versions / offline determinism): Intentionally keeping @latest. The agent's MCP configuration launches these servers with npx -y <pkg>@latest, and the actual failing agent runs showed those servers starting successfully behind the runtime firewall (the npm registry is reachable from the agent environment). So strict offline pinning isn't required for them to work; this step is a cache/latency warm-up rather than a hard offline guarantee. Pinning here alone wouldn't help unless the agent's MCP config were pinned in lockstep too, and the maintainer prefers @latest across that config.

For the record, the original agent-run failures were not caused by this workflow — they were CAPIError: 400 from the gemini-3.5-flash model rejecting the large MCP tool schema set; the fix there is switching the agent model (Sonnet 4.6) in coding-agent settings.


Generated by Claude Code

@Ven0m0 Ven0m0 merged commit 1f32272 into main Jun 3, 2026
6 of 7 checks passed
@Ven0m0 Ven0m0 deleted the claude/practical-cray-bGBuo branch June 3, 2026 20:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants