This guide shows you how to connect ShortPixel Image Optimizer to Claude Desktop using the Model Context Protocol (MCP).
Once connected, Claude can interact with ShortPixel directly from your conversations—for example, checking optimization statistics, viewing your credit balance, optimizing images, managing processing queues, and working with AI Image SEO.
Before continuing, complete the Prepare WordPress section of the main ShortPixel MCP guide.
You should have the following information ready:
- Your WordPress site URL
- Your WordPress username
- Your WordPress Application Password
- Your MCP endpoint:
https://YOUR-SITE/wp-json/mcp/mcp-adapter-default-server
Prerequisites #
Before you begin, make sure you have:
- Claude Desktop installed
- Node.js installed (
npxis required to launch the WordPress MCP bridge) - ShortPixel Image Optimizer verson 6.6.0 or newer, active on your WordPress site
- The WP MCP Adapter active on your WordPress site
- A WordPress Application Password for the user Claude will connect as
Important: Treat your WordPress Application Password like any other password. Do not share it publicly or include it in screenshots.
Step 1 — Open the Claude Desktop configuration file #
- Open Claude Desktop.
- Go to Settings → Developer.
- Open the Claude Desktop configuration file.
Claude Desktop uses a file named:
claude_desktop_config.json
The default location is:
macOS
~/Library/Application Support/Claude/claude_desktop_config.json
Windows
%APPDATA%\Claude\claude_desktop_config.json
Open the file in a text editor such as VS Code, Notepad++, or another editor of your choice.
Note: Depending on your Claude Desktop version, the exact wording of the option used to open the configuration file may differ.
Step 2 — Keep your existing configuration #
If claude_desktop_config.json already contains preferences or other MCP servers, do not delete them.
You only need to add the ShortPixel WordPress server inside the existing mcpServers object.
For example, if you already have:
{
"mcpServers": {
"another-server": {
"command": "some-command"
}
}
}
add shortpixel-wordpress alongside the existing server rather than replacing it.
Step 3 — Add the WordPress MCP server #
Add the following MCP server configuration to claude_desktop_config.json:
{
"mcpServers": {
"shortpixel-wordpress": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@automattic/mcp-wordpress-remote@latest"
],
"env": {
"WP_API_URL": "https://YOUR-SITE/wp-json/mcp/mcp-adapter-default-server",
"WP_API_USERNAME": "YOUR-WORDPRESS-USERNAME",
"WP_API_PASSWORD": "YOUR-APPLICATION-PASSWORD",
"OAUTH_ENABLED": "false"
}
}
}
}
Replace the following placeholders:
| Placeholder | Replace with |
|---|---|
YOUR-SITE | Your WordPress domain, including the subdirectory path if WordPress is not installed at the site root |
YOUR-WORDPRESS-USERNAME | Your WordPress username |
YOUR-APPLICATION-PASSWORD | The Application Password created in WordPress |
For example, your MCP endpoint might look like:
https://example.com/wp-json/mcp/mcp-adapter-default-server
If you already have other MCP servers #
Do not copy the example above over your entire configuration file.
Instead, add:
"shortpixel-wordpress": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@automattic/mcp-wordpress-remote@latest"
],
"env": {
"WP_API_URL": "https://YOUR-SITE/wp-json/mcp/mcp-adapter-default-server",
"WP_API_USERNAME": "YOUR-WORDPRESS-USERNAME",
"WP_API_PASSWORD": "YOUR-APPLICATION-PASSWORD",
"OAUTH_ENABLED": "false"
}
}
inside your existing mcpServers object.
Be careful to keep the file as valid JSON, including the necessary commas between MCP server entries.
Security tip: If you take a screenshot of your configuration, always hide or blur the value of
WP_API_PASSWORD.
Step 4 — Platform notes #
macOS #
If Node.js is installed and npx is available normally, the configuration above should work without additional changes.
You can check whether npx is available by opening Terminal and running:
npx --version
Windows #
Make sure Node.js is installed and that npx is available from the system PATH.
Open Command Prompt or PowerShell and run:
npx --version
If the command is not recognized, install the latest Node.js LTS version and restart Claude Desktop.
If Node.js is already installed but Claude Desktop still cannot find npx, you can run:
where npx
to find its full path and use that path in the command field instead of simply npx.
Step 5 — Save and restart Claude Desktop #
After updating the configuration:
- Save
claude_desktop_config.json. - Fully quit Claude Desktop.
- Open Claude Desktop again.
Closing only the Claude window may not be enough. Claude Desktop reads its MCP configuration when the application starts, so a full restart is required after changing the file.
Step 6 — Verify the connection #
Start a new conversation in Claude and ask:
What ShortPixel abilities are available on my WordPress site?
If everything is configured correctly, Claude should discover ShortPixel tools such as:
shortpixel/get-statsshortpixel/get-quotashortpixel/run-queueshortpixel/optimize-mediashortpixel/generate-ai-seo
You can then test the connection with a real request:
Check my ShortPixel credits and tell me whether the optimization queue is currently idle.
Claude should query your WordPress site and return the current ShortPixel information.
Screenshot suggestion: Show Claude successfully listing ShortPixel abilities or displaying the ShortPixel credit and queue status.
Troubleshooting #
Claude does not show any ShortPixel tools #
Check that:
- ShortPixel Image Optimizer is active
- The WP MCP Adapter is active
- Your MCP endpoint is correct
claude_desktop_config.jsoncontains valid JSON- You fully restarted Claude Desktop after editing the file
npx cannot be found #
Make sure Node.js is installed.
Verify it with:
node --version
and:
npx --version
If necessary, use the full path to npx in the MCP server configuration.
Authentication or permission error #
Check:
WP_API_USERNAMEWP_API_PASSWORD- The WordPress user’s role and permissions
Make sure you are using a WordPress Application Password, not the user’s normal WordPress login password.
The MCP server disappears after editing the configuration #
The most common cause is invalid JSON.
Check for:
- Missing commas
- Extra commas
- Missing quotation marks
- Missing opening or closing braces
After correcting the file, save it and fully restart Claude Desktop.
Next steps #
Your ShortPixel MCP connection is now ready.
You can use natural-language prompts in Claude to:
- Check ShortPixel optimization statistics
- View your available credits
- Check individual image optimization status
- Optimize or restore images
- Start and monitor bulk optimization jobs
- Generate AI Image SEO metadata
- Review processing queues
- Read or update supported ShortPixel settings
For more examples, continue to the Get started — example prompts section of the main ShortPixel MCP guide.