Skip to main content
Halloween offer Extra 25% hosting credits when you buy on $100+ in credits
Take my treat →Claim
Agency Program 50% cashback. Exclusive discounts. Priority support. Built for growing agencies. 50% cashback. Exclusive discounts. Priority support. Built for growing agencies. Speak to the team Join free

How to Connect GitHub Copilot to WordPress Using MCP

How to connect GitHub Copilot to WordPress using MCP: switch on MCP on an InstaWP site and click Add to VS Code, add the site by hand, connect your whole InstaWP account, or use the MCP Adapter on any other host.

NS
Neha Sharma
Content, InstaWP
Updated Oct 29, 2026 22 min read

To connect GitHub Copilot to WordPress, you add your WordPress site to VS Code as an MCP server. Copilot’s agent can then read and change the site from the same chat where it edits your code. On InstaWP’s managed WordPress hosting, every site already has an MCP server built in, so the setup is a switch, one Add to VS Code click and a quick check.

This guide is written for beginners. It explains each term the first time it appears, shows a screenshot for each step, and covers sites hosted anywhere else too. InstaWP tested the connection on 23 October 2026 against a sandbox running InstaMCP, the WordPress MCP server built into InstaWP sites, and the numbers below come from that test.

Key takeaways
  • Fastest route: on an InstaWP site, open Extensions, then MCP, switch on Enable MCP and click Add to VS Code. VS Code asks you to approve the server before anything is added.
  • Use agent mode: MCP tools only run when Copilot Chat works as an agent. Ask mode answers questions; agent mode can call tools.
  • What Copilot gets: 43 WordPress tools for posts, pages, blocks, plugins, themes, media, SEO fields and error logs. The tool list took about 2.4 seconds to load in InstaWP’s test.
  • Copilot Business or Enterprise? An admin must switch on the “MCP servers in Copilot” policy first. It is off by default. Free, Pro, Pro+ and Max users are not affected by it.
  • Two safety switches: approve each tool call in VS Code, and turn on InstaMCP’s Safe Mode on any live site. Safe Mode is off until you turn it on.
  • Site hosted somewhere else? The official WordPress MCP Adapter plugin works with Copilot too, but it needs more setup and gives fewer tools.
Try it on a site you can breakCreate a free InstaWP sandbox. It comes with InstaMCP and an Add to VS Code button, so you can test Copilot before you touch a client site.
Create a sandbox →

What are GitHub Copilot, VS Code and agent mode?

GitHub Copilot is an AI assistant from GitHub that lives inside your code editor. VS Code (Visual Studio Code) is Microsoft’s free code editor, and it is where most people use Copilot. Copilot Chat is the chat panel in VS Code where you type requests in plain English.

Copilot Chat can work in different modes. In agent mode, Copilot does not just answer: it plans the job, edits files and calls tools to finish the task, asking you before it runs anything risky. That is the mode you need, because connecting WordPress gives Copilot new tools to call.

The connection itself uses MCP, the Model Context Protocol. MCP is an open standard that lets an AI app plug into outside tools, the way a USB cable lets a laptop plug into a printer. VS Code is the MCP client. Your WordPress site runs the MCP server. Once they are connected, Copilot can ask the site to list posts, update a page or read an error log.

Copilot and WordPress
What changes when you connect Copilot to a WordPress site
Copilot on its ownOnly the files in VS CodeSees The theme or plugin code in the folder you openedCannot see Posts, pages, settings, installed plugins or error logs on the live siteTo ship a change You upload files and check the page yourself
Copilot connected over MCPYour code and the live siteSees The same files, plus the site’s content, plugins, themes, media and logsCan do Edit a plugin, update the page that explains it, then read the logsStays in control VS Code asks before tool calls, and the site decides what the token may do

What can GitHub Copilot do once it is connected to WordPress?

Once connected, Copilot can work on the live WordPress site, not just the files on your computer. Over InstaMCP it can create and edit posts and pages, check Gutenberg blocks before saving, write SEO and custom fields, install and edit plugins and themes, upload media and read the site’s error logs. Here are the jobs beginners use most:

