{"id":2936,"date":"2026-09-01T08:42:32","date_gmt":"2026-09-01T08:42:32","guid":{"rendered":"https:\/\/kb.shortpixel.com\/?post_type=docs&#038;p=2936"},"modified":"2026-09-07T10:54:39","modified_gmt":"2026-09-07T10:54:39","password":"","slug":"connect-shortpixel-with-claude-desktop-via-mcp","status":"publish","type":"docs","link":"https:\/\/kb.shortpixel.com\/knowledge-base\/article\/connect-shortpixel-with-claude-desktop-via-mcp\/","title":{"rendered":"Connect ShortPixel with Claude Desktop via MCP"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">This guide shows you how to connect <strong>ShortPixel Image Optimizer<\/strong> to <strong>Claude Desktop<\/strong> using the Model Context Protocol (MCP).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Once connected, Claude can interact with ShortPixel directly from your conversations\u2014for example, checking optimization statistics, viewing your credit balance, optimizing images, managing processing queues, and working with AI Image SEO.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Before continuing, complete the <strong>Prepare WordPress<\/strong> section of the main ShortPixel MCP guide.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You should have the following information ready:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Your WordPress site URL<\/li>\n\n\n\n<li>Your WordPress username<\/li>\n\n\n\n<li>Your WordPress Application Password<\/li>\n\n\n\n<li>Your MCP endpoint:<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/YOUR-SITE\/wp-json\/mcp\/mcp-adapter-default-server\">https:\/\/YOUR-SITE\/wp-json\/mcp\/mcp-adapter-default-server<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Prerequisites<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Before you begin, make sure you have:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Claude Desktop<\/strong> installed<\/li>\n\n\n\n<li><strong>Node.js<\/strong> installed (<code>npx<\/code> is required to launch the WordPress MCP bridge)<\/li>\n\n\n\n<li><strong>ShortPixel Image Optimizer<\/strong> verson 6.6.0 or newer, active on your WordPress site<\/li>\n\n\n\n<li>The <strong>WP MCP Adapter<\/strong> active on your WordPress site<\/li>\n\n\n\n<li>A WordPress Application Password for the user Claude will connect as<\/li>\n<\/ul>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\"><strong>Important:<\/strong> Treat your WordPress Application Password like any other password. Do not share it publicly or include it in screenshots.<\/p>\n<\/blockquote>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Step 1 \u2014 Open the Claude Desktop configuration file<\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Open <strong>Claude Desktop<\/strong>.<\/li>\n\n\n\n<li>Go to <strong>Settings \u2192 Developer<\/strong>.<\/li>\n\n\n\n<li>Open the Claude Desktop configuration file.<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">Claude Desktop uses a file named:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>claude_desktop_config.json<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The default location is:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>macOS<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>~\/Library\/Application Support\/Claude\/claude_desktop_config.json<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Windows<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>%APPDATA%\\Claude\\claude_desktop_config.json<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Open the file in a text editor such as VS Code, Notepad++, or another editor of your choice.<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\"><strong>Note:<\/strong> Depending on your Claude Desktop version, the exact wording of the option used to open the configuration file may differ.<\/p>\n<\/blockquote>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Step 2 \u2014 Keep your existing configuration<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">If <code>claude_desktop_config.json<\/code> already contains preferences or other MCP servers, <strong>do not delete them<\/strong>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You only need to add the ShortPixel WordPress server inside the existing <code>mcpServers<\/code> object.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For example, if you already have:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>{\n  \"mcpServers\": {\n    \"another-server\": {\n      \"command\": \"some-command\"\n    }\n  }\n}\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">add <code>shortpixel-wordpress<\/code> alongside the existing server rather than replacing it.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Step 3 \u2014 Add the WordPress MCP server<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Add the following MCP server configuration to <code>claude_desktop_config.json<\/code>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>{\n  \"mcpServers\": {\n    \"shortpixel-wordpress\": {\n      \"type\": \"stdio\",\n      \"command\": \"npx\",\n      \"args\": &#91;\n        \"-y\",\n        \"@automattic\/mcp-wordpress-remote@latest\"\n      ],\n      \"env\": {\n        \"WP_API_URL\": \"https:\/\/YOUR-SITE\/wp-json\/mcp\/mcp-adapter-default-server\",\n        \"WP_API_USERNAME\": \"YOUR-WORDPRESS-USERNAME\",\n        \"WP_API_PASSWORD\": \"YOUR-APPLICATION-PASSWORD\",\n        \"OAUTH_ENABLED\": \"false\"\n      }\n    }\n  }\n}\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Replace the following placeholders:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Placeholder<\/th><th>Replace with<\/th><\/tr><\/thead><tbody><tr><td><code>YOUR-SITE<\/code><\/td><td>Your WordPress domain, including the subdirectory path if WordPress is not installed at the site root<\/td><\/tr><tr><td><code>YOUR-WORDPRESS-USERNAME<\/code><\/td><td>Your WordPress username<\/td><\/tr><tr><td><code>YOUR-APPLICATION-PASSWORD<\/code><\/td><td>The Application Password created in WordPress<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">For example, your MCP endpoint might look like:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/example.com\/wp-json\/mcp\/mcp-adapter-default-server\" rel=\"noopener\">https:\/\/example.com\/wp-json\/mcp\/mcp-adapter-default-server<\/a><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">If you already have other MCP servers<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Do <strong>not<\/strong> copy the example above over your entire configuration file.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Instead, add:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\"shortpixel-wordpress\": {\n  \"type\": \"stdio\",\n  \"command\": \"npx\",\n  \"args\": &#91;\n    \"-y\",\n    \"@automattic\/mcp-wordpress-remote@latest\"\n  ],\n  \"env\": {\n    \"WP_API_URL\": \"https:\/\/YOUR-SITE\/wp-json\/mcp\/mcp-adapter-default-server\",\n    \"WP_API_USERNAME\": \"YOUR-WORDPRESS-USERNAME\",\n    \"WP_API_PASSWORD\": \"YOUR-APPLICATION-PASSWORD\",\n    \"OAUTH_ENABLED\": \"false\"\n  }\n}\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">inside your existing <code>mcpServers<\/code> object.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Be careful to keep the file as valid JSON, including the necessary commas between MCP server entries.<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\"><strong>Security tip:<\/strong> If you take a screenshot of your configuration, always hide or blur the value of <code>WP_API_PASSWORD<\/code>.<\/p>\n<\/blockquote>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Step 4 \u2014 Platform notes<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">macOS<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">If Node.js is installed and <code>npx<\/code> is available normally, the configuration above should work without additional changes.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You can check whether <code>npx<\/code> is available by opening Terminal and running:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><code>npx --version<\/code><\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Windows<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Make sure Node.js is installed and that <code>npx<\/code> is available from the system PATH.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Open Command Prompt or PowerShell and run:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><code>npx --version<\/code><\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">If the command is not recognized, install the latest <strong>Node.js LTS<\/strong> version and restart Claude Desktop.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If Node.js is already installed but Claude Desktop still cannot find <code>npx<\/code>, you can run:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><code>where npx<\/code><\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">to find its full path and use that path in the <code>command<\/code> field instead of simply <code>npx<\/code>.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Step 5 \u2014 Save and restart Claude Desktop<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">After updating the configuration:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Save <code>claude_desktop_config.json<\/code>.<\/li>\n\n\n\n<li>Fully quit <strong>Claude Desktop<\/strong>.<\/li>\n\n\n\n<li>Open Claude Desktop again.<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">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.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Step 6 \u2014 Verify the connection<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Start a new conversation in Claude and ask:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>What ShortPixel abilities are available on my WordPress site?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If everything is configured correctly, Claude should discover ShortPixel tools such as:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>shortpixel\/get-stats<\/code><\/li>\n\n\n\n<li><code>shortpixel\/get-quota<\/code><\/li>\n\n\n\n<li><code>shortpixel\/run-queue<\/code><\/li>\n\n\n\n<li><code>shortpixel\/optimize-media<\/code><\/li>\n\n\n\n<li><code>shortpixel\/generate-ai-seo<\/code><\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">You can then test the connection with a real request:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Check my ShortPixel credits and tell me whether the optimization queue is currently idle.<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Claude should query your WordPress site and return the current ShortPixel information.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Screenshot suggestion:<\/strong> Show Claude successfully listing ShortPixel abilities or displaying the ShortPixel credit and queue status.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Troubleshooting<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Claude does not show any ShortPixel tools<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Check that:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>ShortPixel Image Optimizer is active<\/li>\n\n\n\n<li>The WP MCP Adapter is active<\/li>\n\n\n\n<li>Your MCP endpoint is correct<\/li>\n\n\n\n<li><code>claude_desktop_config.json<\/code> contains valid JSON<\/li>\n\n\n\n<li>You fully restarted Claude Desktop after editing the file<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><code>npx<\/code> cannot be found<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Make sure Node.js is installed.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Verify it with:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><code>node --version<\/code><\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">and:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><code>npx --version<\/code><\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">If necessary, use the full path to <code>npx<\/code> in the MCP server configuration.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Authentication or permission error<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Check:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>WP_API_USERNAME<\/code><\/li>\n\n\n\n<li><code>WP_API_PASSWORD<\/code><\/li>\n\n\n\n<li>The WordPress user&#8217;s role and permissions<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Make sure you are using a <strong>WordPress Application Password<\/strong>, not the user&#8217;s normal WordPress login password.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">The MCP server disappears after editing the configuration<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The most common cause is invalid JSON.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Check for:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Missing commas<\/li>\n\n\n\n<li>Extra commas<\/li>\n\n\n\n<li>Missing quotation marks<\/li>\n\n\n\n<li>Missing opening or closing braces<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">After correcting the file, save it and fully restart Claude Desktop.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Next steps<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Your ShortPixel MCP connection is now ready.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You can use natural-language prompts in Claude to:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Check ShortPixel optimization statistics<\/li>\n\n\n\n<li>View your available credits<\/li>\n\n\n\n<li>Check individual image optimization status<\/li>\n\n\n\n<li>Optimize or restore images<\/li>\n\n\n\n<li>Start and monitor bulk optimization jobs<\/li>\n\n\n\n<li>Generate AI Image SEO metadata<\/li>\n\n\n\n<li>Review processing queues<\/li>\n\n\n\n<li>Read or update supported ShortPixel settings<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">For more examples, continue to the <strong><a href=\"https:\/\/shortpixel.com\/knowledge-base\/article\/shortpixel-ai-assistants-mcp\/\" rel=\"noopener\">Get started \u2014 example prompts<\/a><\/strong> section of the main ShortPixel MCP guide.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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\u2014for 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 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"footnotes":""},"doc_category":[64],"glossaries":[],"doc_tag":[],"class_list":["post-2936","docs","type-docs","status-publish","hentry","doc_category-mcp"],"blocksy_meta":[],"year_month":"2026-09","word_count":966,"total_views":"15","reactions":{"happy":"0","normal":"0","sad":"0"},"author_info":{"name":"admin","author_nicename":"admin_mdli53m5","author_url":"https:\/\/kb.shortpixel.com\/author\/admin_mdli53m5\/"},"doc_category_info":[{"term_name":"MCP","term_url":"https:\/\/kb.shortpixel.com\/knowledge-base\/category\/mcp\/"}],"doc_tag_info":[],"knowledge_base_info":[],"knowledge_base_slug":[],"_links":{"self":[{"href":"https:\/\/kb.shortpixel.com\/wp-json\/wp\/v2\/docs\/2936","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kb.shortpixel.com\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/kb.shortpixel.com\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/kb.shortpixel.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kb.shortpixel.com\/wp-json\/wp\/v2\/comments?post=2936"}],"version-history":[{"count":6,"href":"https:\/\/kb.shortpixel.com\/wp-json\/wp\/v2\/docs\/2936\/revisions"}],"predecessor-version":[{"id":2981,"href":"https:\/\/kb.shortpixel.com\/wp-json\/wp\/v2\/docs\/2936\/revisions\/2981"}],"wp:attachment":[{"href":"https:\/\/kb.shortpixel.com\/wp-json\/wp\/v2\/media?parent=2936"}],"wp:term":[{"taxonomy":"doc_category","embeddable":true,"href":"https:\/\/kb.shortpixel.com\/wp-json\/wp\/v2\/doc_category?post=2936"},{"taxonomy":"glossaries","embeddable":true,"href":"https:\/\/kb.shortpixel.com\/wp-json\/wp\/v2\/glossaries?post=2936"},{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/kb.shortpixel.com\/wp-json\/wp\/v2\/doc_tag?post=2936"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}