Connect your client
Every client needs the same three settings:
| Setting | Value |
|---|---|
WP_API_URL |
Your site’s address, such as https://example.com |
WP_API_USERNAME |
Your WordPress username |
WP_API_PASSWORD |
The Application Password, with or without spaces |
claude mcp add my-site -s user \ -e WP_API_URL=https://example.com \ -e WP_API_USERNAME=your-username \ -e "WP_API_PASSWORD=abcd efgh ijkl mnop qrst uvwx" \Keep the password in quotes: it has spaces. -s user makes the server available in every folder; without it, Claude Code only loads it in the folder where you ran the command.
Add this to ~/.codex/config.toml. The Codex CLI, the IDE extension and the ChatGPT desktop app share this file.
[mcp_servers.my-site]command = "npx"
[mcp_servers.my-site.env]WP_API_URL = "https://example.com"WP_API_USERNAME = "your-username"WP_API_PASSWORD = "abcd efgh ijkl mnop qrst uvwx"Keep these lines in ~/.codex/config.toml, never in a project’s .codex/config.toml: they contain the password.
Add this to ~/.cursor/mcp.json:
{ "mcpServers": { "my-site": { "type": "stdio", "command": "npx", "env": { "WP_API_URL": "https://example.com", "WP_API_USERNAME": "your-username", "WP_API_PASSWORD": "abcd efgh ijkl mnop qrst uvwx" } } }}Open Settings → Developer → Edit Config and add:
{ "mcpServers": { "my-site": { "command": "npx", "env": { "WP_API_URL": "https://example.com", "WP_API_USERNAME": "your-username", "WP_API_PASSWORD": "abcd efgh ijkl mnop qrst uvwx" } } }}Then restart Claude Desktop.
Check the connection
Section titled “Check the connection”Ask your assistant something like “List the pages on my site”. It should answer with your pages. If it doesn’t, see troubleshooting.