JobExample promptWhat to know
Content“List my last 10 draft posts.”Reading is safe to try first. Nothing changes.
Pages“Fix the typo in the second paragraph of the About page.”Copilot can change just one sentence instead of the whole page.
SEO fields“Write meta descriptions for posts that have none.”Writes Rank Math, Yoast and ACF fields directly.
Plugins and themes“Show me which plugins are active and which have updates.”File edits save a backup copy first.
Debugging“Read the last 20 fatal errors from the site logs.”Ask for this after every code change.
Power tools“Run this SQL query.” (needs admin approval on the site)Raw PHP, SQL and file tools stay off until a site admin turns them on.

The full list of 43 tools is in the InstaWP site MCP documentation. Copilot can only do what the site allows. If a tool is switched off, Copilot gets a refusal back, not a broken site.

What do you need before you connect GitHub Copilot to WordPress?

You need four things, and most of them are free:

  • VS Code, version 1.99 or later. GitHub’s Copilot MCP documentation lists 1.99 as the minimum.
  • GitHub Copilot, signed in inside VS Code. Copilot Free works. If you use Copilot through a company (Business or Enterprise), ask your admin to switch on the “MCP servers in Copilot” policy. It is off by default.
  • A WordPress site on InstaWP. Site MCP works on the Sandbox plan ($2 a month) and above. A WordPress staging environment copy of a live site is the safest place to practise.
  • A few minutes. The one-click route takes about two minutes.
  • Site hosted somewhere else? Skip to Method 2, which uses the official WordPress MCP Adapter plugin.

How do you set up GitHub Copilot MCP for a WordPress site?

There are three ways to connect GitHub Copilot to a WordPress site. Which one you need depends on where the site is hosted and how many sites you want Copilot to reach.

Pick your route
Which way should you connect GitHub Copilot to WordPress?
One InstaWP siteSite MCP (InstaMCP)Sign-in A token in the connection URLCopilot gets 43 tools: content, blocks, plugins, themes, media, logsGo to Method 1
Many InstaWP sitesAccount MCPSign-in Sign in with your InstaWP account in the browserCopilot gets Site lists, plugins, backups and logins across your teamGo to Account MCP
Site hosted elsewhereWordPress MCP AdapterSign-in A WordPress Application PasswordCopilot gets Only the abilities plugins mark as publicGo to Method 2
All three end in the same place: a server listed in VS Code that Copilot can call in agent mode.

Method 1: How do you connect GitHub Copilot to a WordPress site on InstaWP?

The easiest way to connect Copilot to WordPress is to host the site with a managed WordPress host that has an MCP server built in. Then there is no plugin to install, no command to run and no password to create.

InstaWP is a managed WordPress hosting provider that builds a WordPress MCP server, InstaMCP, into every site. From the site’s MCP tab you get:

  • 43 typed tools for content, Gutenberg blocks, plugins, themes, media, SEO fields and error logs.
  • An Add to VS Code button that sets up the connection for you.
  • Safe Mode, WordPress role-based access, and PHP, SQL and file power tools that stay off until an admin switches them on.
  • Setup guides for 14 AI clients, so the same site also works in Cursor, Claude and ChatGPT.
Method 1 at a glance
Three steps from a WordPress site to Copilot using its tools
1Switch on MCPSite, then Extensions, then MCP, then Enable MCP. The connection URL appears.
2Add the site to VS CodeClick Add to VS Code and approve it in VS Code, or add the URL with MCP: Add Server.
3Test it in agent modeAsk Copilot a read-only question about the site and check that it called a WordPress tool.
If it worksCopilot answers from your siteYou see a tool call such as list_content in the chat.
If it failsThe server shows an errorUse the troubleshooting table. Most failures are a switched-off MCP or a wrong token.

Step 1: Switch on MCP for the site

  1. Log in to the InstaWP dashboard and open your site. In the site menu, open Extensions, then MCP, and switch on Enable MCP. The connection URL appears straight away. It looks like https://your-site.instawp.site/insta-mcp?t=YOUR_TOKEN.
The MCP page of an InstaWP site, opened from Extensions, then MCP in the site menu, with Enable MCP switched on and the MCP connection URL shown with its token hidden.
Extensions, then MCP in the site menu (1), and the Enable MCP switch (2). The connection URL carries the site’s token, hidden here.
Treat the connection URL like a password. The part after ?t= is a token: a long secret key that proves you are allowed in. Anyone who has the URL can act on the site with that token’s permissions. Do not paste it into a ticket, a chat or a Git commit. If it leaks, switch MCP off and on again from this page.

