PlugPress

Connect VS Code to WordPress

GitHub Copilot’s agent mode can work on your WordPress site from Copilot Chat — reading and writing posts, pages, and media. Setup is one .vscode/mcp.json file that Saddle generates for you.

What do I need before connecting?

  • A WordPress site on HTTPS with the Saddle plugin installed and activated.
  • VS Code with GitHub Copilot, and agent mode enabled.

How do I connect VS Code to my WordPress site?

Step 1: Open the connect wizard

In your WordPress dashboard, go to Saddle → Connections, click Connect an app, and choose VS Code.

Saddle connect wizard in WordPress showing the Choose app step with Claude, ChatGPT, Claude Code, Cursor, Gemini CLI, VS Code and Any MCP app

Step 2: Copy the generated config

Saddle setup step for VS Code showing the .vscode/mcp.json configuration for Copilot agent mode

Note that VS Code uses servers, not mcpServers, and needs an explicit type:

{
  "servers": {
    "saddle-your-site": {
      "type": "http",
      "url": "https://your-site.com/wp-json/saddle/v1/mcp",
      "headers": {
        "Authorization": "Basic PASTE-YOUR-KEY-HERE"
      }
    }
  }
}

Copy it before closing the wizard. The key appears this once, and backing out early revokes it. Lost it? Use Rotate key on the app’s row.

Step 3: Save it and start the server

  1. Save the config as .vscode/mcp.json in your project.
  2. Open the Command Palette, run MCP: List Servers, and start the Saddle server.

This file contains a working key — add it to .gitignore rather than committing it.

How do I know it worked?

Open Copilot Chat in agent mode and ask:

What can you see on my WordPress site?

Copilot should report your site name, WordPress version, and content counts, and the app appears in Saddle → Connections.

What can Copilot do on my site?

Only what you allow on the Permissions screen — sites start read-only, and deletions always require a preview-and-confirm approval.

It didn’t connect — what now?

Check you used servers rather than mcpServers — copying a config meant for another app is the most common mistake here. Then run MCP: List Servers to confirm the server actually started, and use Test the endpoint under Saddle → Connections → Connection details & health to rule out the site side. More in Troubleshooting and FAQ, including hosts that strip the Authorization header.

FAQ

Does this work in normal Copilot chat, or only agent mode?

Agent mode. MCP tools are only available to the agent.

Can I use it across all my projects?

The .vscode/mcp.json file is per-project. VS Code also supports a user-level MCP configuration if you’d rather set it once.