GitHub Copilot + xCloud

Speed up a slow site with GitHub Copilot on xCloud

Speeding up a slow site with GitHub Copilot means asking agent mode in VS Code why a site is slow and letting it read xCloud's monitoring, cache, PageSpeed and log data from the chat panel beside your code.

  • Skill: xcloud:performance
  • Toolsets: pagespeed, sites, servers, broken-links
  • Free with every xCloud account

YouWhy is blog.example.com slow today?

sites_monitoring_historyread-only

sites_wordpress_statusread-only

AgentCPU rose this morning and has stayed high. The site runs an older PHP version and has nine plugin updates waiting. Changing one site's PHP version is a dashboard step: Site, Site Settings. Want me to read the access log next, to rule out a crawl?

YouYes, last 200 lines.

. Keep a human in the loop: xCloud stops and asks before anything that creates, deploys, updates, reboots, deletes or buys.

Setup

How Do You Set Up GitHub Copilot to Speed up a slow site on xCloud?

Connect GitHub Copilot once; every job on this account uses the same connection. Then ask in plain words.

  1. Add xCloud to .vscode/mcp.json

    Create or open .vscode/mcp.json in your workspace and paste this. VS Code uses a top-level servers key, not mcpServers, and a remote server needs type http. The URL carries profile=compact because VS Code allows at most 128 tools in one chat request and the full xCloud server advertises one tool per customer-facing operation, 188 today; the compact profile is five tools that still reach every operation. Start the server from MCP: List Servers. xCloud then asks you to sign in in the browser, where you tick the teams and choose Read-only or Full access.

    JSON
    {
      "servers": {
        "xcloud": {
          "type": "http",
          "url": "https://app.xcloud.host/mcp?profile=compact"
        }
      }
    }
  2. Or add it from the Command Palette

    Open the Command Palette and run this command, follow the prompts to add a remote HTTP server, paste https://app.xcloud.host/mcp?profile=compact and name it xcloud. VS Code asks where to save it; pick the workspace to share the entry with your team, or your user profile to keep it to yourself.

    Code
    MCP: Add Server
  3. Add the Agent Plugins package

    Optional. The xCloud Agent Plugins package bundles plugin.json, mcp.json and the nine skills for GitHub Copilot and VS Code. Download it from the xcloud-agent-skills GitHub Releases page (dist/agent-plugin/xcloud) and follow VS Code's agent plugin instructions to install it.

    URL
    https://github.com/xCloudDev/xcloud-agent-skills
  4. Check it worked

    Then ask GitHub Copilot for the job itself, for example:

    Prompt
    Why is blog.example.com slow today? Check xCloud's server load, cache layers and latest PageSpeed result before suggesting anything.

In practice

How Does Performance Work from GitHub Copilot?

In VS Code the question starts in the chat panel, in agent mode, with the workspace you have open. You type why is blog.example.com slow today, and Copilot works through the xCloud tools it has been given. The first reads resolve the site and its server, then sites_status tells it whether the site is mid-deploy. Next come sites_monitoring_history for the 24-hour curve and servers_monitoring for the machine, so the reply can say whether the slowdown is new and whether the server, not the site, is the busy one.

Copilot's strength here is that the explanation lands next to the files. When sites_cacheSettings shows no page cache and sites_pagespeed_latest shows a weak mobile result, the reply names the cause and the editor is already open on the theme or config you might touch next. Copilot can read sites_access-logs for a window you name, such as the last 200 lines of the nginx log, and say whether one client is hammering a path. If the cause is a switch only the dashboard can flip, such as enabling Redis object cache, it gives the path Site, WordPress, Caching and the dashboard link.

A .vscode/mcp.json committed to the repository gives the whole team the same xCloud entry, which is handy for a performance review where several people ask the same questions. Everyone signs in with their own xCloud account, so what each person can read follows their team role. The monitoring, caching and PageSpeed reads each need their own team permission, which means a colleague may see a refusal where you see numbers.

GitHub Copilot specific: A 403 from the site monitoring or PageSpeed reads is a role problem, not an empty result. xCloud checks team permissions per person, so with a shared .vscode/mcp.json the same question can work for one teammate and be refused for another. Ask Copilot to report the refusal as it is and have a team owner adjust the role, instead of letting it conclude the site has no data. Switch the chat panel to agent mode first, since MCP tools are only used there.

What xCloud does for performance

xCloud reads the site's and the server's CPU, RAM and disk samples, which cache layers are on, the latest PageSpeed result, traffic in the access log, service health and the site's PHP version. The agent names the cause from that data, then hands you the switches that only the dashboard can flip.

  1. Resolve the site and its server. The agent looks up the site and the server it runs on, because the answer often comes from both. A slow site is frequently slow because a neighbour on the same server is.
  2. Check status and monitoring history. A site that is mid-deploy or failed explains slowness without any measurement. Otherwise the agent reads the site's and the server's samples, and a 24-hour or 7-day series to tell whether the slowdown is new. Disk comes early: a nearly full disk slows everything, the database first.
  3. Read the cache layers. The agent reads the cache settings before saying anything about caching: whether page cache, Redis or Object Cache Pro object cache and Cloudflare edge cache are on, and which server stack the site runs. It never reports that no cache configuration is readable without calling it.
  4. Read PageSpeed and traffic. The latest completed PageSpeed run is free to read. A new scan is worth starting only when there is no result or the site changed since, and the agent tells you it is spending a scan. The access log shows spikes, a crawl or one client hammering a path.
  5. Check services and PHP. The agent checks that PHP, the web server, Redis and the database are running, and reads the site's PHP version and pending updates. A stopped Redis next to an object cache that reads as on is a found answer.
  6. Name the cause and hand off. You get the most likely cause with its numbers. The fix is either something the agent can do, such as a purge after you agree, or a dashboard switch it names with the path and the site's dashboard link. If every number looks normal, it says so instead of inventing a cause.