Step 2: Add the site to VS Code with one click

  1. On the same MCP tab, find the row of client buttons and click Add to VS Code. (VS Code Insiders has its own one-click button too. If you do not see it, open More clients.)
The MCP tab of an InstaWP site with Enable MCP switched on, the connection URL with its token hidden, and the Add to VS Code button highlighted for the one-click GitHub Copilot MCP setup.
Switch on Enable MCP (1), then click Add to VS Code (2) on the site’s MCP tab. The connection URL carries the site’s token, hidden here.
  1. Your browser asks whether to open Visual Studio Code. Allow it. VS Code opens and shows you the server it is about to add. Check that the name matches your site, then approve it. Nothing is added until you do.
An MCP server page in VS Code with Install and Install in Workspace buttons, shown here for the GitHub MCP server.
VS Code shows the server before it adds anything, with an Install button. This example from the VS Code release notes shows the GitHub server; yours shows the name of your site.
  1. The first time Copilot wants to use the server, VS Code asks whether you trust it to start. Confirm only if it is your site.
The VS Code dialog asking Trust and run MCP server, with Trust and Do not trust buttons.
The first time a server starts, VS Code asks you to trust it. Click Trust only if the name is your site. Example from the VS Code documentation.

That is the whole setup. InstaWP’s MCP documentation describes this button as a deep link that triggers VS Code’s own consent dialog, so you always see what will be added first.

Step 2, the manual way: Add the site with MCP: Add Server

Use this if the button cannot open VS Code, for example on a work laptop that blocks app links. It takes about a minute longer.

  1. On the site’s MCP tab, click the copy icon next to the connection URL.
The Connection Details box on an InstaWP site's MCP tab, with the connection URL outlined and the copy icon next to it highlighted.
Click the copy icon (1) to copy the full connection URL, token included.
  1. In VS Code, open the Command Palette with Ctrl+Shift+P (Cmd+Shift+P on a Mac), run MCP: Add Server, and choose HTTP (HTTP or Server-Sent Events), because your WordPress site is a remote server with a URL. Paste the connection URL when VS Code asks for it.
The VS Code MCP: Add Server picker listing Command (stdio), HTTP (HTTP or Server-Sent Events), NPM Package, Pip Package and Docker Image.
MCP: Add Server first asks for the server type. A WordPress site with a URL is HTTP. Screenshot from the VS Code blog.
  1. Give the server a short name, such as my-wordpress-site. Then choose where to save it: Global, then Copilot Global keeps it out of your project files, which is what you want for a URL that holds a token.
The VS Code Add MCP Server prompt asking for the global configuration, with Copilot Global selected.
Choose Copilot Global, so the URL and its token stay out of your project files. Screenshot from the VS Code release notes.

These menu names come from VS Code’s Add MCP servers guide, checked on 23 October 2026. VS Code changes this area often, so if a label differs, look for the closest match.

Sharing the setup with a team? Do not commit a URL with a token in it. VS Code’s MCP configuration reference lets a server read a header value from an environment variable, so each developer keeps their own token on their own machine.

Step 3: Check that Copilot can use the WordPress tools

  1. Open the list of servers. In current VS Code, run Chat: Open Customizations from the Command Palette and select MCP Servers. Your site should appear with its switch turned on. (The MCP: List Servers command shows the same list.)
The MCP Servers section of the Agent Customizations editor in VS Code, listing User, Workspace and Built-In servers with Start buttons, on/off switches and an actions menu.
The MCP Servers list in VS Code. Each server has a Start button, an on/off switch and a menu with Show Output. Screenshot from the VS Code documentation.
  1. Open Copilot Chat, make sure it is set to Agent, and ask a question that only your site can answer, using your server’s name: “Use my-wordpress-site to list the 5 most recent posts. Do not change anything.”
The Copilot Chat mode picker in VS Code, with Agent selected.
Set Copilot Chat to Agent. MCP tools only run in agent mode. Screenshot from the VS Code documentation.
  1. When Copilot calls a tool, VS Code shows it in the chat. Expand the tool call and check that it came from your WordPress server, for example list_content. If Copilot answered without calling a tool, the connection is not proven yet, so ask again and name the server.
