Connecting Your AI Client to PixelYourSite MCP
PixelYourSite MCP uses the Model Context Protocol over HTTP. Any MCP-compatible client can connect using your MCP Server URL and a Bearer token.
Your MCP Server URL
Find it in PixelYourSite → MCP, under the MCP Server URL card:
https://yoursite.com/wp-json/pixelyoursite-pro/v1/mcp
You need this URL and a token for every method below. Generate a token first if you have not already. See Getting Started.
Claude Desktop and claude.ai — custom connector
The easiest method. No config file, no Node.js required.
- Go to Settings → Connectors → Add custom connector
- Paste your MCP Server URL
- Enter your Bearer token when prompted
Works in Claude Desktop (Mac and Windows) and claude.ai. claude.ai requires a paid plan (Pro, Max, Team, or Enterprise).
Claude Desktop — config file
The MCP page in PixelYourSite includes a ready-made config snippet. After generating a token, it is already filled in.
Add the snippet to claude_desktop_config.json:
- Windows:
%APPDATA%\Claude\claude_desktop_config.json - macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Linux:
~/.config/Claude/claude_desktop_config.json
Windows:
json
"mcpServers": {
"pys-prod": {
"command": "cmd",
"args": [
"/c", "npx",
"-y", "mcp-remote",
"https://yoursite.com/wp-json/pixelyoursite-pro/v1/mcp",
"--header", "Authorization: Bearer YOUR_TOKEN_HERE"
]
}
}
macOS / Linux:
json
"mcpServers": {
"pys-prod": {
"command": "npx",
"args": [
"-y", "mcp-remote",
"https://yoursite.com/wp-json/pixelyoursite-pro/v1/mcp",
"--header", "Authorization: Bearer YOUR_TOKEN_HERE"
]
}
}
After saving, fully restart Claude Desktop from the system tray. Quitting and reopening the window is not enough.
Node.js required. Install it from nodejs.org if it is not on your machine. On macOS or Linux, a GUI-launched Claude Desktop may not inherit your shell PATH. If you see a spawn npx ENOENT error, find the full path to npx with which npx in Terminal and use that path in the config.
HTTP sites. If your site runs on plain HTTP, the snippet in the plugin already includes --allow-http. Drop that flag once your site has an SSL certificate.
Claude Code
Run this once in your terminal:
claude mcp add --transport http pys-prod https://yoursite.com/wp-json/pixelyoursite-pro/v1/mcp --header "Authorization: Bearer YOUR_TOKEN_HERE"
Replace YOUR_TOKEN_HERE with your token.
Cursor
- Go to Settings → Tools and Integrations → New MCP Server
- Choose HTTP as the transport
- Paste your MCP Server URL
- Add the authorization header:
Authorization: Bearer YOUR_TOKEN_HERE
Windsurf
- Open the Cascade panel
- Click the hammer icon, then View raw config
- Add the server using the URL and Bearer token header
VS Code with GitHub Copilot
- Open the Command Palette (
Ctrl+Shift+PorCmd+Shift+P) - Run MCP: Add Server
- Choose HTTP
- Paste your MCP Server URL and add the Bearer token header
Other MCP-compatible clients
Any client that supports MCP over HTTP can connect. Use your MCP Server URL with an Authorization: Bearer YOUR_TOKEN_HERE header. Refer to your client’s documentation for the exact steps.
Verify the connection
After connecting, ask your AI assistant: “Are you connected to my site?” It will confirm immediately.
You can also run the built-in check in PixelYourSite → MCP → Run checks. It verifies five conditions:
- Token state — a token has been generated
- Abilities API (WP 6.9+) — the WordPress Abilities API is available
- MCP Adapter — the bundled adapter loaded correctly
- REST route — the MCP endpoint is registered
- PYS Pro detection — Pro is active (required for write tools)
The MCP page also shows a curl command for a manual terminal test. Expected response: 200 OK with a Mcp-Session-Idheader.
Troubleshooting
spawn npx ENOENT — Node.js is not installed or not in PATH. Install Node.js or use the full path to npx.
401 Unauthorized — The token is wrong or was entered incorrectly. Revoke it and generate a new one.
No response or connection refused — The site is not publicly reachable, or the REST API is blocked. Confirm that wp-json is accessible from outside the server.
REST route check fails — A security plugin or server rule may be blocking the REST API. Temporarily disable REST API restrictions and retry.