Skip to content
WP Visibility

Connect an assistant

Connect Claude Code

Claude Code speaks to the plugin's endpoint directly over HTTP with an Authorization header. One command adds it; no bridge, no config file to edit.

Updated September 21, 2026

Docs

Claude Code can send a custom header with an HTTP MCP server, so it connects straight to https://your-site.com/wp-json/wp-visibility/mcp with Basic authentication. One command registers the site.

Before you start

  • An Application Password for the WordPress user the assistant will act as.
  • The Assistant connection module on in WP Visibility → Settings → Modules, with Autopilot on and Assistant changes on Hold for my review if writes should wait for you.

1. Encode the credential

Basic authentication wants username:application-password in base64. On macOS or Linux:

printf '%s' 'seo-agent:xxxx xxxx xxxx xxxx xxxx xxxx' | base64

On Windows PowerShell:

[Convert]::ToBase64String([Text.Encoding]::UTF8.GetBytes('seo-agent:xxxx xxxx xxxx xxxx xxxx xxxx'))

The spaces WordPress shows in the password may stay or go; both forms are accepted.

2. Add the server

claude mcp add --transport http wpvisibility https://your-site.com/wp-json/wp-visibility/mcp \
  --header "Authorization: Basic c2VvLWFnZW50Onh4eHgg..." \
  --scope user

--scope user makes the site available in every project on this computer. The default, local, limits it to the current directory. Avoid --scope project for this server: that scope writes the configuration, header included, to .mcp.json in the repository, where a credential does not belong.

Name the server after the site when you connect more than one; Claude Code shows the name beside each tool.

3. Check it

Inside a session, /mcp lists connected servers and their tools. Ask for a read first:

Using wpvisibility, what are the SEO title and description of the post “About us”?

Then one change:

Propose a better description for it.

With Hold for my review selected, the reply names a proposal ID and the site is unchanged until you approve it in WP Visibility → Review queue.

Manage it

claude mcp list
claude mcp get wpvisibility
claude mcp remove wpvisibility --scope user

To rotate the credential, revoke the old Application Password in WordPress, create a new one, and run claude mcp remove then claude mcp add again with the new header.

The bridge, if you prefer it

Claude Code also runs stdio servers. The same block the plugin prints for Claude Desktop works here as a command with environment variables:

claude mcp add --transport stdio wpvisibility \
  --env WP_API_URL=https://your-site.com/wp-json/wp-visibility/mcp \
  --env WP_API_USERNAME=seo-agent \
  --env "WP_API_PASSWORD=xxxx xxxx xxxx xxxx xxxx xxxx" \
  -- npx -y @automattic/mcp-wordpress-remote@latest

It needs Node.js 22 or newer. The direct HTTP route above is simpler and is the one to use unless something on the network blocks it.

Command syntax checked September 21, 2026 against the Claude Code MCP documentation.