Copilot Chat in VS Code showing two completed MCP tool calls, each labelled with the tool name and the MCP server it came from.
Each tool call names the server it came from, so look for your WordPress server’s name. Example from the VS Code documentation, using the GitHub server.
  1. Optional: switch off tools you will not use. Click the tools button in the chat input to open Configure Tools and untick what you do not need. Fewer tools means fewer wrong guesses.
The Configure Tools picker in VS Code chat, with the tools button highlighted in the chat input and a list of tools that can be switched on or off.
Configure Tools in VS Code chat. Your WordPress server’s tools appear in this list once it is connected. Screenshot from the VS Code documentation.
What InstaWP measured. On 23 October 2026, a connection to an InstaWP sandbox (InstaMCP 1.10.3), sent the way an MCP client sends it, finished the handshake and listed 43 tools in a median of 2.4 seconds over 5 runs. The tool descriptions add up to 28,753 bytes, which Copilot reads before it picks a tool. That is another reason to switch off tools you do not need.

How do you connect GitHub Copilot to your whole InstaWP account?

If you manage many sites, connect your InstaWP account instead of one site. InstaWP Account MCP signs in once in your browser, with no token to copy, and lets Copilot find sites, check plugin updates, list backups and create login links across your team. It works on the hosting around WordPress, while site MCP works inside one site. Account MCP vs Site MCP explains the difference.

  1. In the InstaWP dashboard, open Profile, then MCP, and switch on Enable MCP for your account. It is off by default. Then click Add to VS Code and approve the server in VS Code, the same way as in Step 2 above.
The InstaWP account MCP settings with Enable MCP for your account switched on, the connection URL https://app.instawp.io/mcp, and the Add to VS Code button highlighted.
Switch on account MCP (1), then click Add to VS Code (2). The connection URL has no token, because you sign in instead.
  1. The first time Copilot uses it, VS Code opens your browser at InstaWP’s authorize screen. Choose Read-only to start, then click Authorize. You can reconnect with Read & write later.
The InstaWP authorize screen for an MCP client, with the access level options Read-only and Read and write, and Cancel and Authorize buttons. The account email is blurred.
The InstaWP authorize screen. It names the app that asked to connect, and you pick the access level for that one connection.

Every app you authorize appears under Connected apps on the same Profile, MCP page, where you can revoke it. The Account MCP documentation covers the tool switches on that page.

Method 2: How do you connect GitHub Copilot to a WordPress site hosted elsewhere?

Install the official WordPress MCP Adapter plugin, create an Application Password, and add a small bridge program to VS Code. It works on any host running WordPress 6.9 or later. Out of the box it gives Copilot far less than InstaMCP, because the Adapter only exposes abilities that plugins, or your own code, mark as public. On a bare install in InstaWP’s 6 October 2026 test, that was 3 read-only abilities.

  1. Check that the site runs WordPress 6.9 or later over HTTPS (Dashboard, then Updates shows the version). Also install Node.js on your computer, because the bridge runs with npx.
The WordPress Updates screen, opened from Dashboard, then Updates, showing the current WordPress version.
Dashboard, then Updates (1), shows the version your site runs (2). Anything from 6.9 up works. Captured on a test site on 29 October 2026.
  1. Install the plugin. In WordPress, go to Plugins, then Add New, search for MCP Adapter (by WordPress.org), click Install Now, then Activate.
The MCP Adapter plugin page on WordPress.org, by WordPress.org, with its Download button.
The official MCP Adapter plugin, by WordPress.org. Version 0.7.1 had 50,000+ active installs on 23 October 2026.
  1. Go to Users, then Profile, and scroll to Application Passwords. Type Copilot as the name and click Add Application Password. Copy the password, because WordPress shows it only once. Use the lowest-privileged user that can do the job.
The Application Passwords section of a WordPress user profile, with the New Application Password Name field, the Add Application Password button and a list of existing passwords with Revoke buttons.
Application Passwords on your WordPress profile. Name it, add it, and revoke it here when you stop using Copilot.
  1. In VS Code, run MCP: Add Server, choose Command (stdio), and enter npx -y @automattic/mcp-wordpress-remote@latest as the command. Name it, and save it to Global, then Copilot Global.