Reference

Performance Settings and Limits on xCloud

The facts GitHub Copilot works within when it speeds up a slow site. Where a row names the dashboard, that step stays yours to take there.

Setting or limitWhat applies
Monitoring historySite and server CPU, RAM and disk samples as a 24-hour or 7-day series. History is not available on the free plan, and the agent says that is a plan limit rather than reporting no data
Cache stateRead through sites.cacheSettings: page cache, object cache (Redis, Object Cache Pro) and Cloudflare edge cache. It returns settings only, never cache contents
Enabling a cache layerDashboard-only: Site, WordPress, Caching. The API reads the layers and purges them, and cannot switch one on for an existing site
Page cache detailsCache duration, URL and cookie exclusions and ignored query parameters are dashboard-only and are not returned by the cache settings read
PageSpeedThe latest mobile and desktop results and the history are read for free. One scan runs both strategies
Scan conflictsA 409 while a scan is running means it is still pending or scanning. The agent polls it instead of starting another, and it is not a cooldown
Cache purgePurging runs without a confirmation stop but throws away a warm cache, so the agent asks first on a live site and reports each layer as queued or skipped
TrafficThe access log shows spikes and bots. It is read over SSH, so the agent asks for a bounded window
PHP versionRead from the site's status. Changing one site's PHP version is a dashboard step: Site, Site Settings
Server PHP defaultChanging the server default PHP changes only the command-line php and the version new sites get. It does not move any existing site
Broken linksA broken-link scan on a WordPress site returns findings grouped by source page, and a truncated scan is reported as partial

Rules GitHub Copilot has to follow

  • The agent diagnoses from measurements, not guesses, and it calls the cache settings read before it says anything about caching.
  • It never offers to turn on Redis or any other cache layer itself. Enabling a layer is a dashboard step, and the agent gives you the path and the dashboard link.
  • It never presents a change of server PHP default as a substitute for changing one site's PHP version.
  • A cache purge on a live site, a new PageSpeed scan and any server-level PHP change are announced first. Server-level changes also need your explicit yes.
  • A site that errors rather than loads slowly goes to troubleshooting, and a failed deploy goes to deploy.

Example prompts

What Can You Ask GitHub Copilot to Do for Performance?

Type these as written and swap in your own repository, site and server names. Reads and routine actions such as backups, cache purges, PageSpeed scans and vulnerability scans run straight away; creating, deploying, updating, rebooting, deleting, buying or starting a broken-link scan stops and asks first.

Prompt
Why is blog.example.com slow today? Check xCloud's server load, cache layers and latest PageSpeed result before suggesting anything.
Prompt
Which PHP version is blog.example.com running, and are there pending updates that could be slowing it down?
Prompt
Look at the last 200 lines of the nginx access log for blog.example.com and tell me if a bot or one URL is causing the load.
Prompt
Why is shop.example.com slow? Check the cache, the server load and the latest PageSpeed result.
Prompt
Is Redis object cache on for the shop site? If it is off, tell me where to switch it on.
Prompt
Show CPU, RAM and disk for the shop site over the last 24 hours and tell me whether the slowdown is new.
Prompt
Run a PageSpeed scan on the shop site and compare the score with the previous scans.
Prompt
Look at the access log of the shop site for a traffic spike or a bot hammering one path.
Prompt
Which PHP version is the blog site running, and are there pending updates I should apply?
Prompt
Purge all caches on the shop site.
Prompt
Scan the shop site for broken links and list the pages with the most.

GitHub Copilot and Performance: Frequently Asked Questions

What people ask before they let GitHub Copilot speed up a slow site through xCloud.

Why does Copilot say it cannot read monitoring for my site when a teammate can?

xCloud checks team permissions for each person, so the same shared mcp.json can give one teammate numbers and another a refusal. A 403 on monitoring or PageSpeed means the role lacks that permission. A team owner can change the role.

Does Copilot need agent mode to diagnose a slow site?

Yes. MCP tools are available to Copilot only when it works as an agent, so switch the chat panel to agent mode before you ask. If no xCloud tools appear, check that the xcloud server is running in MCP: List Servers.

Can the agent turn on caching for my slow site?

No. It can read which cache layers are on and purge them, but switching page cache, Redis object cache or Cloudflare edge cache on for an existing site is a dashboard step under Site, WordPress, Caching. The agent tells you the path and gives you the site's dashboard link.

What does a 409 mean when the agent starts a PageSpeed scan?

It means a scan for that site is still pending or running. The agent polls the existing scan instead of starting another, and it is not a cooldown period. A new scan is only worth starting when there is no recent result or the site has changed.

Will changing the server's PHP default speed up my site?

No. The server default changes only the command-line php and the version new sites get, and it does not move any existing site. The PHP version of one site is changed in the dashboard under Site, Site Settings.

Why does the agent say monitoring history is unavailable?

Monitoring history is a paid-plan feature, so on the free plan the request is refused as a plan limit. The agent reports it that way rather than saying there is no data, and it falls back to the samples and measurements the plan does include.

Does purging the cache ask for my confirmation?

xCloud itself runs a purge without a confirmation stop, because it is a routine action. The agent still asks you first on a live site, since a purge throws away a warm cache and the next visitors wait while it rebuilds.

Other agents

Performance with Other Agents

The same job, the same xCloud tools, a guide for each client.

Run Your Hosting from GitHub Copilot

xCloud MCP, the Agent Skills and the Public API are free with every account. Connect once and ask.