How do I connect GitHub Copilot in VS Code to xSpeed?
Put your sites in xSpeed Hub once, then add one URL to GitHub Copilot in VS Code.
1Put your sites in xSpeed Hub
Sign in at app.xspeedcache.com with Google or email; the Hub is free and has no site cap. Then connect each WordPress site from its own dashboard: click Connect Hub in the xSpeed Cache top bar, then Connect via xSpeed Hub. Each site needs the free xSpeed Cache plugin.
2Add xSpeed Hub to your user mcp.json
Open the Command Palette and run MCP: Open User Configuration, then add this entry. Servers in your user profile are available in every workspace. MCP: Add Server walks you through the same thing, and the project-level .mcp.json file works too if you want the entry shared with your team; that file uses a top-level mcpServers object instead of servers.
{
"servers": {
"xspeedhub": {
"type": "http",
"url": "https://app.xspeedcache.com/xspeed/mcp"
}
}
} 3Start the server and sign in
Run MCP: List Servers, pick xspeedhub and choose Start. VS Code asks whether you trust the server, then opens a browser page where you sign in to xSpeed Hub and approve access. There is no token to paste, and VS Code keeps the credentials it receives. Open the Chat view and use the Configure Tools button to see the xSpeed tools.
MCP: List Servers
4Or use a connection token alternative
Copy the connection token from Connect AI in the Hub (only the workspace owner sees it). The input variable makes VS Code ask for the token once and store it, instead of leaving it in the file.
{
"inputs": [
{
"type": "promptString",
"id": "xspeed-token",
"description": "xSpeed Hub connection token",
"password": true
}
],
"servers": {
"xspeedhub": {
"type": "http",
"url": "https://app.xspeedcache.com/xspeed/mcp",
"headers": { "Authorization": "Bearer ${input:xspeed-token}" }
}
}
} Using xSpeed Hub, which of my sites has the lowest cache hit ratio? Only read; do not change anything.
You: I just merged the lazy-load change. Use xSpeed Hub to run a mobile PageSpeed test on shop and compare it with the last stored result.
get_score_history(site: shop) read-only
→ last stored mobile run: score 71, LCP 3.4 s, six days ago
run_speed_test(site: shop, strategy: mobile) uses quota
→ mobile run finished: score 76, LCP 2.9 s
GitHub Copilot in VS Code: Mobile score went from 71 to 76 and LCP from 3.4 s to 2.9 s. That is one run each, and PageSpeed results vary, so run it twice more before you treat the gap as real. The test also spends the shared speed-test allowance.
You: Fine. Leave the cache alone for now.
Using it
Prompts to try in GitHub Copilot in VS Code
Paste one as it is, or change the site name.
Use xSpeed Hub to list my sites and show page cache status for each one.
With xSpeed Hub, purge the shop site cache, then start the preloader and tell me how many URLs it queued.
Use xSpeed Hub to run a mobile PageSpeed test on the blog and compare it with the stored score history.
Ask xSpeed Hub to preview what optimize_site would change on docs with a safe pass. Do not apply it.
Using xSpeed Hub, check that Redis answers on shop before you turn on the object cache.
What can GitHub Copilot in VS Code do with xSpeed?
A guide for each job, written for GitHub Copilot in VS Code.
Purge the WordPress cache with GitHub Copilot in VS Code
Clear stale pages after a deploy, an edit or a plugin update, on one site or all of them.
Find out why WordPress pages are not cached with GitHub Copilot in VS Code
Work out why a site misses the cache, serves slow pages or shows a low hit ratio, using read-only checks first.
Scan a website for speed problems with GitHub Copilot in VS Code
Get a graded speed report with the fix for every failing check and a link you can share, for your own site or any public URL.
Run and track PageSpeed tests with GitHub Copilot in VS Code
Read the PageSpeed scores a site already has, run a new test when something changed, and tell a Lighthouse score from a cache benchmark.
Raise a WordPress site's PageSpeed score with GitHub Copilot in VS Code
Preview and apply xSpeed's recommended settings to a site, check the pages still work, and be told plainly what caching cannot fix.
Tune WordPress cache settings with GitHub Copilot in VS Code
See which modules a site has, read their current settings, change them, and turn page caching on or off.
Warm the WordPress cache with GitHub Copilot in VS Code
Fill the page cache before visitors arrive, for example right after a purge or a deploy.
Set up the Redis object cache with GitHub Copilot in VS Code
Connect a site to Redis or Memcached so database results survive between requests.
Manage Cloudflare caching with GitHub Copilot in VS Code
Check the Cloudflare connection, clear the edge cache and switch development mode on or off for a site.
Manage every WordPress site at once with GitHub Copilot in VS Code
Run one action across all of your sites, or a chosen few, and read the result site by site.
Trust and safety
Does GitHub Copilot in VS Code ask before it changes my site?
In VS Code the default permission level is Manual permissions: a tool call that is not auto-approved shows a confirmation, and you can allow it once or for the session, the workspace or all future calls. Chat: Manage Tool Approval lists tools grouped by MCP server, so you can trust get_cache_status and the other reads while purge_cache and update_settings stay on a prompt. Allow all, Autopilot and global auto-approval skip those prompts, including for external tool calls, and then a write runs as soon as your connection allows writes. xSpeed Hub has no confirmation step of its own.
xSpeed Hub
xSpeed Hub has no confirmation step of its own. Read tools change nothing on your sites, with one exception to know about: contact_support sends an email to xSpeed support, and a read-only connection can still call it. A write tool (a purge, a settings change, a cache toggle, or a speed test that spends the shared allowance) runs as soon as your connection allows writes. Three things stand between a prompt and a change: your connection's scope, because a read-only connection refuses every write tool (the connection token has a Read-only everywhere switch, and a Viewer member only ever gets read access); your AI client's own tool-approval prompt; and the Hub's instructions to the agent, which tell it to confirm the target site and to ask once before a write that touches every site.
Good to know
- A chat request can enable at most 128 tools. xSpeed Hub adds 29, so if you also run other MCP servers, deselect some in the tools picker when VS Code reports too many.
- Workspace MCP files such as .mcp.json are committed with the project and inherit Workspace Trust. Put the xSpeed entry in your user configuration unless you want teammates to get it too, and never put a connection token in a shared file.
- The VS Code documentation lists .vscode/mcp.json as a deprecated destination for new servers. Use the user configuration or a portable .mcp.json.
- Organizations can manage MCP access through GitHub policies, so a managed account may not be able to add a server at all.
Reference
What is GitHub Copilot in VS Code?
GitHub Copilot in VS Code is the AI assistant built into Visual Studio Code. Its chat agent can read your workspace, run commands and call tools, including tools from MCP servers that you add to the editor.
MCP, the Model Context Protocol, is how VS Code reaches services outside your machine. Adding xSpeed Hub as an HTTP server gives the chat agent the Hub's caching tools: status, purge, settings, preloader, object cache, Cloudflare and speed tests, for every site in your workspace.
At a glance
- Made by
- GitHub / Microsoft
- Type
- Editor
- Connects with
- mcp.json in your VS Code user profile, or MCP: Add Server
- Sign-in
- OAuth sign-in or connection token
- Last checked
- October 2026
Why use GitHub Copilot in VS Code with xSpeed?
Check the cache from the editor
You change a theme or plugin in VS Code, so you can ask the Chat view whether the page cache is on and what the hit ratio is without opening wp-admin.
Approval per tool, per server
Chat: Manage Tool Approval groups tools by MCP server. Trust the reads once, keep each write behind a prompt, and change your mind later in the same list.
One entry for the whole fleet
The Hub fronts every site you connected. One mcp.json entry replaces a server per site, and a single call can return a result for each site.
How does GitHub Copilot in VS Code compare with other AI clients?
Every client below reaches the same 29 Hub tools once connected. What differs is where it runs, how you add the server and how it signs in.
| Client | Made by | Type | How you connect it | Sign-in |
|---|---|---|---|---|
| GitHub Copilot in VS Code | GitHub / Microsoft | Editor | mcp.json in your VS Code user profile, or MCP: Add Server | OAuth sign-in or connection token |
| Cursor | Anysphere | Editor | mcp.json with a url, then OAuth | OAuth sign-in or connection token |
| Windsurf | Cognition | Editor | devin mcp add, then devin mcp login (Cascade: mcp_config.json) | OAuth sign-in or connection token |
| Zed | Zed Industries | Editor | context_servers in settings.json, or Settings, AI, MCP Servers | OAuth sign-in or connection token |
| Kiro | Amazon (AWS) | Editor | an mcp.json entry with a url, then a browser sign-in | OAuth sign-in or connection token |
Which way should I connect?
GitHub Copilot in VS Code can use the Hub, one site's own MCP server, or the no-account Scan MCP. The Hub is the one most people want.
xSpeed Hub MCPMost people
https://app.xspeedcache.com/xspeed/mcp - Best for
- Most people. One URL in your AI client, every site behind it.
- Reaches
- Every site in your workspace, one connection
- Sign-in
- OAuth sign-in in the browser, or a connection token in an Authorization header
- Tools
- 29 tools (16 read, 13 write), seven of them can act on every site at once
xSpeed Cache Site MCP
https://your-site.com/xspeed/mcp - Best for
- A single site, or work the Hub does not expose, such as database cleanup.
- Reaches
- One WordPress site
- Sign-in
- OAuth sign-in by a site admin, or the site's own token in an Authorization header
- Tools
- The full per-site tool set plus run_command for the WP-CLI surface
xSpeed Scan MCP
https://xspeedcache.com/scan/mcp - Best for
- Grading a site you do not run, or trying xSpeed before you install anything.
- Reaches
- Any public URL, read-only
- Sign-in
- None. No account.
- Tools
- 5 tools: run_speed_scan, get_speed_scan and three product-info tools
WP-CLI
wp xspeed … - Best for
- Agents that already run commands on the server, such as Claude Code or Codex over SSH.
- Reaches
- The site whose server the agent has a shell on
- Sign-in
- Your server login
- Tools
- Every xSpeed command: cache, purge, preloader, objcache, cf, score, settings and more
Frequently asked questions
Also works with
Documentation
From the blog
- How to Let Claude or ChatGPT Manage Your WordPress Site Speed (via MCP)
- Connecting Claude to a WordPress Fleet in 2026: One of These Five Routes You May Already Be Paying For
- xSpeed Cache MCP vs WP Rocket MCP in 2026: One Connects Once, the Other Once Per Site
- 10 Best WordPress MCP Servers in 2026: 486 in the Directory, Four With More Than Ten Reviews