The VS Code MCP: Add Server picker listing Command (stdio), HTTP (HTTP or Server-Sent Events), NPM Package, Pip Package and Docker Image.
The same MCP: Add Server picker. For the MCP Adapter bridge, choose Command (stdio). Screenshot from the VS Code blog.
  1. Open Chat: Open Customizations, then MCP Servers, and select the new server. Under Environment Variables, add three: WP_API_URL set to https://your-site.com/wp-json/mcp/mcp-adapter-default-server, WP_API_USERNAME set to your WordPress username, and WP_API_PASSWORD set to the Application Password. Click Save.
The VS Code MCP server configuration form, with Server Type, Command, Arguments and Environment Variables fields and a Save button.
The server form in VS Code, with fields for the command, arguments and environment variables. Screenshot from the VS Code documentation.
  1. Ask Copilot in agent mode to list what the server can do, and check the tool call, as in Step 3 above.
Copilot Chat in VS Code showing two completed MCP tool calls, each labelled with the tool name and the MCP server it came from.
Check that the tool call names your new server, the same check as in Step 3. Example from the VS Code documentation.

The variable names and the endpoint come from the MCP Adapter CLI usage guide, and the password type is explained in WordPress’s Application Passwords guide. InstaWP compares this route in depth in its WordPress MCP Adapter review and its test of the best WordPress MCP plugins.

Copilot on WordPressInstaMCP on InstaWPMCP Adapter
SetupA switch and one clickPlugin, password, Node bridge
Tools out of the box43 typed toolsPublic abilities only
Edit plugin and theme filesYes, PHP checked firstOnly via an add-on
Safety switchesRoles, Safe Mode, power tools offWordPress user roles
Runs onInstaWP-hosted sitesAny host, WordPress 6.9+
CostIncluded from $2 a monthFree plugin

Want the full tool set on that site? InstaWP includes free migrations on every plan, so you can move it with the WordPress migration tool and then follow Method 1.

What should you ask GitHub Copilot first?

Start with requests that only read, so you can watch Copilot work before it changes anything. Name your server in the prompt, so Copilot picks the WordPress tools and not its own file tools.

GoalPrompt to paste into Copilot ChatChanges the site?
See what is there“Use my-wordpress-site to list the active plugins and the active theme.”No
Find problems“Use my-wordpress-site to read the last 20 fatal errors from the site logs and explain them simply.”No
Content check“List all draft posts older than 30 days, with their titles and dates.”No
First small edit“Change the title of the About page to About Us. Show me the change before you save it.”Yes, after you approve
Code plus content“Add a short notice to my plugin’s settings page, then update the help page that describes it.”Yes, after you approve

For bigger jobs, such as building a plugin, see InstaWP’s guide to deploying WordPress from GitHub with an AI agent. If you want Copilot to work on GitHub itself (issues, pull requests), that is a separate server, explained in what GitHub MCP is.

Connect Copilot to a test site firstSwitch on MCP on a sandbox, click Add to VS Code and try the read-only prompts above before you point Copilot at a client site.
Start a sandbox →

Why is GitHub Copilot not using my WordPress MCP server?

Usually because the server is off, the token is wrong, or Copilot is not in agent mode. VS Code can show the server’s own messages: in the MCP Servers list, open the server’s menu and choose Show Output. Then match what you see to this table.

What you seeLikely causeFix
The server shows an error and the output mentions HTMLMCP is switched off on the site, so the URL returns a normal web pageSwitch on Enable MCP on the site’s MCP tab.
“Invalid token”The token in the URL is wrong or was resetCopy the connection URL again from the MCP tab and update the server.
“Authentication required”No token reached the siteMake sure the URL still ends with ?t= and the token, or that your header variable is set.
No WordPress tools in agent modeCopilot is in Ask mode, or your company has MCP switched offSwitch the chat to Agent. On Copilot Business or Enterprise, ask an admin to enable “MCP servers in Copilot”.
Copilot answers but never calls a toolIt guessed from what it already knowsName the server in the prompt, and check the tool is ticked in Configure Tools.
A server you added does not reach Copilot sessionsIt asks for a value with ${input:…}, which Copilot sessions do not pass onUse the connection URL, or an environment variable, instead of an input prompt.

The two error messages above are the exact replies InstaWP got from its sandbox on 23 October 2026 when the token was missing or wrong. VS Code’s MCP troubleshooting guide covers the VS Code side.

