Cursor, VS Code with GitHub Copilot, Claude Code, Codex, Roo Code and most other MCP clients read their servers from a configuration file. They do not run an OAuth sign-in, so PageForge gives them a personal access token instead. The client sends the token in a request header on every call.
Create a token
- Go to PageForge > Connections and make sure MCP is enabled.
- Under Other MCP clients (personal access token), click Create personal access token.
- The Personal access token created dialog opens. Click Copy token. PageForge stores only a hash of it and cannot show it again.
- Under Client configuration, pick your client’s tab: VS Code / GitHub Copilot, Cursor, Claude Code or Generic MCP client.
- Click Copy configuration and paste it into that client’s config file.
- Restart the client and ask: “Show my PageForge site status.”
The dialog also shows the token’s Scopes and Expires. Tokens do not expire on their own, so revoke a token when you no longer need it.
Example configurations
For Cursor, in .cursor/mcp.json:
{
"mcpServers": {
"pageforge": {
"url": "https://example.com/wp-json/pageforge/v1/mcp",
"headers": {
"X-PageForge-MCP-API-Key": "pfmcp_YOUR_TOKEN_HERE"
}
}
}
}
For VS Code and GitHub Copilot, in .vscode/mcp.json:
{
"servers": {
"pageforge": {
"type": "http",
"url": "https://example.com/wp-json/pageforge/v1/mcp",
"headers": {
"X-PageForge-MCP-API-Key": "pfmcp_YOUR_TOKEN_HERE"
}
}
}
}
Claude Code uses .mcp.json with the same mcpServers shape as Cursor plus "type": "http". Replace the URL with your own endpoint and the placeholder with your token.
Which header to use
| Header | Format |
|---|---|
X-PageForge-MCP-API-Key | The token on its own. This is what the copied configurations use. |
Authorization | Bearer followed by a space and the token |
Send one or the other, not both. A request carrying both is rejected. Never put a token in the URL or a query string. PageForge only reads tokens from headers.
How tokens are protected
- Each token belongs to the administrator who created it and acts with that person’s WordPress permissions.
- PageForge stores a keyed hash, so the token cannot be read back from the database.
- In Free, a token can only read and preview. In Pro, you choose its access under Access this token may use before creating it.
Manage tokens
Every token is listed under Personal access tokens with its status: “Credential active · Never used”, In use, Revoked or Expired.
- Rotate issues a new token for the same client. The old one stops working at once. Update the client’s config with the new token.
- Revoke ends access immediately.
Important A config file with a token in it is a password. Do not commit it to a shared repository. If a laptop holding a token is lost, revoke that token.
Next: Scopes, permissions and security and AI assistant can’t connect.
