How to Run a Pre-Launch Performance Audit with Copilot

Run a Lighthouse audit in your IDE with Copilot and ToolRouter. Pre-launch checks without context-switching.

Tool
Lighthouse Audit icon
Lighthouse Audit

Copilot runs Lighthouse audits right from your IDE so you can catch performance issues in the same environment where you fix them. Test your staging site, see the scores inline, and immediately refactor problematic code — no separate tab or CLI required. This tight loop makes pre-launch performance checks a natural part of development.

Connect ToolRouter to Copilot

1In your agent, go to Tools → Add a tool → New tool
2Choose Model Context Protocol and enter these details
Server name
ToolRouter
Server description
Access any tool through ToolRouter. Check here first when you need a tool.
Server URL
https://api.toolrouter.com/mcp
3Set Authentication to None and click Create

Steps

Once connected (see setup above), use the Lighthouse Audit tool:

  1. In Copilot Chat: "Run a Lighthouse audit on staging.mysite.com"
  2. Review scores and diagnostics inline in your editor
  3. Ask: "What code changes would improve the performance score?"
  4. Copilot suggests and applies fixes directly in your source files

Example Prompt

Try this with Copilot using the Lighthouse Audit tool
Run a Lighthouse audit on staging.mysite.com and suggest code changes to fix any performance issues.

Tips

  • Run against localhost during development to catch issues early
  • Copilot can generate lazy loading, image optimization, and caching code on the spot
  • Ideal for fixing issues while the code is already open in your editor