Is it safe to let GitHub Copilot change a live WordPress site?

Yes, if you keep both sets of brakes on. VS Code decides what Copilot may try, and the WordPress site decides what it will accept. For a live site:

  • Practise on a copy. Use a sandbox or a staging site first, then push to live after a person checks the result.
  • Turn on Safe Mode. In WordPress, go to Settings, then InstaMCP, then General. Safe Mode blocks all deletes. It is off by default, so you have to switch it on.
  • Keep tool approvals on in VS Code. Read each tool call before you approve it, especially anything that writes.
  • Leave the power tools off. Raw PHP, SQL and file access stay disabled until an admin enables them. Most jobs never need them.
  • Keep the token private. Never commit the connection URL. Switch MCP off on sites you are not using.

InstaWP goes deeper in is MCP WordPress integration safe and in its guide on how to connect AI agents to WordPress using MCP.

Should you use GitHub Copilot, Cursor or Claude for WordPress?

Use GitHub Copilot if you already work in VS Code and pay for, or use the free plan of, Copilot. The WordPress side is identical in every client: the same InstaWP site and connection URL work in all 14 clients that InstaWP has setup guides for.

For a wider comparison, see the best AI coding tools for WordPress developers. For Git, SFTP and WP-CLI access next to MCP, see InstaWP’s developer tools.

The short version

On an InstaWP site, open Extensions, then MCP, switch on Enable MCP and click Add to VS Code. Approve the server in VS Code, switch Copilot Chat to Agent, and ask a read-only question that names your site. If you see a WordPress tool call in the chat, you are connected. For many sites, connect your InstaWP account and sign in read-only. For a site on another host, use the WordPress MCP Adapter with an Application Password. On a live site, turn on Safe Mode and keep tool approvals on.

Connect GitHub Copilot to WordPress todayStart on a sandbox, then move the same site to a production plan when it is ready. No migration needed.
See hosting plans →

Connecting GitHub Copilot to WordPress: FAQs

Can GitHub Copilot connect to WordPress?

Yes, over MCP. Add the WordPress site to VS Code as an MCP server, for example with the Add to VS Code button on an InstaWP site’s MCP tab, and Copilot’s agent mode can read and change the site. On InstaWP the site exposes 43 tools.

Does GitHub Copilot Free support MCP servers?

GitHub’s documentation says its MCP access policy applies only to Copilot Business and Copilot Enterprise seats, where an admin must switch it on, and that Copilot Free, Pro, Pro+ and Max are not governed by it. So on an individual plan you can add MCP servers yourself. You need VS Code 1.99 or later.

Do I need agent mode to use WordPress tools in Copilot?

Yes. MCP tools are called by Copilot’s agent. In Ask mode, Copilot answers from what it knows and does not call your WordPress server. Switch the chat to Agent before you ask.

Where does VS Code save my MCP server?

It depends on what you choose when you add it. Global, then Copilot Global saves it to your user folder outside the project. A workspace file such as .mcp.json is shared with anyone who opens the project, so never put a token there.

Why does Copilot not see my WordPress MCP server?

Check that MCP is switched on for the site, that the URL still has a valid token, that the chat is in Agent mode, and, on a company plan, that the MCP policy is enabled. Show Output in the MCP Servers list shows the server’s own error message.

Can I connect GitHub Copilot to a WordPress site not hosted on InstaWP?

Yes, with the official WordPress MCP Adapter plugin on WordPress 6.9 or later, an Application Password and the mcp-wordpress-remote bridge. It exposes only the abilities plugins mark as public, so expect far fewer tools than InstaMCP’s 43.

Is it safe to give GitHub Copilot access to a live WordPress site?

It is safe enough with both brakes on: approve tool calls in VS Code, and turn on InstaMCP’s Safe Mode, which blocks deletes and is off by default. Practise on a staging copy, keep power tools off and never commit the connection URL.

Can I use the same WordPress site with Copilot and Cursor at the same time?

Yes. The same InstaWP connection URL works in every MCP client, so you can add one site to VS Code, Cursor and Claude at once. Each client asks for its own approval.

NS
Neha Sharma
Content, InstaWP

Neha writes practical WordPress tutorials and agency playbooks, with a focus on dev workflows and AI building.