Connect VS Code (GitHub Copilot)
Connect VS Code and GitHub Copilot to RankKit SEO by adding your MCP endpoint and agent token to .vscode/mcp.json and starting the server.
On this page
VS Code can use MCP servers in GitHub Copilot chat. Add RankKit SEO to your workspace's .vscode/mcp.json with an agent token, start the server, and Copilot can audit and edit your WordPress SEO.
VS Code runs on your computer, so a local or staging site works too.
Before you start
Turn on agent access in RankKit SEO → AI Agents → Allow AI agents to connect. See Connect an AI agent.
Step 1: Create a token
- Go to RankKit SEO → AI Agents and click Create token.
- Name it, for example "VS Code", pick an expiry and a Permissions preset, and click Create token.
The token is shown once, and RankKit SEO fills it into the snippets in the Connect an AI client card. See Agent tokens, scopes and access levels.
Step 2: Add RankKit SEO to .vscode/mcp.json
Open the VS Code tab in the Connect an AI client card and copy the snippet:
{
"servers": {
"rankkit": {
"type": "http",
"url": "https://example.com/wp-json/speedrank/v1/mcp",
"headers": {
"Authorization": "Bearer sr_your_token_here"
}
}
}
}
Save it as .vscode/mcp.json in the folder you have open. If the file already exists, add only the "rankkit": { … } entry inside servers.
Note the differences from other clients: VS Code uses a top-level servers key (not mcpServers) and needs "type": "http".
Important
.vscode/mcp.jsonlives in your project. Don't commit it with a real token to a shared repository.
Step 3: Start the server
Start the server from the MCP view in VS Code. VS Code then connects to your site and loads RankKit SEO's tools.
Step 4: Check that it works
In Copilot chat, ask:
Run site_overview and summarise my site's SEO.
Copilot calls the RankKit SEO tool and answers with your site's name, modules, content counts and audit score. In wp-admin, the token's Last used column shows the time and call count, and the Activity card on RankKit SEO → AI Agents lists the call.
Troubleshooting
| Problem | Cause | Fix |
|---|---|---|
| The server doesn't appear | The file isn't at .vscode/mcp.json in the open folder, the JSON is invalid, or it uses mcpServers instead of servers. |
Fix the file, then start the server again from the MCP view. |
| "Invalid or expired RankKit SEO agent token." | The token is wrong, revoked or expired. | Create a new token and update the file. |
| "AI agent access is turned off. Enable it in RankKit SEO → AI Agents." | Agent access is off. | Turn on Allow AI agents to connect. |
See Fix MCP connection problems for every error message.
FAQ
Can I connect a site that runs on my computer?
Yes. VS Code calls the endpoint from your computer, so a local URL works.
Can I share the configuration with my team?
Share the file without the token, and have each person create their own token in RankKit SEO → AI Agents. Each edit in the Change Log then shows who made it, and you can revoke one person's access without affecting the others.
Was this page helpful?
Related guides
Agent tokens, scopes and access levels
Create RankKit SEO agent tokens for MCP clients, choose per-area permissions and expiry, and see when each token was last used or revoke it.
Connect an AI agent to WordPress over MCP
Turn on RankKit SEO's built-in MCP server and connect Claude, ChatGPT, Cursor or VS Code so an AI agent can audit and fix your SEO.
MCP tool reference
Every RankKit SEO MCP tool, grouped by area, with what it does, whether it reads or writes, Free or Pro, the token access it needs and when it's listed.
Fix MCP connection problems
Every error RankKit SEO's MCP server, OAuth sign-in and agent tools can return, what causes it and how to fix it, from bad tokens to missing tools.
Still need help?
Email us with your WordPress and RankKit SEO versions and what you tried. Pro customers get priority replies.