{"id":249,"date":"2026-02-17T18:36:03","date_gmt":"2026-02-17T17:36:03","guid":{"rendered":"https:\/\/helloblog.io\/sv\/wordpress-mcp-adapter-abilities-api-ai-agenter-mcp\/"},"modified":"2026-02-17T18:36:03","modified_gmt":"2026-02-17T17:36:03","slug":"wordpress-mcp-adapter-abilities-api-ai-agenter-mcp","status":"publish","type":"post","link":"https:\/\/helloblog.io\/sv\/wordpress-mcp-adapter-abilities-api-ai-agenter-mcp\/","title":{"rendered":"WordPress MCP Adapter: s\u00e5 kopplar du Abilities API till AI-agenter via MCP"},"content":{"rendered":"\n<p>WordPress har under det senaste \u00e5ret tagit flera tydliga steg mot att bli en plattform d\u00e4r AI-automation k\u00e4nns naturlig, inte p\u00e5klistrad. Tv\u00e5 byggstenar sticker ut: <strong>Abilities API<\/strong> (introducerat i WordPress 6.9) och den officiella <strong>WordPress MCP Adapter<\/strong>. Tillsammans g\u00f6r de att en AI-agent kan <em>uppt\u00e4cka<\/em> vad din sajt kan g\u00f6ra och sedan <em>utf\u00f6ra<\/em> det \u2013 p\u00e5 ett standardiserat och s\u00e4kert s\u00e4tt.<\/p>\n\n\n\n<p>I den h\u00e4r genomg\u00e5ngen f\u00e5r du en praktisk karta \u00f6ver hur MCP Adapter fungerar, hur du installerar den, hur du exponerar abilities som MCP tools, hur du kopplar upp vanliga AI-klienter (lokalt och publikt), hur du s\u00e4tter upp en egen MCP-server f\u00f6r ett plugin \u2013 och vilka s\u00e4kerhetsf\u00e4llor du beh\u00f6ver ha koll p\u00e5.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Snabb repetition: Abilities som grundplatta<\/h2>\n\n\n\n<p>Om du inte jobbat med Abilities API tidigare \u00e4r k\u00e4rnid\u00e9n enkel: WordPress f\u00e5r ett <strong>f\u00f6rstklassigt, funktionsorienterat API \u00f6ver flera kontexter<\/strong> som standardiserar hur core och plugins beskriver vad de kan g\u00f6ra.<\/p>\n\n\n\n<p>En ability definierar du en g\u00e5ng och kan sedan k\u00f6ra den fr\u00e5n PHP, JavaScript och REST API.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n\n<li>Ett unikt namn (<code>namespace\/ability-name<\/code>)<\/li>\n\n\n<li>Ett typat <strong>input schema<\/strong> och <strong>output schema<\/strong><\/li>\n\n\n<li>En <strong>permission_callback<\/strong> som kontrollerar beh\u00f6righeter\/capabilities<\/li>\n\n\n<li>En <strong>execute_callback<\/strong> som g\u00f6r sj\u00e4lva jobbet<\/li>\n\n<\/ul>\n\n\n\n<p>Det du g\u00f6r i <code>execute_callback<\/code> kan vara i princip vad som helst som \u00e4r en avgr\u00e4nsad arbetsenhet: h\u00e4mta data, uppdatera inl\u00e4gg, k\u00f6ra diagnostik, och s\u00e5 vidare.<\/p>\n\n\n\n<p>WordPress 6.9 kommer med tre core-abilities som \u00e4r perfekta att testa med:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n\n<li><code>core\/get-site-info<\/code>: returnerar sajtens inst\u00e4llda information. Som standard alla f\u00e4lt, eller valfritt filtrerat urval.<\/li>\n\n\n<li><code>core\/get-user-info<\/code>: returnerar grundl\u00e4ggande profildata f\u00f6r nuvarande autentiserad anv\u00e4ndare (f\u00f6r personalisering, audit och access-medvetet beteende).<\/li>\n\n\n<li><code>core\/get-environment-info<\/code>: returnerar detaljer om runtime-kontexten (milj\u00f6, PHP runtime, databas-serverinfo, WordPress-version) f\u00f6r diagnostik och kompatibilitet.<\/li>\n\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Vad \u00e4r WordPress MCP Adapter?<\/h2>\n\n\n\n<p><strong>WordPress MCP Adapter<\/strong> \u00e4r ett officiellt paket inom initiativet <em>AI Building Blocks for WordPress<\/em>. Jobbet den g\u00f6r \u00e4r att \u00f6vers\u00e4tta abilities (registrerade via Abilities API) till de primitives som st\u00f6ds av <strong>Model Context Protocol (MCP)<\/strong>, s\u00e5 att AI-agenter kan:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n\n<li>uppt\u00e4cka och k\u00f6ra sajt-funktionalitet som <strong>MCP tools<\/strong><\/li>\n\n\n<li>l\u00e4sa WordPress-data som <strong>MCP resources<\/strong><\/li>\n\n<\/ul>\n\n\n\n<p>Praktiskt inneb\u00e4r det h\u00e4r: har du redan abilities i din kodbas, \u00e4r du v\u00e4ldigt n\u00e4ra att g\u00f6ra dem \u00e5tkomliga f\u00f6r en MCP-kompatibel AI-klient.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Grundbegrepp i MCP: tools, resources och prompts<\/h3>\n\n\n\n<p>MCP organiserar interaktioner i tre primitives:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n\n<li><strong>Tools<\/strong>: k\u00f6rbara funktioner som AI:n anropar f\u00f6r att utf\u00f6ra en \u00e5tg\u00e4rd.<\/li>\n\n\n<li><strong>Resources<\/strong>: passiva datak\u00e4llor (t.ex. filer eller DB-rader) som AI:n l\u00e4ser som kontext.<\/li>\n\n\n<li><strong>Prompts<\/strong>: f\u00f6rkonfigurerade mallar som guidar specifika arbetsfl\u00f6den.<\/li>\n\n<\/ul>\n\n\n\n<p>I MCP Adapter-exemplet exponeras abilities oftast som <strong>tools<\/strong>, eftersom de representerar k\u00f6rbar logik (h\u00e4mta data, uppdatera inl\u00e4gg, diagnostik). Men adaptern \u00e4r flexibel: om en ability bara ger read-only-data (t.ex. en statisk konfiguration eller en logg), kan den \u00e4ven konfigureras som <strong>resource<\/strong> s\u00e5 att AI:n kan konsumera informationen som bakgrund utan att aktivt \u201ck\u00f6ra\u201d den.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Installera MCP Adapter (plugin-varianten)<\/h2>\n\n\n\n<p>Snabbaste v\u00e4gen \u00e4r att installera MCP Adapter som plugin via GitHub-releaser:<\/p>\n\n\n\n<p><a href=\"https:\/\/github.com\/WordPress\/mcp-adapter\/releases\">https:\/\/github.com\/WordPress\/mcp-adapter\/releases<\/a><\/p>\n\n\n\n<p>N\u00e4r pluginet \u00e4r installerat och aktiverat registrerar det en <strong>default MCP server<\/strong> med namnet <code>mcp-adapter-default-server<\/code> samt tre egna abilities:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n\n<li><code>mcp-adapter\/discover-abilities<\/code><\/li>\n\n\n<li><code>mcp-adapter\/get-ability-info<\/code><\/li>\n\n\n<li><code>mcp-adapter\/execute-ability<\/code><\/li>\n\n<\/ul>\n\n\n\n<p>De h\u00e4r exponeras ocks\u00e5 automatiskt som MCP tools:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n\n<li><code>mcp-adapter-discover-abilities<\/code><\/li>\n\n\n<li><code>mcp-adapter-get-ability-info<\/code><\/li>\n\n\n<li><code>mcp-adapter-execute-ability<\/code><\/li>\n\n<\/ul>\n\n\n\n<p>Tillsammans ger de en lager-p\u00e5-lager-modell d\u00e4r agenten kan <strong>uppt\u00e4cka<\/strong> vilka abilities som finns, <strong>l\u00e4sa<\/strong> information om dem och sedan <strong>exekvera<\/strong> r\u00e4tt ability.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">G\u00f6r abilities tillg\u00e4ngliga i default-servern (meta.mcp.public)<\/h2>\n\n\n\n<p>I default-servern \u00e4r det <em>inte<\/em> s\u00e5 att alla abilities blir \u00e5tkomliga per automatik. Du m\u00e5ste explicit markera en ability som publik f\u00f6r MCP genom att s\u00e4tta flaggan <code>meta.mcp.public<\/code> i argumenten n\u00e4r du registrerar den med <code>wp_register_ability()<\/code>.<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#24292e\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#e1e4e8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>'meta' =&gt; array(\n    'mcp' =&gt; array(\n        'public' =&gt; true,  \/\/ Kr\u00e4vs f\u00f6r \u00e5tkomst via MCP Adapters default-server\n    ),\n),\n\n<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color:#24292e;color:#e1e4e8\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color:#9ECBFF\">'meta'<\/span><span style=\"color:#F97583\"> =><\/span><span style=\"color:#79B8FF\"> array<\/span><span style=\"color:#E1E4E8\">(<\/span><\/span>\n<span class=\"line\"><span style=\"color:#9ECBFF\">    'mcp'<\/span><span style=\"color:#F97583\"> =><\/span><span style=\"color:#79B8FF\"> array<\/span><span style=\"color:#E1E4E8\">(<\/span><\/span>\n<span class=\"line\"><span style=\"color:#9ECBFF\">        'public'<\/span><span style=\"color:#F97583\"> =><\/span><span style=\"color:#79B8FF\"> true<\/span><span style=\"color:#E1E4E8\">,  <\/span><span style=\"color:#6A737D\">\/\/ Kr\u00e4vs f\u00f6r \u00e5tkomst via MCP Adapters default-server<\/span><\/span>\n<span class=\"line\"><span style=\"color:#E1E4E8\">    ),<\/span><\/span>\n<span class=\"line\"><span style=\"color:#E1E4E8\">),<\/span><\/span>\n<span class=\"line\"><\/span><\/code><\/pre><\/div>\n\n\n\n<p>F\u00f6r core-abilities (de som WordPress sj\u00e4lv registrerar) kan du anv\u00e4nda filtret <code>wp_register_ability_args<\/code> f\u00f6r att injicera flaggan vid registreringen.<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#24292e\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#e1e4e8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>&lt;?php\n\/**\n * Plugin Name: Enable core abilities\n * Version: 1.0.0\n *\n * @package enable-core-abilities\n *\/\n\nadd_filter( 'wp_register_ability_args', 'myplugin_enable_core_abilities_mcp_access', 10, 2 );\n\/**\n * Enable MCP access for core abilities.\n *\n * @param array  $args         Ability registration arguments.\n * @param string $ability_name Ability ID.\n * @return array Modified ability registration arguments.\n *\/\nfunction myplugin_enable_core_abilities_mcp_access( array $args, string $ability_name ) {\n    \/\/ Enable MCP access for the three current core abilities.\n    $core_abilities = array(\n        'core\/get-site-info',\n        'core\/get-user-info',\n        'core\/get-environment-info',\n    );\n\n    if ( in_array( $ability_name, $core_abilities, true ) ) {\n        $args['meta']['mcp']['public'] = true;\n    }\n\n    return $args;\n}\n\n<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color:#24292e;color:#e1e4e8\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color:#F97583\">&#x3C;?<\/span><span style=\"color:#79B8FF\">php<\/span><\/span>\n<span class=\"line\"><span style=\"color:#6A737D\">\/**<\/span><\/span>\n<span class=\"line\"><span style=\"color:#6A737D\"> * Plugin Name: Enable core abilities<\/span><\/span>\n<span class=\"line\"><span style=\"color:#6A737D\"> * Version: 1.0.0<\/span><\/span>\n<span class=\"line\"><span style=\"color:#6A737D\"> *<\/span><\/span>\n<span class=\"line\"><span style=\"color:#6A737D\"> * <\/span><span style=\"color:#F97583\">@package<\/span><span style=\"color:#6A737D\"> enable-core-abilities<\/span><\/span>\n<span class=\"line\"><span style=\"color:#6A737D\"> *\/<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color:#B392F0\">add_filter<\/span><span style=\"color:#E1E4E8\">( <\/span><span style=\"color:#9ECBFF\">'wp_register_ability_args'<\/span><span style=\"color:#E1E4E8\">, <\/span><span style=\"color:#9ECBFF\">'myplugin_enable_core_abilities_mcp_access'<\/span><span style=\"color:#E1E4E8\">, <\/span><span style=\"color:#79B8FF\">10<\/span><span style=\"color:#E1E4E8\">, <\/span><span style=\"color:#79B8FF\">2<\/span><span style=\"color:#E1E4E8\"> );<\/span><\/span>\n<span class=\"line\"><span style=\"color:#6A737D\">\/**<\/span><\/span>\n<span class=\"line\"><span style=\"color:#6A737D\"> * Enable MCP access for core abilities.<\/span><\/span>\n<span class=\"line\"><span style=\"color:#6A737D\"> *<\/span><\/span>\n<span class=\"line\"><span style=\"color:#6A737D\"> * <\/span><span style=\"color:#F97583\">@param<\/span><span style=\"color:#F97583\"> array<\/span><span style=\"color:#6A737D\">  $args         Ability registration arguments.<\/span><\/span>\n<span class=\"line\"><span style=\"color:#6A737D\"> * <\/span><span style=\"color:#F97583\">@param<\/span><span style=\"color:#F97583\"> string<\/span><span style=\"color:#6A737D\"> $ability_name Ability ID.<\/span><\/span>\n<span class=\"line\"><span style=\"color:#6A737D\"> * <\/span><span style=\"color:#F97583\">@return<\/span><span style=\"color:#F97583\"> array<\/span><span style=\"color:#6A737D\"> Modified ability registration arguments.<\/span><\/span>\n<span class=\"line\"><span style=\"color:#6A737D\"> *\/<\/span><\/span>\n<span class=\"line\"><span style=\"color:#F97583\">function<\/span><span style=\"color:#B392F0\"> myplugin_enable_core_abilities_mcp_access<\/span><span style=\"color:#E1E4E8\">( <\/span><span style=\"color:#F97583\">array<\/span><span style=\"color:#E1E4E8\"> $args, <\/span><span style=\"color:#F97583\">string<\/span><span style=\"color:#E1E4E8\"> $ability_name ) {<\/span><\/span>\n<span class=\"line\"><span style=\"color:#6A737D\">    \/\/ Enable MCP access for the three current core abilities.<\/span><\/span>\n<span class=\"line\"><span style=\"color:#E1E4E8\">    $core_abilities <\/span><span style=\"color:#F97583\">=<\/span><span style=\"color:#79B8FF\"> array<\/span><span style=\"color:#E1E4E8\">(<\/span><\/span>\n<span class=\"line\"><span style=\"color:#9ECBFF\">        'core\/get-site-info'<\/span><span style=\"color:#E1E4E8\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color:#9ECBFF\">        'core\/get-user-info'<\/span><span style=\"color:#E1E4E8\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color:#9ECBFF\">        'core\/get-environment-info'<\/span><span style=\"color:#E1E4E8\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color:#E1E4E8\">    );<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color:#F97583\">    if<\/span><span style=\"color:#E1E4E8\"> ( <\/span><span style=\"color:#79B8FF\">in_array<\/span><span style=\"color:#E1E4E8\">( $ability_name, $core_abilities, <\/span><span style=\"color:#79B8FF\">true<\/span><span style=\"color:#E1E4E8\"> ) ) {<\/span><\/span>\n<span class=\"line\"><span style=\"color:#E1E4E8\">        $args[<\/span><span style=\"color:#9ECBFF\">'meta'<\/span><span style=\"color:#E1E4E8\">][<\/span><span style=\"color:#9ECBFF\">'mcp'<\/span><span style=\"color:#E1E4E8\">][<\/span><span style=\"color:#9ECBFF\">'public'<\/span><span style=\"color:#E1E4E8\">] <\/span><span style=\"color:#F97583\">=<\/span><span style=\"color:#79B8FF\"> true<\/span><span style=\"color:#E1E4E8\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color:#E1E4E8\">    }<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color:#F97583\">    return<\/span><span style=\"color:#E1E4E8\"> $args;<\/span><\/span>\n<span class=\"line\"><span style=\"color:#E1E4E8\">}<\/span><\/span>\n<span class=\"line\"><\/span><\/code><\/pre><\/div>\n\n\n\n<p>N\u00e4r detta \u00e4r p\u00e5 plats kan du koppla en MCP-kompatibel AI-klient till sajten och anropa core-abilities via default-serverns MCP tools.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Koppla AI-appar: transportmetoder och konfigurationer<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Transport: STDIO eller HTTP<\/h3>\n\n\n\n<p>F\u00f6r att prata med en WordPress-sajt som agerar MCP-server finns tv\u00e5 transportlager i MCP-arkitekturen: <strong>STDIO<\/strong> och <strong>HTTP<\/strong>. Valet styrs i praktiken av var WordPress k\u00f6rs och hur du vill koppla upp dig.<\/p>\n\n\n\n<p>F\u00f6r lokala utvecklingsmilj\u00f6er \u00e4r <strong>STDIO<\/strong> ofta enklast. MCP Adapter st\u00f6der detta via <strong>WP-CLI<\/strong>, s\u00e5 WP-CLI beh\u00f6ver finnas installerat lokalt.<\/p>\n\n\n\n<p>Minsta konfiguration f\u00f6r STDIO ser ut s\u00e5 h\u00e4r:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#24292e\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#e1e4e8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>{\n  &quot;wordpress-mcp-server&quot;: {\n    &quot;command&quot;: &quot;wp&quot;,\n    &quot;args&quot;: [\n      &quot;--path=\/path\/to\/your\/wordpress\/installation&quot;,\n      &quot;mcp-adapter&quot;,\n      &quot;serve&quot;,\n      &quot;--server=mcp-adapter-default-server&quot;,\n      &quot;--user={admin_user}&quot;\n    ]\n  }\n}\n\n<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color:#24292e;color:#e1e4e8\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color:#E1E4E8\">{<\/span><\/span>\n<span class=\"line\"><span style=\"color:#79B8FF\">  \"wordpress-mcp-server\"<\/span><span style=\"color:#E1E4E8\">: {<\/span><\/span>\n<span class=\"line\"><span style=\"color:#79B8FF\">    \"command\"<\/span><span style=\"color:#E1E4E8\">: <\/span><span style=\"color:#9ECBFF\">\"wp\"<\/span><span style=\"color:#E1E4E8\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color:#79B8FF\">    \"args\"<\/span><span style=\"color:#E1E4E8\">: [<\/span><\/span>\n<span class=\"line\"><span style=\"color:#9ECBFF\">      \"--path=\/path\/to\/your\/wordpress\/installation\"<\/span><span style=\"color:#E1E4E8\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color:#9ECBFF\">      \"mcp-adapter\"<\/span><span style=\"color:#E1E4E8\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color:#9ECBFF\">      \"serve\"<\/span><span style=\"color:#E1E4E8\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color:#9ECBFF\">      \"--server=mcp-adapter-default-server\"<\/span><span style=\"color:#E1E4E8\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color:#9ECBFF\">      \"--user={admin_user}\"<\/span><\/span>\n<span class=\"line\"><span style=\"color:#E1E4E8\">    ]<\/span><\/span>\n<span class=\"line\"><span style=\"color:#E1E4E8\">  }<\/span><\/span>\n<span class=\"line\"><span style=\"color:#E1E4E8\">}<\/span><\/span>\n<span class=\"line\"><\/span><\/code><\/pre><\/div>\n\n\n\n<ul class=\"wp-block-list\">\n\n<li>Servernamnet h\u00e4r \u00e4r <code>wordpress-mcp-server<\/code> (valfritt namn).<\/li>\n\n\n<li><code>command<\/code> \u00e4r <code>wp<\/code> (WP-CLI).<\/li>\n\n\n<li><code>--path<\/code> pekar p\u00e5 din WordPress-installation.<\/li>\n\n\n<li><code>mcp-adapter serve<\/code> startar MCP Adapter-servern.<\/li>\n\n\n<li><code>--server<\/code> v\u00e4ljer vilken MCP-server som ska anv\u00e4ndas (default-servern h\u00e4r).<\/li>\n\n\n<li><code>--user<\/code> anger vilken WordPress-anv\u00e4ndare klienten autentiserar som (t.ex. en admin vid test).<\/li>\n\n<\/ul>\n\n\n\n<p>F\u00f6r publikt \u00e5tkomliga installationer \u2013 eller om du inte vill anv\u00e4nda STDIO \u2013 kan du k\u00f6ra <strong>HTTP<\/strong> via en remote proxy: <a href=\"https:\/\/www.npmjs.com\/package\/@automattic\/mcp-wordpress-remote\"><code>@automattic\/mcp-wordpress-remote<\/code><\/a>. Det kr\u00e4ver att du har <strong>Node.js<\/strong> installerat och att du s\u00e4tter upp autentisering via <strong>WordPress application passwords<\/strong> eller en egen OAuth-l\u00f6sning.<\/p>\n\n\n\n<p>Minsta HTTP-konfiguration ser ut s\u00e5 h\u00e4r:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#24292e\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#e1e4e8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>{\n  &quot;wordpress-mcp-server&quot;: {\n    &quot;command&quot;: &quot;npx&quot;,\n    &quot;args&quot;: [&quot;-y&quot;, &quot;@automattic\/mcp-wordpress-remote@latest&quot;],\n    &quot;env&quot;: {\n      &quot;WP_API_URL&quot;: &quot;https:\/\/yoursite.example\/wp-json\/mcp\/mcp-adapter-default-server&quot;,\n      &quot;WP_API_USERNAME&quot;: &quot;{admin_user}&quot;,\n      &quot;WP_API_PASSWORD&quot;: &quot;{application-password}&quot;\n    }\n  }\n}\n\n<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color:#24292e;color:#e1e4e8\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color:#E1E4E8\">{<\/span><\/span>\n<span class=\"line\"><span style=\"color:#79B8FF\">  \"wordpress-mcp-server\"<\/span><span style=\"color:#E1E4E8\">: {<\/span><\/span>\n<span class=\"line\"><span style=\"color:#79B8FF\">    \"command\"<\/span><span style=\"color:#E1E4E8\">: <\/span><span style=\"color:#9ECBFF\">\"npx\"<\/span><span style=\"color:#E1E4E8\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color:#79B8FF\">    \"args\"<\/span><span style=\"color:#E1E4E8\">: [<\/span><span style=\"color:#9ECBFF\">\"-y\"<\/span><span style=\"color:#E1E4E8\">, <\/span><span style=\"color:#9ECBFF\">\"@automattic\/mcp-wordpress-remote@latest\"<\/span><span style=\"color:#E1E4E8\">],<\/span><\/span>\n<span class=\"line\"><span style=\"color:#79B8FF\">    \"env\"<\/span><span style=\"color:#E1E4E8\">: {<\/span><\/span>\n<span class=\"line\"><span style=\"color:#79B8FF\">      \"WP_API_URL\"<\/span><span style=\"color:#E1E4E8\">: <\/span><span style=\"color:#9ECBFF\">\"https:\/\/yoursite.example\/wp-json\/mcp\/mcp-adapter-default-server\"<\/span><span style=\"color:#E1E4E8\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color:#79B8FF\">      \"WP_API_USERNAME\"<\/span><span style=\"color:#E1E4E8\">: <\/span><span style=\"color:#9ECBFF\">\"{admin_user}\"<\/span><span style=\"color:#E1E4E8\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color:#79B8FF\">      \"WP_API_PASSWORD\"<\/span><span style=\"color:#E1E4E8\">: <\/span><span style=\"color:#9ECBFF\">\"{application-password}\"<\/span><\/span>\n<span class=\"line\"><span style=\"color:#E1E4E8\">    }<\/span><\/span>\n<span class=\"line\"><span style=\"color:#E1E4E8\">  }<\/span><\/span>\n<span class=\"line\"><span style=\"color:#E1E4E8\">}<\/span><\/span>\n<span class=\"line\"><\/span><\/code><\/pre><\/div>\n\n\n\n<ul class=\"wp-block-list\">\n\n<li><code>command<\/code> \u00e4r <code>npx<\/code> (k\u00f6r Node.js-paket).<\/li>\n\n\n<li><code>-y<\/code> accepterar installation utan interaktiv prompt.<\/li>\n\n\n<li><code>@automattic\/mcp-wordpress-remote@latest<\/code> anv\u00e4nder senaste versionen av proxyn.<\/li>\n\n\n<li><code>WP_API_URL<\/code> pekar p\u00e5 MCP-endpointen p\u00e5 din sajt.<\/li>\n\n\n<li><code>WP_API_USERNAME<\/code> anger anv\u00e4ndaren.<\/li>\n\n\n<li><code>WP_API_PASSWORD<\/code> \u00e4r anv\u00e4ndarens application password.<\/li>\n\n<\/ul>\n\n\n\n<p>Om du k\u00f6r HTTP remote proxy mot en lokal sajt och f\u00e5r problem finns fels\u00f6kningstips h\u00e4r (vanliga orsaker \u00e4r flera Node-versioner eller lokala SSL-certifikat): <a href=\"https:\/\/github.com\/Automattic\/mcp-wordpress-remote\/blob\/trunk\/Docs\/troubleshooting.md\">https:\/\/github.com\/Automattic\/mcp-wordpress-remote\/blob\/trunk\/Docs\/troubleshooting.md<\/a><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">App-specifika inst\u00e4llningar<\/h3>\n\n\n\n<p>Nedan \u00e4r var du faktiskt stoppar in MCP-server-konfigurationen i n\u00e5gra av de vanligaste AI-klienterna: Claude Desktop, Cursor, Claude Code och VS Code.<\/p>\n\n\n\n<div class=\"wp-block-group callout callout-info is-style-info is-layout-flow wp-block-group-is-layout-flow\" style=\"border-width:1px;border-radius:8px;padding-top:1rem;padding-right:1.5rem;padding-bottom:1rem;padding-left:1.5rem\">\n\n<h4 class=\"wp-block-heading callout-title\">Exempelv\u00e4rden<\/h4>\n\n\n<p>Exemplen anv\u00e4nder en lokal Studio-sajt vid s\u00f6kv\u00e4gen <code>\/Users\/jonathanbossenger\/Studio\/wordpress-mcp<\/code>, \u00e5tkomlig p\u00e5 <code>http:\/\/localhost:8885\/<\/code>, med admin-anv\u00e4ndaren <code>admin<\/code>. Byt ut till din egen path, URL och anv\u00e4ndare.<\/p>\n\n<\/div>\n\n\n\n<h4 class=\"wp-block-heading\">Claude Desktop<\/h4>\n\n\n\n<p>I Claude Desktop g\u00e5r du till <strong>Developer<\/strong>-fliken via <em>Claude \u2192 Settings \u2192 Developer<\/em>. Under <strong>Local MCP servers<\/strong> klickar du <strong>Edit config<\/strong>. D\u00e5 \u00f6ppnas en filv\u00e4ljare till <code>claude_desktop_config.json<\/code>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"2560\" height=\"1711\" src=\"https:\/\/helloblog.io\/app\/uploads\/sites\/13\/2026\/02\/mcp-01-claude-developer-settings-scaled.png\" alt=\"Claude Desktop: Developer settings-panel\" class=\"wp-image-242\" srcset=\"https:\/\/helloblog.io\/app\/uploads\/sites\/13\/2026\/02\/mcp-01-claude-developer-settings-scaled.png 2560w, https:\/\/helloblog.io\/app\/uploads\/sites\/13\/2026\/02\/mcp-01-claude-developer-settings-300x201.png 300w, https:\/\/helloblog.io\/app\/uploads\/sites\/13\/2026\/02\/mcp-01-claude-developer-settings-1024x684.png 1024w, https:\/\/helloblog.io\/app\/uploads\/sites\/13\/2026\/02\/mcp-01-claude-developer-settings-768x513.png 768w, https:\/\/helloblog.io\/app\/uploads\/sites\/13\/2026\/02\/mcp-01-claude-developer-settings-1536x1027.png 1536w, https:\/\/helloblog.io\/app\/uploads\/sites\/13\/2026\/02\/mcp-01-claude-developer-settings-2048x1369.png 2048w, https:\/\/helloblog.io\/app\/uploads\/sites\/13\/2026\/02\/mcp-01-claude-developer-settings-400x267.png 400w\" sizes=\"auto, (max-width: 2560px) 100vw, 2560px\" \/><figcaption class=\"wp-element-caption\"><em>Forr\u00e1s: developer.wordpress.org<\/em><\/figcaption><\/figure>\n\n\n\n<p>MCP-servrar l\u00e4ggs in under ett <code>mcpServers<\/code>-objekt:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#24292e\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#e1e4e8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>{\n  &quot;mcpServers&quot;: {\n  }\n}\n\n<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color:#24292e;color:#e1e4e8\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color:#E1E4E8\">{<\/span><\/span>\n<span class=\"line\"><span style=\"color:#79B8FF\">  \"mcpServers\"<\/span><span style=\"color:#E1E4E8\">: {<\/span><\/span>\n<span class=\"line\"><span style=\"color:#E1E4E8\">  }<\/span><\/span>\n<span class=\"line\"><span style=\"color:#E1E4E8\">}<\/span><\/span>\n<span class=\"line\"><\/span><\/code><\/pre><\/div>\n\n\n\n<p>STDIO-varianten:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#24292e\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#e1e4e8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>{\n  &quot;mcpServers&quot;: {\n    &quot;wordpress-mcp-server&quot;: {\n      &quot;command&quot;: &quot;wp&quot;,\n      &quot;args&quot;: [\n        &quot;--path=\/Users\/jonathanbossenger\/Studio\/wordpress-mcp&quot;,\n        &quot;mcp-adapter&quot;,\n        &quot;serve&quot;,\n        &quot;--server=mcp-adapter-default-server&quot;,\n        &quot;--user=admin&quot;\n      ]\n    }\n  }\n}\n\n<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color:#24292e;color:#e1e4e8\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color:#E1E4E8\">{<\/span><\/span>\n<span class=\"line\"><span style=\"color:#79B8FF\">  \"mcpServers\"<\/span><span style=\"color:#E1E4E8\">: {<\/span><\/span>\n<span class=\"line\"><span style=\"color:#79B8FF\">    \"wordpress-mcp-server\"<\/span><span style=\"color:#E1E4E8\">: {<\/span><\/span>\n<span class=\"line\"><span style=\"color:#79B8FF\">      \"command\"<\/span><span style=\"color:#E1E4E8\">: <\/span><span style=\"color:#9ECBFF\">\"wp\"<\/span><span style=\"color:#E1E4E8\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color:#79B8FF\">      \"args\"<\/span><span style=\"color:#E1E4E8\">: [<\/span><\/span>\n<span class=\"line\"><span style=\"color:#9ECBFF\">        \"--path=\/Users\/jonathanbossenger\/Studio\/wordpress-mcp\"<\/span><span style=\"color:#E1E4E8\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color:#9ECBFF\">        \"mcp-adapter\"<\/span><span style=\"color:#E1E4E8\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color:#9ECBFF\">        \"serve\"<\/span><span style=\"color:#E1E4E8\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color:#9ECBFF\">        \"--server=mcp-adapter-default-server\"<\/span><span style=\"color:#E1E4E8\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color:#9ECBFF\">        \"--user=admin\"<\/span><\/span>\n<span class=\"line\"><span style=\"color:#E1E4E8\">      ]<\/span><\/span>\n<span class=\"line\"><span style=\"color:#E1E4E8\">    }<\/span><\/span>\n<span class=\"line\"><span style=\"color:#E1E4E8\">  }<\/span><\/span>\n<span class=\"line\"><span style=\"color:#E1E4E8\">}<\/span><\/span>\n<span class=\"line\"><\/span><\/code><\/pre><\/div>\n\n\n\n<p>HTTP-varianten:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#24292e\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#e1e4e8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>{\n  &quot;mcpServers&quot;: {\n    &quot;wordpress-mcp-server&quot;: {\n      &quot;command&quot;: &quot;npx&quot;,\n      &quot;args&quot;: [&quot;-y&quot;, &quot;@automattic\/mcp-wordpress-remote@latest&quot;],\n      &quot;env&quot;: {\n        &quot;WP_API_URL&quot;: &quot;http:\/\/localhost:8885\/wp-json\/mcp\/mcp-adapter-default-server&quot;,\n        &quot;WP_API_USERNAME&quot;: &quot;admin&quot;,\n        &quot;WP_API_PASSWORD&quot;: &quot;2SEB qW5j D7CW fpsh pbmN RGva&quot;\n      }\n    }\n  }\n}\n\n<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color:#24292e;color:#e1e4e8\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color:#E1E4E8\">{<\/span><\/span>\n<span class=\"line\"><span style=\"color:#79B8FF\">  \"mcpServers\"<\/span><span style=\"color:#E1E4E8\">: {<\/span><\/span>\n<span class=\"line\"><span style=\"color:#79B8FF\">    \"wordpress-mcp-server\"<\/span><span style=\"color:#E1E4E8\">: {<\/span><\/span>\n<span class=\"line\"><span style=\"color:#79B8FF\">      \"command\"<\/span><span style=\"color:#E1E4E8\">: <\/span><span style=\"color:#9ECBFF\">\"npx\"<\/span><span style=\"color:#E1E4E8\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color:#79B8FF\">      \"args\"<\/span><span style=\"color:#E1E4E8\">: [<\/span><span style=\"color:#9ECBFF\">\"-y\"<\/span><span style=\"color:#E1E4E8\">, <\/span><span style=\"color:#9ECBFF\">\"@automattic\/mcp-wordpress-remote@latest\"<\/span><span style=\"color:#E1E4E8\">],<\/span><\/span>\n<span class=\"line\"><span style=\"color:#79B8FF\">      \"env\"<\/span><span style=\"color:#E1E4E8\">: {<\/span><\/span>\n<span class=\"line\"><span style=\"color:#79B8FF\">        \"WP_API_URL\"<\/span><span style=\"color:#E1E4E8\">: <\/span><span style=\"color:#9ECBFF\">\"http:\/\/localhost:8885\/wp-json\/mcp\/mcp-adapter-default-server\"<\/span><span style=\"color:#E1E4E8\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color:#79B8FF\">        \"WP_API_USERNAME\"<\/span><span style=\"color:#E1E4E8\">: <\/span><span style=\"color:#9ECBFF\">\"admin\"<\/span><span style=\"color:#E1E4E8\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color:#79B8FF\">        \"WP_API_PASSWORD\"<\/span><span style=\"color:#E1E4E8\">: <\/span><span style=\"color:#9ECBFF\">\"2SEB qW5j D7CW fpsh pbmN RGva\"<\/span><\/span>\n<span class=\"line\"><span style=\"color:#E1E4E8\">      }<\/span><\/span>\n<span class=\"line\"><span style=\"color:#E1E4E8\">    }<\/span><\/span>\n<span class=\"line\"><span style=\"color:#E1E4E8\">  }<\/span><\/span>\n<span class=\"line\"><span style=\"color:#E1E4E8\">}<\/span><\/span>\n<span class=\"line\"><\/span><\/code><\/pre><\/div>\n\n\n\n<p>N\u00e4r du sparat m\u00e5ste du starta om Claude Desktop (konfigurationen l\u00e4ses bara vid uppstart). I Developer-fliken ska du sedan se servern listad under <strong>Local MCP servers<\/strong>. Om status visar <code>running<\/code> \u00e4r du redo att anv\u00e4nda den.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"2560\" height=\"1711\" src=\"https:\/\/helloblog.io\/app\/uploads\/sites\/13\/2026\/02\/mcp-02-claude-mcp-server-scaled.png\" alt=\"Claude Desktop: WordPress MCP server tillagd under Local MCP servers\" class=\"wp-image-243\" srcset=\"https:\/\/helloblog.io\/app\/uploads\/sites\/13\/2026\/02\/mcp-02-claude-mcp-server-scaled.png 2560w, https:\/\/helloblog.io\/app\/uploads\/sites\/13\/2026\/02\/mcp-02-claude-mcp-server-300x201.png 300w, https:\/\/helloblog.io\/app\/uploads\/sites\/13\/2026\/02\/mcp-02-claude-mcp-server-1024x684.png 1024w, https:\/\/helloblog.io\/app\/uploads\/sites\/13\/2026\/02\/mcp-02-claude-mcp-server-768x513.png 768w, https:\/\/helloblog.io\/app\/uploads\/sites\/13\/2026\/02\/mcp-02-claude-mcp-server-1536x1027.png 1536w, https:\/\/helloblog.io\/app\/uploads\/sites\/13\/2026\/02\/mcp-02-claude-mcp-server-2048x1369.png 2048w, https:\/\/helloblog.io\/app\/uploads\/sites\/13\/2026\/02\/mcp-02-claude-mcp-server-400x267.png 400w\" sizes=\"auto, (max-width: 2560px) 100vw, 2560px\" \/><figcaption class=\"wp-element-caption\"><em>Forr\u00e1s: developer.wordpress.org<\/em><\/figcaption><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\">Cursor<\/h4>\n\n\n\n<p>I Cursor g\u00e5r du till <em>Cursor \u2192 Settings \u2192 Cursor Settings<\/em> och v\u00e4ljer sektionen <strong>Tools and MCP<\/strong>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"2560\" height=\"1603\" src=\"https:\/\/helloblog.io\/app\/uploads\/sites\/13\/2026\/02\/mcp-04-cursor-scaled.png\" alt=\"Cursor: inst\u00e4llningspanelen Tools &#038; MCP\" class=\"wp-image-244\" srcset=\"https:\/\/helloblog.io\/app\/uploads\/sites\/13\/2026\/02\/mcp-04-cursor-scaled.png 2560w, https:\/\/helloblog.io\/app\/uploads\/sites\/13\/2026\/02\/mcp-04-cursor-300x188.png 300w, https:\/\/helloblog.io\/app\/uploads\/sites\/13\/2026\/02\/mcp-04-cursor-1024x641.png 1024w, https:\/\/helloblog.io\/app\/uploads\/sites\/13\/2026\/02\/mcp-04-cursor-768x481.png 768w, https:\/\/helloblog.io\/app\/uploads\/sites\/13\/2026\/02\/mcp-04-cursor-1536x962.png 1536w, https:\/\/helloblog.io\/app\/uploads\/sites\/13\/2026\/02\/mcp-04-cursor-2048x1283.png 2048w, https:\/\/helloblog.io\/app\/uploads\/sites\/13\/2026\/02\/mcp-04-cursor-400x251.png 400w\" sizes=\"auto, (max-width: 2560px) 100vw, 2560px\" \/><figcaption class=\"wp-element-caption\"><em>Forr\u00e1s: developer.wordpress.org<\/em><\/figcaption><\/figure>\n\n\n\n<p>Klicka <strong>Add Custom MCP<\/strong> f\u00f6r att \u00f6ppna <code>mcp.json<\/code>. Formatet \u00e4r samma som i Claude Desktop. N\u00e4r du sparat, g\u00e5 tillbaka till <strong>Tools and MCP<\/strong> s\u00e5 ser du servern listad och kan aktivera den f\u00f6r kodsessioner.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"2560\" height=\"1603\" src=\"https:\/\/helloblog.io\/app\/uploads\/sites\/13\/2026\/02\/mcp-05-cursor-mcp-scaled.png\" alt=\"Cursor: Tools &#038; MCP med WordPress MCP Server tillagd\" class=\"wp-image-245\" srcset=\"https:\/\/helloblog.io\/app\/uploads\/sites\/13\/2026\/02\/mcp-05-cursor-mcp-scaled.png 2560w, https:\/\/helloblog.io\/app\/uploads\/sites\/13\/2026\/02\/mcp-05-cursor-mcp-300x188.png 300w, https:\/\/helloblog.io\/app\/uploads\/sites\/13\/2026\/02\/mcp-05-cursor-mcp-1024x641.png 1024w, https:\/\/helloblog.io\/app\/uploads\/sites\/13\/2026\/02\/mcp-05-cursor-mcp-768x481.png 768w, https:\/\/helloblog.io\/app\/uploads\/sites\/13\/2026\/02\/mcp-05-cursor-mcp-1536x962.png 1536w, https:\/\/helloblog.io\/app\/uploads\/sites\/13\/2026\/02\/mcp-05-cursor-mcp-2048x1283.png 2048w, https:\/\/helloblog.io\/app\/uploads\/sites\/13\/2026\/02\/mcp-05-cursor-mcp-400x251.png 400w\" sizes=\"auto, (max-width: 2560px) 100vw, 2560px\" \/><figcaption class=\"wp-element-caption\"><em>Forr\u00e1s: developer.wordpress.org<\/em><\/figcaption><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\">Claude Code<\/h4>\n\n\n\n<p>I Claude Code kan du antingen l\u00e4gga <code>mcpServers<\/code>-objektet med relevanta serverkonfigurationer i <code>.claude.json<\/code> i din home-katalog, eller skapa en <code>.mcp.json<\/code> i projektkatalogen.<\/p>\n\n\n\n<p>Skillnaden \u00e4r praktisk: projektfilen l\u00e5ter dig ha olika MCP-servrar per projekt, medan home-filen g\u00f6r dem globala. Oavsett anv\u00e4nder du samma konfigurationsformat som Cursor\/Claude Desktop.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">VS Code<\/h4>\n\n\n\n<p>I VS Code konfigurerar du MCP via en JSON-fil (vanligen <code>mcp.json<\/code>) i en <code>.vscode<\/code>-katalog i din workspace. VS Codes format skiljer sig p\u00e5 en punkt: du definierar servrar i ett <code>servers<\/code>-objekt, inte <code>mcpServers<\/code>. Resten \u00e4r samma.<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#24292e\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#e1e4e8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>{\n  &quot;servers&quot;: {\n    \/\/ MCP server definitions go here\n  }\n}\n\n<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color:#24292e;color:#e1e4e8\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color:#E1E4E8\">{<\/span><\/span>\n<span class=\"line\"><span style=\"color:#79B8FF\">  \"servers\"<\/span><span style=\"color:#E1E4E8\">: {<\/span><\/span>\n<span class=\"line\"><span style=\"color:#6A737D\">    \/\/ MCP server definitions go here<\/span><\/span>\n<span class=\"line\"><span style=\"color:#E1E4E8\">  }<\/span><\/span>\n<span class=\"line\"><span style=\"color:#E1E4E8\">}<\/span><\/span>\n<span class=\"line\"><\/span><\/code><\/pre><\/div>\n\n\n\n<p>N\u00e4r filen finns p\u00e5 plats visar VS Code en MCP-kontrollrad d\u00e4r du kan starta\/stoppa\/restarta servern. N\u00e4r allt fungerar ser du \u00e4ven hur m\u00e5nga tools som \u00e4r tillg\u00e4ngliga (i defaultfallet tre). Mer om VS Codes format finns h\u00e4r: <a href=\"https:\/\/code.visualstudio.com\/docs\/copilot\/customization\/mcp-servers\">https:\/\/code.visualstudio.com\/docs\/copilot\/customization\/mcp-servers<\/a><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"2560\" height=\"1631\" src=\"https:\/\/helloblog.io\/app\/uploads\/sites\/13\/2026\/02\/mcp-06-vscode-scaled.png\" alt=\"VS Code: mcp.json konfigurerad f\u00f6r WordPress MCP server\" class=\"wp-image-246\" srcset=\"https:\/\/helloblog.io\/app\/uploads\/sites\/13\/2026\/02\/mcp-06-vscode-scaled.png 2560w, https:\/\/helloblog.io\/app\/uploads\/sites\/13\/2026\/02\/mcp-06-vscode-300x191.png 300w, https:\/\/helloblog.io\/app\/uploads\/sites\/13\/2026\/02\/mcp-06-vscode-1024x652.png 1024w, https:\/\/helloblog.io\/app\/uploads\/sites\/13\/2026\/02\/mcp-06-vscode-768x489.png 768w, https:\/\/helloblog.io\/app\/uploads\/sites\/13\/2026\/02\/mcp-06-vscode-1536x979.png 1536w, https:\/\/helloblog.io\/app\/uploads\/sites\/13\/2026\/02\/mcp-06-vscode-2048x1305.png 2048w, https:\/\/helloblog.io\/app\/uploads\/sites\/13\/2026\/02\/mcp-06-vscode-400x255.png 400w\" sizes=\"auto, (max-width: 2560px) 100vw, 2560px\" \/><figcaption class=\"wp-element-caption\"><em>Forr\u00e1s: developer.wordpress.org<\/em><\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">S\u00e5 anv\u00e4nds MCP tools i praktiken<\/h2>\n\n\n\n<p>N\u00e4r din MCP-server \u00e4r kopplad till en AI-klient kan du b\u00f6rja anv\u00e4nda verktygen som MCP Adapter exponerar.<\/p>\n\n\n\n<p>Ett konkret exempel: i Claude Desktop kan du be den att \u201ch\u00e4mta site info fr\u00e5n min WordPress-sajt\u201d. Klienten ser att det finns en MCP-server och anropar <code>mcp-adapter-discover-abilities<\/code> f\u00f6r att se vilka abilities som finns. D\u00e4refter v\u00e4ljer den <code>core\/get-site-info<\/code> och k\u00f6r den via <code>mcp-adapter-execute-ability<\/code>, med ability-namnet som parameter. Resultatet kommer tillbaka som sajtens information, och klienten formulerar ett svar baserat p\u00e5 datan.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"2560\" height=\"1711\" src=\"https:\/\/helloblog.io\/app\/uploads\/sites\/13\/2026\/02\/mcp-03-claude-query-scaled.png\" alt=\"Claude Desktop: fr\u00e5ga som triggar MCP tools och returnerar site info fr\u00e5n WordPress\" class=\"wp-image-247\" srcset=\"https:\/\/helloblog.io\/app\/uploads\/sites\/13\/2026\/02\/mcp-03-claude-query-scaled.png 2560w, https:\/\/helloblog.io\/app\/uploads\/sites\/13\/2026\/02\/mcp-03-claude-query-300x201.png 300w, https:\/\/helloblog.io\/app\/uploads\/sites\/13\/2026\/02\/mcp-03-claude-query-1024x684.png 1024w, https:\/\/helloblog.io\/app\/uploads\/sites\/13\/2026\/02\/mcp-03-claude-query-768x513.png 768w, https:\/\/helloblog.io\/app\/uploads\/sites\/13\/2026\/02\/mcp-03-claude-query-1536x1027.png 1536w, https:\/\/helloblog.io\/app\/uploads\/sites\/13\/2026\/02\/mcp-03-claude-query-2048x1369.png 2048w, https:\/\/helloblog.io\/app\/uploads\/sites\/13\/2026\/02\/mcp-03-claude-query-400x267.png 400w\" sizes=\"auto, (max-width: 2560px) 100vw, 2560px\" \/><figcaption class=\"wp-element-caption\"><em>Forr\u00e1s: developer.wordpress.org<\/em><\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Egen MCP-server i ditt plugin (Composer + mcp_adapter_init)<\/h2>\n\n\n\n<p>Default-servern r\u00e4cker l\u00e5ngt, men ibland vill du ha en <strong>egen MCP-server per plugin<\/strong> f\u00f6r att styra exakt vilka abilities som exponeras (och hur). D\u00e5 installerar du MCP Adapter som dependency via Composer och registrerar en custom server.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">1) Installera paketet<\/h3>\n\n\n\n<p>K\u00f6r fr\u00e5n din plugin-katalog:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#24292e\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#e1e4e8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>composer require wordpress\/mcp-adapter\n\n<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color:#24292e;color:#e1e4e8\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color:#B392F0\">composer<\/span><span style=\"color:#9ECBFF\"> require<\/span><span style=\"color:#9ECBFF\"> wordpress\/mcp-adapter<\/span><\/span>\n<span class=\"line\"><\/span><\/code><\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">2) Ladda Composers autoloader<\/h3>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#24292e\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#e1e4e8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>if ( file_exists( __DIR__ . '\/vendor\/autoload.php' ) ) {\n    require_once __DIR__ . '\/vendor\/autoload.php';\n}\n\n<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color:#24292e;color:#e1e4e8\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color:#F97583\">if<\/span><span style=\"color:#E1E4E8\"> ( <\/span><span style=\"color:#79B8FF\">file_exists<\/span><span style=\"color:#E1E4E8\">( <\/span><span style=\"color:#79B8FF\">__DIR__<\/span><span style=\"color:#F97583\"> .<\/span><span style=\"color:#9ECBFF\"> '\/vendor\/autoload.php'<\/span><span style=\"color:#E1E4E8\"> ) ) {<\/span><\/span>\n<span class=\"line\"><span style=\"color:#F97583\">    require_once<\/span><span style=\"color:#79B8FF\"> __DIR__<\/span><span style=\"color:#F97583\"> .<\/span><span style=\"color:#9ECBFF\"> '\/vendor\/autoload.php'<\/span><span style=\"color:#E1E4E8\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color:#E1E4E8\">}<\/span><\/span>\n<span class=\"line\"><\/span><\/code><\/pre><\/div>\n\n\n\n<p>Om det \u00e4r rimligt att flera plugins p\u00e5 samma sajt beror p\u00e5 MCP Adapter eller Abilities API rekommenderas <strong>Jetpack Autoloader<\/strong> f\u00f6r att undvika versionskonflikter: <a href=\"https:\/\/github.com\/WordPress\/mcp-adapter\/blob\/trunk\/docs\/getting-started\/installation.md#using-jetpack-autoloader-highly-recommended\">https:\/\/github.com\/WordPress\/mcp-adapter\/blob\/trunk\/docs\/getting-started\/installation.md#using-jetpack-autoloader-highly-recommended<\/a><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">3) Initiera MCP Adapter<\/h3>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#24292e\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#e1e4e8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>if ( ! class_exists( WPMCPCoreMcpAdapter::class ) ) {\n    \/\/ Om MCP Adapter inte finns tillg\u00e4nglig: visa fel\/admin notice, eller avbryt.\n    return;\n}\n\n\/\/ Initialize MCP Adapter and its default server.\nWPMCPCoreMcpAdapter::instance();\n\n<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color:#24292e;color:#e1e4e8\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color:#F97583\">if<\/span><span style=\"color:#E1E4E8\"> ( <\/span><span style=\"color:#F97583\">!<\/span><span style=\"color:#79B8FF\"> class_exists<\/span><span style=\"color:#E1E4E8\">( <\/span><span style=\"color:#79B8FF\">WPMCPCoreMcpAdapter<\/span><span style=\"color:#F97583\">::class<\/span><span style=\"color:#E1E4E8\"> ) ) {<\/span><\/span>\n<span class=\"line\"><span style=\"color:#6A737D\">    \/\/ Om MCP Adapter inte finns tillg\u00e4nglig: visa fel\/admin notice, eller avbryt.<\/span><\/span>\n<span class=\"line\"><span style=\"color:#F97583\">    return<\/span><span style=\"color:#E1E4E8\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color:#E1E4E8\">}<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color:#6A737D\">\/\/ Initialize MCP Adapter and its default server.<\/span><\/span>\n<span class=\"line\"><span style=\"color:#79B8FF\">WPMCPCoreMcpAdapter<\/span><span style=\"color:#F97583\">::<\/span><span style=\"color:#B392F0\">instance<\/span><span style=\"color:#E1E4E8\">();<\/span><\/span>\n<span class=\"line\"><\/span><\/code><\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">4) Skapa en custom server via mcp_adapter_init<\/h3>\n\n\n\n<p>Hooka in p\u00e5 <code>mcp_adapter_init<\/code>. Callbacken f\u00e5r en adapter-instans, och du anv\u00e4nder <code>create_server()<\/code> f\u00f6r att definiera servern.<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#24292e\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#e1e4e8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>add_action( 'mcp_adapter_init', 'myplugin_create_custom_mcp_server' );\nfunction myplugin_create_custom_mcp_server( $adapter ) {\n    $adapter = WPMCPCoreMcpAdapter::instance();\n    $adapter-&gt;create_server(\n        'custom-mcp-server', \/\/ Unique server identifier.\n        'custom-mcp-server', \/\/ REST API namespace.\n        'mcp',               \/\/ REST API route.\n        'Custom MCP Server', \/\/ Server name.\n        'Custom MCP Server', \/\/ Server description.\n        'v1.0.0',            \/\/ Server version.\n        array(               \/\/ Transport methods.\n            WPMCPTransportHttpTransport::class,  \/\/ Recommended: MCP 2025-06-18 compliant.\n        ),\n        WPMCPInfrastructureErrorHandlingErrorLogMcpErrorHandler::class, \/\/ Error handler.\n        WPMCPInfrastructureObservabilityNullMcpObservabilityHandler::class, \/\/ Observability handler.\n        array( 'namespace\/ability-name' ), \/\/ Abilities to expose as tools\n        array(),                           \/\/ Resources (optional).\n        array(),                           \/\/ Prompts (optional).\n    );\n}\n\n<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color:#24292e;color:#e1e4e8\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color:#B392F0\">add_action<\/span><span style=\"color:#E1E4E8\">( <\/span><span style=\"color:#9ECBFF\">'mcp_adapter_init'<\/span><span style=\"color:#E1E4E8\">, <\/span><span style=\"color:#9ECBFF\">'myplugin_create_custom_mcp_server'<\/span><span style=\"color:#E1E4E8\"> );<\/span><\/span>\n<span class=\"line\"><span style=\"color:#F97583\">function<\/span><span style=\"color:#B392F0\"> myplugin_create_custom_mcp_server<\/span><span style=\"color:#E1E4E8\">( $adapter ) {<\/span><\/span>\n<span class=\"line\"><span style=\"color:#E1E4E8\">    $adapter <\/span><span style=\"color:#F97583\">=<\/span><span style=\"color:#79B8FF\"> WPMCPCoreMcpAdapter<\/span><span style=\"color:#F97583\">::<\/span><span style=\"color:#B392F0\">instance<\/span><span style=\"color:#E1E4E8\">();<\/span><\/span>\n<span class=\"line\"><span style=\"color:#E1E4E8\">    $adapter<\/span><span style=\"color:#F97583\">-><\/span><span style=\"color:#B392F0\">create_server<\/span><span style=\"color:#E1E4E8\">(<\/span><\/span>\n<span class=\"line\"><span style=\"color:#9ECBFF\">        'custom-mcp-server'<\/span><span style=\"color:#E1E4E8\">, <\/span><span style=\"color:#6A737D\">\/\/ Unique server identifier.<\/span><\/span>\n<span class=\"line\"><span style=\"color:#9ECBFF\">        'custom-mcp-server'<\/span><span style=\"color:#E1E4E8\">, <\/span><span style=\"color:#6A737D\">\/\/ REST API namespace.<\/span><\/span>\n<span class=\"line\"><span style=\"color:#9ECBFF\">        'mcp'<\/span><span style=\"color:#E1E4E8\">,               <\/span><span style=\"color:#6A737D\">\/\/ REST API route.<\/span><\/span>\n<span class=\"line\"><span style=\"color:#9ECBFF\">        'Custom MCP Server'<\/span><span style=\"color:#E1E4E8\">, <\/span><span style=\"color:#6A737D\">\/\/ Server name.<\/span><\/span>\n<span class=\"line\"><span style=\"color:#9ECBFF\">        'Custom MCP Server'<\/span><span style=\"color:#E1E4E8\">, <\/span><span style=\"color:#6A737D\">\/\/ Server description.<\/span><\/span>\n<span class=\"line\"><span style=\"color:#9ECBFF\">        'v1.0.0'<\/span><span style=\"color:#E1E4E8\">,            <\/span><span style=\"color:#6A737D\">\/\/ Server version.<\/span><\/span>\n<span class=\"line\"><span style=\"color:#79B8FF\">        array<\/span><span style=\"color:#E1E4E8\">(               <\/span><span style=\"color:#6A737D\">\/\/ Transport methods.<\/span><\/span>\n<span class=\"line\"><span style=\"color:#79B8FF\">            WPMCPTransportHttpTransport<\/span><span style=\"color:#F97583\">::class<\/span><span style=\"color:#E1E4E8\">,  <\/span><span style=\"color:#6A737D\">\/\/ Recommended: MCP 2025-06-18 compliant.<\/span><\/span>\n<span class=\"line\"><span style=\"color:#E1E4E8\">        ),<\/span><\/span>\n<span class=\"line\"><span style=\"color:#79B8FF\">        WPMCPInfrastructureErrorHandlingErrorLogMcpErrorHandler<\/span><span style=\"color:#F97583\">::class<\/span><span style=\"color:#E1E4E8\">, <\/span><span style=\"color:#6A737D\">\/\/ Error handler.<\/span><\/span>\n<span class=\"line\"><span style=\"color:#79B8FF\">        WPMCPInfrastructureObservabilityNullMcpObservabilityHandler<\/span><span style=\"color:#F97583\">::class<\/span><span style=\"color:#E1E4E8\">, <\/span><span style=\"color:#6A737D\">\/\/ Observability handler.<\/span><\/span>\n<span class=\"line\"><span style=\"color:#79B8FF\">        array<\/span><span style=\"color:#E1E4E8\">( <\/span><span style=\"color:#9ECBFF\">'namespace\/ability-name'<\/span><span style=\"color:#E1E4E8\"> ), <\/span><span style=\"color:#6A737D\">\/\/ Abilities to expose as tools<\/span><\/span>\n<span class=\"line\"><span style=\"color:#79B8FF\">        array<\/span><span style=\"color:#E1E4E8\">(),                           <\/span><span style=\"color:#6A737D\">\/\/ Resources (optional).<\/span><\/span>\n<span class=\"line\"><span style=\"color:#79B8FF\">        array<\/span><span style=\"color:#E1E4E8\">(),                           <\/span><span style=\"color:#6A737D\">\/\/ Prompts (optional).<\/span><\/span>\n<span class=\"line\"><span style=\"color:#E1E4E8\">    );<\/span><\/span>\n<span class=\"line\"><span style=\"color:#E1E4E8\">}<\/span><\/span>\n<span class=\"line\"><\/span><\/code><\/pre><\/div>\n\n\n\n<p>Parametrar att ha koll p\u00e5:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n\n<li>(1) Unikt server-ID \u2013 anv\u00e4nds n\u00e4r du startar servern via WP-CLI.<\/li>\n\n\n<li>(2) och (3) REST API namespace och route f\u00f6r servern.<\/li>\n\n\n<li>(4) och (5) Visningsnamn och beskrivning \u2013 syns i AI-klienter n\u00e4r de listar MCP-servrar.<\/li>\n\n\n<li>(6) Serverversion.<\/li>\n\n\n<li>(10) En array med ability-namn som ska exponeras som MCP tools (flera g\u00e5r bra).<\/li>\n\n\n<li>\u00d6vriga parametrar styr transport, error handling och observability. Du kan skriva egna handlers om du vill integrera med egna transport-\/logg-\/monitoringl\u00f6sningar.<\/li>\n\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Exempel: l\u00e4gg till en MCP-server i \u201cList All URLs\u201d<\/h2>\n\n\n\n<p>Ett konkret exempel \u00e4r att ta pluginet <strong>List All URLs<\/strong> och l\u00e4gga till en custom MCP-server som bara exponerar abilityn <code>list-all-urls\/urls<\/code> som tool. Repo: <a href=\"https:\/\/github.com\/wptrainingteam\/list-all-urls\">https:\/\/github.com\/wptrainingteam\/list-all-urls<\/a><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">F\u00f6rberedelser<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n\n<li>Avaktivera MCP Adapter-pluginet om du har det aktiverat (s\u00e5 att du tydligt testar Composer-varianten i pluginet).<\/li>\n\n\n<li>Klona repo:t i din WordPress-installations plugin-katalog.<\/li>\n\n<\/ul>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#24292e\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#e1e4e8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>cd wp-content\/plugins\ngit clone git@github.com:wptrainingteam\/list-all-urls.git\n\n<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color:#24292e;color:#e1e4e8\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color:#79B8FF\">cd<\/span><span style=\"color:#9ECBFF\"> wp-content\/plugins<\/span><\/span>\n<span class=\"line\"><span style=\"color:#B392F0\">git<\/span><span style=\"color:#9ECBFF\"> clone<\/span><span style=\"color:#9ECBFF\"> git@github.com:wptrainingteam\/list-all-urls.git<\/span><\/span>\n<span class=\"line\"><\/span><\/code><\/pre><\/div>\n\n\n\n<p>Byt till branchen som inneh\u00e5ller Abilities API-implementationen:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#24292e\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#e1e4e8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>cd list-all-urls\ngit checkout abilities\n\n<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color:#24292e;color:#e1e4e8\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color:#79B8FF\">cd<\/span><span style=\"color:#9ECBFF\"> list-all-urls<\/span><\/span>\n<span class=\"line\"><span style=\"color:#B392F0\">git<\/span><span style=\"color:#9ECBFF\"> checkout<\/span><span style=\"color:#9ECBFF\"> abilities<\/span><\/span>\n<span class=\"line\"><\/span><\/code><\/pre><\/div>\n\n\n\n<p>Installera dependencies:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#24292e\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#e1e4e8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>composer install\n\n<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color:#24292e;color:#e1e4e8\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color:#B392F0\">composer<\/span><span style=\"color:#9ECBFF\"> install<\/span><\/span>\n<span class=\"line\"><\/span><\/code><\/pre><\/div>\n\n\n\n<p>L\u00e4gg till mcp-adapter som dependency:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#24292e\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#e1e4e8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>composer require wordpress\/mcp-adapter\n\n<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color:#24292e;color:#e1e4e8\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color:#B392F0\">composer<\/span><span style=\"color:#9ECBFF\"> require<\/span><span style=\"color:#9ECBFF\"> wordpress\/mcp-adapter<\/span><\/span>\n<span class=\"line\"><\/span><\/code><\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Kod: initiera och skapa server i list-all-urls.php<\/h3>\n\n\n\n<p>\u00d6ppna huvudfilen <code>list-all-urls.php<\/code> och l\u00e4gg till f\u00f6ljande l\u00e4ngst ned:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#24292e\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#e1e4e8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>if ( ! class_exists( WPMCPCoreMcpAdapter::class ) ) {\n    return;\n}\n\n\/\/ Initialize MCP Adapter and its default server.\nWPMCPCoreMcpAdapter::instance();\n\nadd_action( 'mcp_adapter_init', 'list_all_urls_create_custom_mcp_server' );\n\/**\n * Create a custom MCP server for the List All URLs plugin.\n *\n * @param object $adapter WPMCPCoreMcpAdapter The MCP Adapter instance.\n * @return void\n *\/\nfunction list_all_urls_create_custom_mcp_server( $adapter ) {\n    $adapter = WPMCPCoreMcpAdapter::instance();\n    $adapter-&gt;create_server(\n        'list-all-urls-mcp-server',\n        'list-all-urls-mcp-server',\n        'mcp',\n        'List All URLS MCP Server',\n        'Custom MCP Server for the List All URLs plugin. Currently exposes only the list-all-urls\/urls ability as an MCP Tool.',\n        'v1.0.0',\n        array(\n            WPMCPTransportHttpTransport::class,\n        ),\n        WPMCPInfrastructureErrorHandlingErrorLogMcpErrorHandler::class,\n        WPMCPInfrastructureObservabilityNullMcpObservabilityHandler::class,\n        array( 'list-all-urls\/urls' ),\n    );\n}\n\n<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color:#24292e;color:#e1e4e8\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color:#F97583\">if<\/span><span style=\"color:#E1E4E8\"> ( <\/span><span style=\"color:#F97583\">!<\/span><span style=\"color:#79B8FF\"> class_exists<\/span><span style=\"color:#E1E4E8\">( <\/span><span style=\"color:#79B8FF\">WPMCPCoreMcpAdapter<\/span><span style=\"color:#F97583\">::class<\/span><span style=\"color:#E1E4E8\"> ) ) {<\/span><\/span>\n<span class=\"line\"><span style=\"color:#F97583\">    return<\/span><span style=\"color:#E1E4E8\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color:#E1E4E8\">}<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color:#6A737D\">\/\/ Initialize MCP Adapter and its default server.<\/span><\/span>\n<span class=\"line\"><span style=\"color:#79B8FF\">WPMCPCoreMcpAdapter<\/span><span style=\"color:#F97583\">::<\/span><span style=\"color:#B392F0\">instance<\/span><span style=\"color:#E1E4E8\">();<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color:#B392F0\">add_action<\/span><span style=\"color:#E1E4E8\">( <\/span><span style=\"color:#9ECBFF\">'mcp_adapter_init'<\/span><span style=\"color:#E1E4E8\">, <\/span><span style=\"color:#9ECBFF\">'list_all_urls_create_custom_mcp_server'<\/span><span style=\"color:#E1E4E8\"> );<\/span><\/span>\n<span class=\"line\"><span style=\"color:#6A737D\">\/**<\/span><\/span>\n<span class=\"line\"><span style=\"color:#6A737D\"> * Create a custom MCP server for the List All URLs plugin.<\/span><\/span>\n<span class=\"line\"><span style=\"color:#6A737D\"> *<\/span><\/span>\n<span class=\"line\"><span style=\"color:#6A737D\"> * <\/span><span style=\"color:#F97583\">@param<\/span><span style=\"color:#F97583\"> object<\/span><span style=\"color:#6A737D\"> $adapter WPMCPCoreMcpAdapter The MCP Adapter instance.<\/span><\/span>\n<span class=\"line\"><span style=\"color:#6A737D\"> * <\/span><span style=\"color:#F97583\">@return<\/span><span style=\"color:#F97583\"> void<\/span><\/span>\n<span class=\"line\"><span style=\"color:#6A737D\"> *\/<\/span><\/span>\n<span class=\"line\"><span style=\"color:#F97583\">function<\/span><span style=\"color:#B392F0\"> list_all_urls_create_custom_mcp_server<\/span><span style=\"color:#E1E4E8\">( $adapter ) {<\/span><\/span>\n<span class=\"line\"><span style=\"color:#E1E4E8\">    $adapter <\/span><span style=\"color:#F97583\">=<\/span><span style=\"color:#79B8FF\"> WPMCPCoreMcpAdapter<\/span><span style=\"color:#F97583\">::<\/span><span style=\"color:#B392F0\">instance<\/span><span style=\"color:#E1E4E8\">();<\/span><\/span>\n<span class=\"line\"><span style=\"color:#E1E4E8\">    $adapter<\/span><span style=\"color:#F97583\">-><\/span><span style=\"color:#B392F0\">create_server<\/span><span style=\"color:#E1E4E8\">(<\/span><\/span>\n<span class=\"line\"><span style=\"color:#9ECBFF\">        'list-all-urls-mcp-server'<\/span><span style=\"color:#E1E4E8\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color:#9ECBFF\">        'list-all-urls-mcp-server'<\/span><span style=\"color:#E1E4E8\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color:#9ECBFF\">        'mcp'<\/span><span style=\"color:#E1E4E8\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color:#9ECBFF\">        'List All URLS MCP Server'<\/span><span style=\"color:#E1E4E8\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color:#9ECBFF\">        'Custom MCP Server for the List All URLs plugin. Currently exposes only the list-all-urls\/urls ability as an MCP Tool.'<\/span><span style=\"color:#E1E4E8\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color:#9ECBFF\">        'v1.0.0'<\/span><span style=\"color:#E1E4E8\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color:#79B8FF\">        array<\/span><span style=\"color:#E1E4E8\">(<\/span><\/span>\n<span class=\"line\"><span style=\"color:#79B8FF\">            WPMCPTransportHttpTransport<\/span><span style=\"color:#F97583\">::class<\/span><span style=\"color:#E1E4E8\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color:#E1E4E8\">        ),<\/span><\/span>\n<span class=\"line\"><span style=\"color:#79B8FF\">        WPMCPInfrastructureErrorHandlingErrorLogMcpErrorHandler<\/span><span style=\"color:#F97583\">::class<\/span><span style=\"color:#E1E4E8\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color:#79B8FF\">        WPMCPInfrastructureObservabilityNullMcpObservabilityHandler<\/span><span style=\"color:#F97583\">::class<\/span><span style=\"color:#E1E4E8\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color:#79B8FF\">        array<\/span><span style=\"color:#E1E4E8\">( <\/span><span style=\"color:#9ECBFF\">'list-all-urls\/urls'<\/span><span style=\"color:#E1E4E8\"> ),<\/span><\/span>\n<span class=\"line\"><span style=\"color:#E1E4E8\">    );<\/span><\/span>\n<span class=\"line\"><span style=\"color:#E1E4E8\">}<\/span><\/span>\n<span class=\"line\"><\/span><\/code><\/pre><\/div>\n\n\n\n<p>H\u00e4r beh\u00f6ver du <em>inte<\/em> s\u00e4tta <code>meta.mcp.public<\/code> p\u00e5 <code>list-all-urls\/urls<\/code>, eftersom du explicit exponerar abilityn via din custom server.<\/p>\n\n\n\n<p>Aktivera sedan pluginet i WordPress admin.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Uppdatera AI-klientens MCP-konfig f\u00f6r att anv\u00e4nda custom servern<\/h3>\n\n\n\n<p>Uppdatera din MCP-konfiguration s\u00e5 att den pekar p\u00e5 den nya servern. H\u00e4r \u00e4r ett exempel f\u00f6r VS Code med b\u00e5de default-servern och den nya servern, b\u00e5da via STDIO:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#24292e\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#e1e4e8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>{\n  &quot;servers&quot;: {\n    &quot;wordpress-mcp-server&quot;: {\n      &quot;command&quot;: &quot;wp&quot;,\n      &quot;args&quot;: [\n        &quot;--path=\/Users\/jonathanbossenger\/Studio\/wordpress-mcp&quot;,\n        &quot;mcp-adapter&quot;,\n        &quot;serve&quot;,\n        &quot;--server=mcp-adapter-default-server&quot;,\n        &quot;--user=admin&quot;\n      ]\n    },\n    &quot;list-all-urls-mcp-server&quot;: {\n      &quot;command&quot;: &quot;wp&quot;,\n      &quot;args&quot;: [\n        &quot;--path=\/Users\/jonathanbossenger\/Studio\/wordpress-mcp&quot;,\n        &quot;mcp-adapter&quot;,\n        &quot;serve&quot;,\n        &quot;--server=list-all-urls-mcp-server&quot;,\n        &quot;--user=admin&quot;\n      ]\n    }\n  }\n}\n\n<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color:#24292e;color:#e1e4e8\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color:#E1E4E8\">{<\/span><\/span>\n<span class=\"line\"><span style=\"color:#79B8FF\">  \"servers\"<\/span><span style=\"color:#E1E4E8\">: {<\/span><\/span>\n<span class=\"line\"><span style=\"color:#79B8FF\">    \"wordpress-mcp-server\"<\/span><span style=\"color:#E1E4E8\">: {<\/span><\/span>\n<span class=\"line\"><span style=\"color:#79B8FF\">      \"command\"<\/span><span style=\"color:#E1E4E8\">: <\/span><span style=\"color:#9ECBFF\">\"wp\"<\/span><span style=\"color:#E1E4E8\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color:#79B8FF\">      \"args\"<\/span><span style=\"color:#E1E4E8\">: [<\/span><\/span>\n<span class=\"line\"><span style=\"color:#9ECBFF\">        \"--path=\/Users\/jonathanbossenger\/Studio\/wordpress-mcp\"<\/span><span style=\"color:#E1E4E8\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color:#9ECBFF\">        \"mcp-adapter\"<\/span><span style=\"color:#E1E4E8\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color:#9ECBFF\">        \"serve\"<\/span><span style=\"color:#E1E4E8\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color:#9ECBFF\">        \"--server=mcp-adapter-default-server\"<\/span><span style=\"color:#E1E4E8\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color:#9ECBFF\">        \"--user=admin\"<\/span><\/span>\n<span class=\"line\"><span style=\"color:#E1E4E8\">      ]<\/span><\/span>\n<span class=\"line\"><span style=\"color:#E1E4E8\">    },<\/span><\/span>\n<span class=\"line\"><span style=\"color:#79B8FF\">    \"list-all-urls-mcp-server\"<\/span><span style=\"color:#E1E4E8\">: {<\/span><\/span>\n<span class=\"line\"><span style=\"color:#79B8FF\">      \"command\"<\/span><span style=\"color:#E1E4E8\">: <\/span><span style=\"color:#9ECBFF\">\"wp\"<\/span><span style=\"color:#E1E4E8\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color:#79B8FF\">      \"args\"<\/span><span style=\"color:#E1E4E8\">: [<\/span><\/span>\n<span class=\"line\"><span style=\"color:#9ECBFF\">        \"--path=\/Users\/jonathanbossenger\/Studio\/wordpress-mcp\"<\/span><span style=\"color:#E1E4E8\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color:#9ECBFF\">        \"mcp-adapter\"<\/span><span style=\"color:#E1E4E8\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color:#9ECBFF\">        \"serve\"<\/span><span style=\"color:#E1E4E8\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color:#9ECBFF\">        \"--server=list-all-urls-mcp-server\"<\/span><span style=\"color:#E1E4E8\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color:#9ECBFF\">        \"--user=admin\"<\/span><\/span>\n<span class=\"line\"><span style=\"color:#E1E4E8\">      ]<\/span><\/span>\n<span class=\"line\"><span style=\"color:#E1E4E8\">    }<\/span><\/span>\n<span class=\"line\"><span style=\"color:#E1E4E8\">  }<\/span><\/span>\n<span class=\"line\"><span style=\"color:#E1E4E8\">}<\/span><\/span>\n<span class=\"line\"><\/span><\/code><\/pre><\/div>\n\n\n\n<p>Du kan ha flera MCP-servrar i samma AI-app, vilket g\u00f6r det enkelt att v\u00e4xla mellan olika sajter eller plugins som exponerar olika upps\u00e4ttningar abilities.<\/p>\n\n\n\n<p>N\u00e4r du \u00e4ndrat konfigurationen: starta om appen eller starta MCP-servern i appens UI (beroende p\u00e5 klient). D\u00e4refter kan du be AI:n \u201clista alla URL:er p\u00e5 min WordPress-sajt\u201d, och den kommer att anropa <code>list-all-urls-urls<\/code> via MCP Adapter.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"2560\" height=\"1631\" src=\"https:\/\/helloblog.io\/app\/uploads\/sites\/13\/2026\/02\/mcp-06-vscode-list-urls-scaled.png\" alt=\"VS Code: MCP tools anv\u00e4nds f\u00f6r att h\u00e4mta List All URLs-data\" class=\"wp-image-248\" srcset=\"https:\/\/helloblog.io\/app\/uploads\/sites\/13\/2026\/02\/mcp-06-vscode-list-urls-scaled.png 2560w, https:\/\/helloblog.io\/app\/uploads\/sites\/13\/2026\/02\/mcp-06-vscode-list-urls-300x191.png 300w, https:\/\/helloblog.io\/app\/uploads\/sites\/13\/2026\/02\/mcp-06-vscode-list-urls-1024x652.png 1024w, https:\/\/helloblog.io\/app\/uploads\/sites\/13\/2026\/02\/mcp-06-vscode-list-urls-768x489.png 768w, https:\/\/helloblog.io\/app\/uploads\/sites\/13\/2026\/02\/mcp-06-vscode-list-urls-1536x979.png 1536w, https:\/\/helloblog.io\/app\/uploads\/sites\/13\/2026\/02\/mcp-06-vscode-list-urls-2048x1305.png 2048w, https:\/\/helloblog.io\/app\/uploads\/sites\/13\/2026\/02\/mcp-06-vscode-list-urls-400x255.png 400w\" sizes=\"auto, (max-width: 2560px) 100vw, 2560px\" \/><figcaption class=\"wp-element-caption\"><em>Forr\u00e1s: developer.wordpress.org<\/em><\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">S\u00e4kerhet och best practices (viktigt p\u00e5 riktigt)<\/h2>\n\n\n\n<p>MCP-klienter agerar som <strong>inloggade WordPress-anv\u00e4ndare<\/strong>. Behandla d\u00e4rf\u00f6r MCP som en del av din applikations attackyta.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n\n<li><strong>Var noggrann med <code>permission_callback<\/code><\/strong>\nVarje ability ska kontrollera minsta n\u00f6dv\u00e4ndiga capability (<code>manage_options<\/code>, <code>edit_posts<\/code>, osv.). Undvik <code>__return_true<\/code> f\u00f6r destruktiva operationer som att radera inneh\u00e5ll.<\/li>\n\n\n<li><strong>Anv\u00e4nd dedikerade anv\u00e4ndare f\u00f6r MCP-access<\/strong>\nS\u00e4rskilt i produktion: skapa en specifik roll\/anv\u00e4ndare med begr\u00e4nsade r\u00e4ttigheter. Exponera inte kraftfulla abilities till AI-klienter som inte \u00e4r granskade.<\/li>\n\n\n<li><strong>F\u00f6redra read-only abilities f\u00f6r publika MCP-endpoints<\/strong>\nOm du exponerar HTTP-transport \u00f6ver internet, fokusera p\u00e5 read-only: diagnostik, rapporter, och l\u00e4saccess till inneh\u00e5ll.<\/li>\n\n\n<li><strong>Implementera egen autentisering vid behov<\/strong>\nStandard \u00e4r application passwords, men du kan implementera OAuth eller andra metoder f\u00f6r b\u00e4ttre s\u00e4kerhet.<\/li>\n\n\n<li><strong>\u00d6vervaka och logga anv\u00e4ndning<\/strong>\nAnv\u00e4nd egna error\/observability-handlers f\u00f6r att koppla in din loggning och monitoring.<\/li>\n\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Kom ig\u00e5ng idag: en minimal \u201chello AI\u201d-v\u00e4g<\/h2>\n\n\n\n<p>Vill du bara testa utan att bygga ett helt agentfl\u00f6de direkt? En minimal start f\u00f6r en WordPress-utvecklare \u00e4r:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n\n<li>Registrera en ability.<\/li>\n\n\n<li>Installera\/kr\u00e4v och initiera MCP Adapter.<\/li>\n\n\n<li>Koppla en MCP-aware AI-klient (t.ex. Claude Desktop eller Cursor).<\/li>\n\n<\/ul>\n\n\n\n<p>Har du redan plugins som anv\u00e4nder Abilities API blir MCP Adapter i praktiken en genv\u00e4g till <strong>AI-redo API:er<\/strong> med v\u00e4ldigt lite extra jobb. B\u00f6rja sm\u00e5tt: exponera ett f\u00e5tal icke-destruktiva, read-only abilities som MCP tools, testa lokalt, och skala upp n\u00e4r du k\u00e4nner dig trygg. Dokumentation som \u00e4r bra att ha n\u00e4ra: Abilities API: <a href=\"https:\/\/developer.wordpress.org\/apis\/abilities\/\">https:\/\/developer.wordpress.org\/apis\/abilities\/<\/a> och MCP Adapter-repot: <a href=\"https:\/\/github.com\/WordPress\/mcp-adapter\">https:\/\/github.com\/WordPress\/mcp-adapter<\/a><\/p>\n\n\n<div class=\"references-section\">\n                <h2>Referenser \/ K\u00e4llor<\/h2>\n                <ul class=\"references-list\"><li><a href=\"https:\/\/developer.wordpress.org\/news\/2026\/02\/from-abilities-to-ai-agents-introducing-the-wordpress-mcp-adapter\/\" target=\"_blank\" rel=\"noopener noreferrer\">From Abilities to AI Agents: Introducing the WordPress MCP Adapter<\/a><\/li><li><a href=\"https:\/\/make.wordpress.org\/core\/2025\/11\/10\/abilities-api-in-wordpress-6-9\/\" target=\"_blank\" rel=\"noopener noreferrer\">Abilities API in WordPress 6.9<\/a><\/li><li><a href=\"https:\/\/developer.wordpress.org\/news\/2025\/11\/introducing-the-wordpress-abilities-api\/\" target=\"_blank\" rel=\"noopener noreferrer\">Introducing the WordPress Abilities API<\/a><\/li><li><a href=\"https:\/\/make.wordpress.org\/ai\/2025\/07\/17\/mcp-adapter\/\" target=\"_blank\" rel=\"noopener noreferrer\">MCP Adapter<\/a><\/li><li><a href=\"https:\/\/make.wordpress.org\/ai\/2025\/07\/17\/ai-building-blocks\/\" target=\"_blank\" rel=\"noopener noreferrer\">AI Building Blocks for WordPress<\/a><\/li><li><a href=\"https:\/\/modelcontextprotocol.io\/docs\/getting-started\/intro\" target=\"_blank\" rel=\"noopener noreferrer\">Model Context Protocol (MCP) intro<\/a><\/li><li><a href=\"https:\/\/modelcontextprotocol.io\/docs\/learn\/architecture#primitives\" target=\"_blank\" rel=\"noopener noreferrer\">MCP primitives<\/a><\/li><li><a href=\"https:\/\/modelcontextprotocol.io\/docs\/learn\/architecture#transport-layer\" target=\"_blank\" rel=\"noopener noreferrer\">MCP transport layer<\/a><\/li><li><a href=\"https:\/\/wp-cli.org\/\" target=\"_blank\" rel=\"noopener noreferrer\">WP-CLI<\/a><\/li><li><a href=\"https:\/\/www.npmjs.com\/package\/@automattic\/mcp-wordpress-remote\" target=\"_blank\" rel=\"noopener noreferrer\">@automattic\/mcp-wordpress-remote<\/a><\/li><li><a href=\"https:\/\/github.com\/Automattic\/mcp-wordpress-remote\/blob\/trunk\/Docs\/troubleshooting.md\" target=\"_blank\" rel=\"noopener noreferrer\">mcp-wordpress-remote troubleshooting<\/a><\/li><li><a href=\"https:\/\/make.wordpress.org\/core\/2020\/11\/05\/application-passwords-integration-guide\/\" target=\"_blank\" rel=\"noopener noreferrer\">Application Passwords Integration Guide<\/a><\/li><li><a href=\"https:\/\/code.visualstudio.com\/docs\/copilot\/customization\/mcp-servers\" target=\"_blank\" rel=\"noopener noreferrer\">VS Code MCP servers documentation<\/a><\/li><li><a href=\"https:\/\/github.com\/WordPress\/mcp-adapter\" target=\"_blank\" rel=\"noopener noreferrer\">MCP Adapter repository<\/a><\/li><li><a href=\"https:\/\/github.com\/WordPress\/mcp-adapter\/blob\/trunk\/docs\/getting-started\/installation.md#using-jetpack-autoloader-highly-recommended\" target=\"_blank\" rel=\"noopener noreferrer\">Using Jetpack Autoloader (highly recommended)<\/a><\/li><li><a href=\"https:\/\/github.com\/wptrainingteam\/list-all-urls\" target=\"_blank\" rel=\"noopener noreferrer\">List All URLs plugin<\/a><\/li><\/ul>\n            <\/div>","protected":false},"excerpt":{"rendered":"<p>WordPress Abilities API g\u00f6r funktionalitet standardiserad och k\u00f6rbar. Med WordPress MCP Adapter kan AI-klienter som Claude Desktop, Cursor och VS Code uppt\u00e4cka och k\u00f6ra dina abilities som MCP tools \u2013 direkt mot din sajt.<\/p>\n","protected":false},"author":61,"featured_media":241,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[41,127,12],"class_list":["post-249","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-wordpress","tag-ai","tag-mcp","tag-plugins"],"_links":{"self":[{"href":"https:\/\/helloblog.io\/sv\/wp-json\/wp\/v2\/posts\/249","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/helloblog.io\/sv\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/helloblog.io\/sv\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/helloblog.io\/sv\/wp-json\/wp\/v2\/users\/61"}],"replies":[{"embeddable":true,"href":"https:\/\/helloblog.io\/sv\/wp-json\/wp\/v2\/comments?post=249"}],"version-history":[{"count":0,"href":"https:\/\/helloblog.io\/sv\/wp-json\/wp\/v2\/posts\/249\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/helloblog.io\/sv\/wp-json\/wp\/v2\/media\/241"}],"wp:attachment":[{"href":"https:\/\/helloblog.io\/sv\/wp-json\/wp\/v2\/media?parent=249"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/helloblog.io\/sv\/wp-json\/wp\/v2\/categories?post=249"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/helloblog.io\/sv\/wp-json\/wp\/v2\/tags?post=249"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}