{"id":240,"date":"2026-02-17T18:39:41","date_gmt":"2026-02-17T17:39:41","guid":{"rendered":"https:\/\/helloblog.io\/da\/wordpress-mcp-adapter-abilities-ai-klar-via-mcp\/"},"modified":"2026-02-17T18:39:41","modified_gmt":"2026-02-17T17:39:41","slug":"wordpress-mcp-adapter-abilities-ai-klar-via-mcp","status":"publish","type":"post","link":"https:\/\/helloblog.io\/da\/wordpress-mcp-adapter-abilities-ai-klar-via-mcp\/","title":{"rendered":"WordPress MCP Adapter: s\u00e5dan g\u00f8r Abilities dine plugins AI-klar via MCP"},"content":{"rendered":"\n<p>WordPress\u2019 Abilities API (introduceret i WordPress 6.9) er et af de mest sp\u00e6ndende skift i, hvordan vi som plugin-udviklere kan eksponere funktionalitet p\u00e5 en m\u00e5de, der er <strong>standardiseret, discoverable, typed og eksekverbar<\/strong>. Det er allerede nyttigt i klassiske integrationer (PHP\/JS\/REST) \u2013 men det bliver for alvor interessant, n\u00e5r man kobler det p\u00e5 AI-automation.<\/p>\n\n\n\n<p>Her kommer <strong>Model Context Protocol (MCP)<\/strong> ind i billedet. MCP handler om at give AI-modeller mere kontekst og sikre integrationspunkter, s\u00e5 en AI-klient kan l\u00e6se data og udf\u00f8re handlinger gennem veldefinerede \u201cprimitives\u201d. WordPress\u2019 svar p\u00e5 det er <strong>WordPress MCP Adapter<\/strong>: et officielt byggesten i initiativet <em>AI Building Blocks for WordPress<\/em>, der g\u00f8r det muligt for AI-v\u00e6rkt\u00f8jer at <strong>discover og eksekvere WordPress Abilities direkte<\/strong>.<\/p>\n\n\n\n<p>I denne artikel f\u00e5r du en praktisk gennemgang af, hvordan MCP Adapteren h\u00e6nger sammen med Abilities, hvordan du installerer den, hvordan du eksponerer Abilities som MCP tools, hvordan du forbinder popul\u00e6re AI-klienter (lokalt og remote), samt hvilke sikkerheds-overvejelser du b\u00f8r tage seri\u00f8st fra dag \u00e9t.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Hurtig opsummering: Abilities som fundamentet<\/h2>\n\n\n\n<p>Hvis du ikke har arbejdet med Abilities endnu, er kernen ret enkel: Abilities API giver WordPress en <strong>first-class, cross-context functional API<\/strong>, der standardiserer, hvordan Core og plugins fort\u00e6ller omverdenen, hvad de kan.<\/p>\n\n\n\n<p>En ability defineres \u00e9n gang med:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n\n<li>Et unikt navn (<code>namespace\/ability-name<\/code>)<\/li>\n\n\n<li>Et typed <strong>input schema<\/strong> og <strong>output schema<\/strong><\/li>\n\n\n<li>En <strong>permission_callback<\/strong>, der h\u00e5ndh\u00e6ver capabilities<\/li>\n\n\n<li>En <strong>execute_callback<\/strong>, der udf\u00f8rer den konkrete funktionalitet<\/li>\n\n<\/ul>\n\n\n\n<p>Det, der sker i <code>execute_callback<\/code>, kan i praksis v\u00e6re alt fra at hente data, opdatere posts, k\u00f8re diagnostik eller andre afgr\u00e6nsede units of work.<\/p>\n\n\n\n<p>N\u00e5r en ability er registreret, kan den b\u00e5de findes og eksekveres fra <strong>PHP<\/strong>, <strong>JavaScript<\/strong> og via <strong>REST API<\/strong>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">De tre Core Abilities i WordPress 6.9<\/h3>\n\n\n\n<p>WordPress 6.9 leverer tre default abilities, som er oplagte at bruge til at teste MCP Adapteren med:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n\n<li><code>core\/get-site-info<\/code>: Returnerer site-information konfigureret i WordPress. Som standard alle felter, eller en filtreret subset.<\/li>\n\n\n<li><code>core\/get-user-info<\/code>: Returnerer basale profildetaljer for den nuv\u00e6rende autentificerede bruger (til personalisering, auditing og access-aware adf\u00e6rd).<\/li>\n\n\n<li><code>core\/get-environment-info<\/code>: Returnerer runtime-kontekst til diagnostik og kompatibilitet (environment, PHP runtime, database server info, WordPress version).<\/li>\n\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Hvad er WordPress MCP Adapteren?<\/h2>\n\n\n\n<p><strong>WordPress MCP Adapter<\/strong> er en pakke, der adapterer Abilities registreret via Abilities API til de primitives, som MCP forst\u00e5r. Det g\u00f8r, at AI-agenter kan:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n\n<li>discover og eksekvere site-funktionalitet som <strong>MCP tools<\/strong><\/li>\n\n\n<li>l\u00e6se WordPress-data som <strong>MCP resources<\/strong><\/li>\n\n<\/ul>\n\n\n\n<p>I praksis betyder det: hvis din plugin-kode allerede registrerer Abilities, er du meget t\u00e6t p\u00e5 at lade en AI-agent bruge dem p\u00e5 en kontrolleret m\u00e5de.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">MCP-primitives: tools, resources og prompts<\/h3>\n\n\n\n<p>MCP organiserer integrationer i tre hovedkategorier:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n\n<li><strong>Tools<\/strong>: eksekverbare funktioner, som AI\u2019en kalder for at udf\u00f8re handlinger.<\/li>\n\n\n<li><strong>Resources<\/strong>: passive datakilder (fx filer eller database-r\u00e6kker), som AI\u2019en l\u00e6ser som kontekst.<\/li>\n\n\n<li><strong>Prompts<\/strong>: foruddefinerede templates, der guider specifikke workflows.<\/li>\n\n<\/ul>\n\n\n\n<p>I WordPress-sammenh\u00e6ng vil Abilities typisk blive eksponeret som <strong>tools<\/strong>, fordi de repr\u00e6senterer aktiv logik (hent data, opdater content, k\u00f8r diagnostik). Adapteren er dog fleksibel: hvis en Ability reelt bare leverer read-only data (fx en debug log eller statisk konfiguration), kan den ogs\u00e5 mappes til en <strong>resource<\/strong>, s\u00e5 AI\u2019en kan indl\u00e6se det som baggrundskontekst uden at \u201ckalde\u201d funktionen aktivt.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Installation: den hurtige vej (plugin)<\/h2>\n\n\n\n<p>Den hurtigste m\u00e5de at komme i gang er at installere MCP Adapteren som plugin via GitHub releases:<\/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\u00e5r plugin\u2019et er installeret og aktiveret, registrerer det en <strong>default MCP server<\/strong> med navnet <code>mcp-adapter-default-server<\/code>, samt tre custom 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 tre abilities bliver samtidig automatisk eksponeret 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>Det giver AI-agenter en \u201clagdelt\u201d m\u00e5de at arbejde p\u00e5: f\u00f8rst kan de discover, s\u00e5 kan de hente detaljer om en ability, og til sidst kan de eksekvere den.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">G\u00f8r Abilities tilg\u00e6ngelige p\u00e5 default-serveren (meta.mcp.public)<\/h2>\n\n\n\n<p>Som standard er Abilities <strong>ikke<\/strong> tilg\u00e6ngelige via MCP Adapterens default-server, medmindre du eksplicit markerer dem som offentlige for MCP-adgang. Det g\u00f8r du ved at tilf\u00f8je et <code>meta.mcp.public<\/code> flag i argumenterne, n\u00e5r du registrerer din ability via <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,  \/\/ Required for MCP default server access\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\">\/\/ Required for MCP default server access<\/span><\/span>\n<span class=\"line\"><span style=\"color:#E1E4E8\">    ),<\/span><\/span>\n<span class=\"line\"><span style=\"color:#E1E4E8\">)<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>For Core Abilities kan du ikke redigere registreringen direkte, men du kan hooke ind i filteret <code>wp_register_ability_args<\/code> og tilf\u00f8je flaget.<\/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\u00e5r det er p\u00e5 plads, kan AI-klienter forbinde til din WordPress-installation via MCP Adapteren og kalde Core Abilities gennem default-serverens MCP tools.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Forbind AI-applikationer til din WordPress MCP server<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Transport-lag: STDIO vs HTTP<\/h3>\n\n\n\n<p>MCP definerer to transport-mekanismer: <strong>STDIO<\/strong> og <strong>HTTP<\/strong>. Valget handler typisk om, hvor din WordPress-installation k\u00f8rer:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n\n<li><strong>STDIO<\/strong>: oplagt til lokale dev-milj\u00f8er. MCP Adapteren underst\u00f8tter det via <strong>WP-CLI<\/strong>, s\u00e5 du skal have WP-CLI installeret lokalt.<\/li>\n\n\n<li><strong>HTTP<\/strong>: oplagt til offentligt tilg\u00e6ngelige sites \u2013 eller hvis du ikke vil bruge STDIO. Her bruges en remote proxy: <code>@automattic\/mcp-wordpress-remote<\/code> via Node.js. Autentificering sker typisk via <strong>Application Passwords<\/strong> eller en custom OAuth-l\u00f8sning.<\/li>\n\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Minimums-konfiguration: STDIO (lokalt)<\/h3>\n\n\n\n<p>Ved STDIO er minimums-konfigurationen (i MCP-klientens server-definition) typisk:<\/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<\/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><\/code><\/pre><\/div>\n\n\n\n<p>Noter til felterne:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n\n<li>Servernavnet (<code>wordpress-mcp-server<\/code>) er valgfrit og kan v\u00e6re hvad som helst.<\/li>\n\n\n<li><code>command<\/code> er <code>wp<\/code> (WP-CLI).<\/li>\n\n\n<li><code>--path<\/code> peger p\u00e5 din WordPress-installation.<\/li>\n\n\n<li><code>mcp-adapter serve<\/code> starter MCP Adapter-serveren.<\/li>\n\n\n<li><code>--server<\/code> v\u00e6lger MCP server (her default-serveren).<\/li>\n\n\n<li><code>--user<\/code> angiver hvilken WordPress-bruger, der autentificeres som (ofte en admin i dev).<\/li>\n\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Minimums-konfiguration: HTTP (remote proxy)<\/h3>\n\n\n\n<p>Til HTTP transport bruges den remote proxy, der ligger som npm-pakke: <a href=\"https:\/\/www.npmjs.com\/package\/@automattic\/mcp-wordpress-remote\">https:\/\/www.npmjs.com\/package\/@automattic\/mcp-wordpress-remote<\/a>. Det kr\u00e6ver Node.js: <a href=\"https:\/\/nodejs.org\/en\">https:\/\/nodejs.org\/en<\/a><\/p>\n\n\n\n<p>Minimums-konfigurationen ser s\u00e5dan ud:<\/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<\/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><\/code><\/pre><\/div>\n\n\n\n<p>Noter:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n\n<li><code>command<\/code> er <code>npx<\/code> (k\u00f8rer Node.js packages).<\/li>\n\n\n<li><code>-y<\/code> accepterer automatisk installation af pakken.<\/li>\n\n\n<li><code>WP_API_URL<\/code> peger p\u00e5 MCP endpointet p\u00e5 dit site.<\/li>\n\n\n<li><code>WP_API_USERNAME<\/code> og <code>WP_API_PASSWORD<\/code> bruges til autentificering (typisk Application Passwords).<\/li>\n\n<\/ul>\n\n\n\n<p>Hvis du forbinder til en lokal WordPress over HTTP via remote proxy, er der fejls\u00f8gningsnoter her (ofte handler det om flere Node-versioner eller lokale SSL-certifikater): <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<h2 class=\"wp-block-heading\">App-specifik ops\u00e6tning (Claude Desktop, Cursor, Claude Code, VS Code)<\/h2>\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\">V\u00e6rdier i eksempler<\/h4>\n\n\n<p>Eksemplerne her bruger en Studio-installation i <code>\/Users\/jonathanbossenger\/Studio\/wordpress-mcp<\/code> med URL <code>http:\/\/localhost:8885\/<\/code> og admin-brugeren <code>admin<\/code>. Udskift med dine egne v\u00e6rdier.<\/p>\n\n<\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Claude Desktop<\/h3>\n\n\n\n<p>I Claude Desktop finder du MCP-konfigurationen under <strong>Developer<\/strong> fanen (Claude \u2192 Settings \u2192 Developer). Under Local MCP servers v\u00e6lger du <strong>Edit config<\/strong>. Det \u00e5bner <code>claude_desktop_config.json<\/code>, hvor MCP servers defineres i et <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<\/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><\/code><\/pre><\/div>\n\n\n\n<p>STDIO-ops\u00e6tning:<\/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<\/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><\/code><\/pre><\/div>\n\n\n\n<p>HTTP-ops\u00e6tning:<\/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<\/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><\/code><\/pre><\/div>\n\n\n\n<p>Efter du har gemt filen, skal Claude Desktop genstartes, fordi den kun l\u00e6ser MCP server-konfiguration ved startup.<\/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\/14\/2026\/02\/mcp-02-claude-mcp-server-scaled.png\" alt=\"Claude Desktop viser WordPress MCP server som running under Local MCP servers\" class=\"wp-image-237\" srcset=\"https:\/\/helloblog.io\/app\/uploads\/sites\/14\/2026\/02\/mcp-02-claude-mcp-server-scaled.png 2560w, https:\/\/helloblog.io\/app\/uploads\/sites\/14\/2026\/02\/mcp-02-claude-mcp-server-300x201.png 300w, https:\/\/helloblog.io\/app\/uploads\/sites\/14\/2026\/02\/mcp-02-claude-mcp-server-1024x684.png 1024w, https:\/\/helloblog.io\/app\/uploads\/sites\/14\/2026\/02\/mcp-02-claude-mcp-server-768x513.png 768w, https:\/\/helloblog.io\/app\/uploads\/sites\/14\/2026\/02\/mcp-02-claude-mcp-server-1536x1027.png 1536w, https:\/\/helloblog.io\/app\/uploads\/sites\/14\/2026\/02\/mcp-02-claude-mcp-server-2048x1369.png 2048w, https:\/\/helloblog.io\/app\/uploads\/sites\/14\/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<h3 class=\"wp-block-heading\">Cursor<\/h3>\n\n\n\n<p>I Cursor g\u00e5r du til Settings (Cursor \u2192 Settings \u2192 Cursor Settings) og v\u00e6lger sektionen <strong>Tools and MCP<\/strong>.<\/p>\n\n\n\n<p>Klik p\u00e5 <strong>Add Custom MCP<\/strong>, som \u00e5bner Cursors <code>mcp.json<\/code>. Formatet er det samme som i Claude Desktop, og n\u00e5r du har gemt, kan du g\u00e5 tilbage til Tools and MCP og aktivere serveren til dine coding sessions.<\/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\/14\/2026\/02\/mcp-05-cursor-mcp-scaled.png\" alt=\"Cursor Tools &#038; MCP settings panel med WordPress MCP Server tilf\u00f8jet\" class=\"wp-image-238\" srcset=\"https:\/\/helloblog.io\/app\/uploads\/sites\/14\/2026\/02\/mcp-05-cursor-mcp-scaled.png 2560w, https:\/\/helloblog.io\/app\/uploads\/sites\/14\/2026\/02\/mcp-05-cursor-mcp-300x188.png 300w, https:\/\/helloblog.io\/app\/uploads\/sites\/14\/2026\/02\/mcp-05-cursor-mcp-1024x641.png 1024w, https:\/\/helloblog.io\/app\/uploads\/sites\/14\/2026\/02\/mcp-05-cursor-mcp-768x481.png 768w, https:\/\/helloblog.io\/app\/uploads\/sites\/14\/2026\/02\/mcp-05-cursor-mcp-1536x962.png 1536w, https:\/\/helloblog.io\/app\/uploads\/sites\/14\/2026\/02\/mcp-05-cursor-mcp-2048x1283.png 2048w, https:\/\/helloblog.io\/app\/uploads\/sites\/14\/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<h3 class=\"wp-block-heading\">Claude Code<\/h3>\n\n\n\n<p>I Claude Code kan du enten:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n\n<li>tilf\u00f8je <code>mcpServers<\/code> med dine server-configs i <code>.claude.json<\/code> i din home directory (globalt)<\/li>\n\n\n<li>eller oprette en <code>.mcp.json<\/code> i projektmappen (projektspecifikt)<\/li>\n\n<\/ul>\n\n\n\n<p>Formatet for server-definitionerne kan v\u00e6re det samme som i Cursor\/Claude Desktop.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">VS Code<\/h3>\n\n\n\n<p>I VS Code ops\u00e6tter du MCP servers via en JSON-konfigfil (typisk <code>mcp.json<\/code>) i en <code>.vscode<\/code>-mappe i workspace. VS Code beskriver formatet her: <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<p>Den v\u00e6sentlige forskel er, at VS Code bruger et <code>servers<\/code>-objekt (ikke <code>mcpServers<\/code>). Resten er samme struktur:<\/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<\/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><\/code><\/pre><\/div>\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\/14\/2026\/02\/mcp-06-vscode-scaled.png\" alt=\"VS Code mcp.json med MCP-konfiguration for WordPress MCP server\" class=\"wp-image-239\" srcset=\"https:\/\/helloblog.io\/app\/uploads\/sites\/14\/2026\/02\/mcp-06-vscode-scaled.png 2560w, https:\/\/helloblog.io\/app\/uploads\/sites\/14\/2026\/02\/mcp-06-vscode-300x191.png 300w, https:\/\/helloblog.io\/app\/uploads\/sites\/14\/2026\/02\/mcp-06-vscode-1024x652.png 1024w, https:\/\/helloblog.io\/app\/uploads\/sites\/14\/2026\/02\/mcp-06-vscode-768x489.png 768w, https:\/\/helloblog.io\/app\/uploads\/sites\/14\/2026\/02\/mcp-06-vscode-1536x979.png 1536w, https:\/\/helloblog.io\/app\/uploads\/sites\/14\/2026\/02\/mcp-06-vscode-2048x1305.png 2048w, https:\/\/helloblog.io\/app\/uploads\/sites\/14\/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<p>N\u00e5r filen findes i workspace, viser VS Code en MCP-kontroltoolbar, hvor du kan starte\/stoppe\/restarte serveren. N\u00e5r serveren k\u00f8rer korrekt, vises ogs\u00e5 hvor mange tools AI\u2019en har adgang til (i eksemplet: tre).<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Brug MCP tools i praksis<\/h2>\n\n\n\n<p>N\u00e5r din AI-klient er forbundet til MCP serveren, kan du begynde at bruge tools eksponeret af MCP Adapteren.<\/p>\n\n\n\n<p>Et simpelt eksempel i Claude Desktop er at bede om: \u201cGet the site info from my WordPress site\u201d.<\/p>\n\n\n\n<p>Typisk flow i klienten:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n\n<li>AI\u2019en ser, at der findes en MCP server og kalder <code>mcp-adapter-discover-abilities<\/code> for at se, hvilke Abilities der er tilg\u00e6ngelige.<\/li>\n\n\n<li>Den vurderer, at <code>core\/get-site-info<\/code> matcher opgaven.<\/li>\n\n\n<li>Den kalder <code>mcp-adapter-execute-ability<\/code> og sender ability-navnet <code>core\/get-site-info<\/code> som input.<\/li>\n\n\n<li>WordPress returnerer data, og klienten pr\u00e6senterer det som et svar.<\/li>\n\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Custom MCP server i dit plugin (Composer-vej)<\/h2>\n\n\n\n<p>Default-serveren d\u00e6kker meget, men i plugins kan det v\u00e6re en fordel at lave en <strong>custom MCP server<\/strong>, s\u00e5 du styrer pr\u00e6cist, hvilke Abilities der eksponeres som MCP tools (og evt. resources\/prompts).<\/p>\n\n\n\n<p>Det kr\u00e6ver, at du installerer MCP Adapteren som dependency via Composer og registrerer din egen server.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">1) Installer pakken<\/h3>\n\n\n\n<p>K\u00f8r i din plugin-mappe:<\/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<\/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><\/code><\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">2) Load Composer autoloader<\/h3>\n\n\n\n<p>I dit main plugin-file:<\/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 ( file_exists( __DIR__ . '\/vendor\/autoload.php' ) ) {\n    require_once __DIR__ . '\/vendor\/autoload.php';\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><\/code><\/pre><\/div>\n\n\n\n<p>Hvis flere plugins p\u00e5 samme site kan afh\u00e6nge af MCP Adapteren eller Abilities API, anbefales det at bruge Jetpack Autoloader for at undg\u00e5 version-konflikter. (Se dokumentationen her: <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) Initialis\u00e9r MCP Adapteren<\/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    \/\/ check if the MCP Adapter class is available, if not show some sort of error or admin notice\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\">    \/\/ check if the MCP Adapter class is available, if not show some sort of error or admin notice<\/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) Opret og registr\u00e9r en custom server (mcp_adapter_init)<\/h3>\n\n\n\n<p>Du hooker ind i <code>mcp_adapter_init<\/code>. Callbacken f\u00e5r en adapter-reference, og du bruger <code>create_server()<\/code> til at definere konfigurationen:<\/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>De parametre, der typisk betyder mest i praksis:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n\n<li>(1) Unikt server-id: bruges n\u00e5r du starter serveren via WP-CLI.<\/li>\n\n\n<li>(2) + (3) REST API namespace og route: bestemmer MCP endpointets URL.<\/li>\n\n\n<li>(4) + (5) Navn og beskrivelse: vises i AI-applikationer, n\u00e5r de lister MCP servers.<\/li>\n\n\n<li>(6) Version for serveren.<\/li>\n\n\n<li>(10) Liste over ability-navne, der skal eksponeres som MCP tools (du kan have flere).<\/li>\n\n\n<li>Transport, error handling og observability handlers kan v\u00e6re standard \u2013 eller du kan implementere dine egne til eksisterende transport\/logging\/monitoring-stack.<\/li>\n\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Eksempel: tilf\u00f8j en MCP server til \u201cList All URLs\u201d<\/h2>\n\n\n\n<p>Et konkret eksempel er at udvide plugin\u2019et <strong>List All URLs<\/strong> med en custom MCP server, der eksponerer ability\u2019en <code>list-all-urls\/urls<\/code> som MCP tool.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">0) Forberedelse<\/h3>\n\n\n\n<p>Hvis du har MCP Adapter plugin\u2019et aktiveret, s\u00e5 deaktiv\u00e9r det f\u00f8rst (i dette eksempel bruges Composer-varianten i plugin\u2019et selv).<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">1) Clone repo\u2019et ind i plugins-mappen<\/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>cd wp-content\/plugins\ngit clone git@github.com:wptrainingteam\/list-all-urls.git\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><\/code><\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">2) Skift til branch med Abilities-implementeringen<\/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>cd list-all-urls\ngit checkout abilities\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><\/code><\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">3) Installer dependencies<\/h3>\n\n\n\n<p>Plugin\u2019et bruger allerede Composer, s\u00e5 install\u00e9r f\u00f8rst:<\/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<\/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><\/code><\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">4) Tilf\u00f8j mcp-adapter pakken<\/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>composer require wordpress\/mcp-adapter\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><\/code><\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">5) Initialis\u00e9r MCP Adapter og opret custom server i list-all-urls.php<\/h3>\n\n\n\n<p>\u00c5bn <code>list-all-urls.php<\/code> og tilf\u00f8j dette nederst i filen:<\/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>Vigtigt: her beh\u00f8ver du <strong>ikke<\/strong> s\u00e6tte <code>meta.mcp.public<\/code> p\u00e5 <code>list-all-urls\/urls<\/code>, fordi den bliver eksponeret direkte via din custom server-konfiguration.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">6) Aktiv\u00e9r plugin\u2019et og opdat\u00e9r MCP-konfiguration i din AI-klient<\/h3>\n\n\n\n<p>Aktiv\u00e9r List All URLs fra WordPress admin. Opdat\u00e9r derefter din AI-klients MCP-konfiguration til ogs\u00e5 at starte den nye server.<\/p>\n\n\n\n<p>Her er et VS Code eksempel med <strong>b\u00e5de<\/strong> default-serveren og den nye plugin-server, begge 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<\/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><\/code><\/pre><\/div>\n\n\n\n<p>Det er helt legitimt at have flere MCP servers i samme AI-applikation \u2013 fx for at skifte mellem forskellige sites eller plugins, der eksponerer forskellige Abilities.<\/p>\n\n\n\n<p>Husk at genstarte applikationen eller starte MCP serveren fra UI\u2019et efter \u00e6ndringer. N\u00e5r den nye server er synlig, kan du bede AI\u2019en om at \u201cList all URLs on my WordPress site\u201d, og den vil kalde tool\u2019et <code>list-all-urls-urls<\/code> via MCP Adapteren.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Sikkerhed og best practices<\/h2>\n\n\n\n<p>MCP-klienter agerer som <strong>loggede WordPress-brugere<\/strong>. Det betyder, at du b\u00f8r betragte dem som en reel del af din applikations angrebsflade. Her er de centrale best practices:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n\n<li><strong>Brug <code>permission_callback<\/code> med omtanke<\/strong><\/li>\n\n\n<li>Hver ability b\u00f8r tjekke den mindst n\u00f8dvendige capability (<code>manage_options<\/code>, <code>edit_posts<\/code>, osv.).<\/li>\n\n\n<li>Undg\u00e5 <code>__return_true<\/code> for destruktive operationer som fx sletning af content.<\/li>\n\n\n<li><strong>Brug dedikerede brugere til MCP-adgang<\/strong><\/li>\n\n\n<li>S\u00e6rligt i produktion: opret en specifik rolle\/bruger med begr\u00e6nsede capabilities.<\/li>\n\n\n<li>Ekspon\u00e9r ikke kraftfulde abilities til AI-klienter, du ikke har auditeret.<\/li>\n\n\n<li><strong>Foretr\u00e6k read-only abilities til public MCP endpoints<\/strong><\/li>\n\n\n<li>Hvis du eksponerer HTTP transport over internettet, s\u00e5 fokus\u00e9r p\u00e5 read-only diagnostik, rapportering og content access.<\/li>\n\n\n<li><strong>Implement\u00e9r custom autentificering hvis n\u00f8dvendigt<\/strong><\/li>\n\n\n<li>Standard-setup bruger application passwords, men OAuth eller andre metoder kan give bedre sikkerhed.<\/li>\n\n\n<li><strong>Overv\u00e5g og log forbrug<\/strong><\/li>\n\n\n<li>Brug custom error- og observability-handlers til at koble p\u00e5 din egen logging\/monitoring-stack.<\/li>\n\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">WordPress.com vs self-hosted: samme byggeklodser, forskellig auth<\/h2>\n\n\n\n<p>Der er et interessant overlap mellem WordPress.com og self-hosted: MCP tools p\u00e5 WordPress.com er drevet af den samme <strong>Abilities API<\/strong> og <strong>MCP Adapter<\/strong>, s\u00e5 id\u00e9en om at registrere capabilities \u00e9n gang og f\u00e5 dem til at fungere p\u00e5 tv\u00e6rs er teoretisk mulig. Den st\u00f8rste forskel lige nu ligger i autentificering: WordPress.com bruger OAuth 2.1 (se: <a href=\"https:\/\/wordpress.com\/blog\/2026\/01\/22\/connect-ai-agents-to-wordpress-oauth-2-1\/\">https:\/\/wordpress.com\/blog\/2026\/01\/22\/connect-ai-agents-to-wordpress-oauth-2-1\/<\/a>), mens self-hosted typisk m\u00e5 l\u00e6ne sig op ad JWT tokens eller Application Passwords, indtil en mere standard OAuth-l\u00f8sning er tilg\u00e6ngelig i praksis.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">S\u00e5dan kommer du i gang med at eksperimentere i dag<\/h2>\n\n\n\n<p>En minimalistisk \u201chello AI\u201d-vej som WordPress-udvikler kan koges ned til:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n\n<li>Registr\u00e9r en ability (med skemaer, <code>permission_callback<\/code>, <code>execute_callback<\/code>).<\/li>\n\n\n<li>Install\u00e9r MCP Adapter (som plugin eller via Composer), og initialis\u00e9r den.<\/li>\n\n\n<li>Ekspon\u00e9r ability\u2019en: enten via <code>meta.mcp.public<\/code> p\u00e5 default-serveren eller ved at oprette en custom MCP server, der eksplicit lister den.<\/li>\n\n\n<li>Forbind en MCP-aware AI-klient (Claude Desktop, Cursor, VS Code, Claude Code) via STDIO eller HTTP.<\/li>\n\n<\/ul>\n\n\n\n<p>Hvis du allerede har plugins, der bruger Abilities API, kan MCP Adapteren g\u00f8re dem til <strong>AI-ready API\u2019er<\/strong> med overraskende lidt ekstra arbejde. Start sm\u00e5t: ekspon\u00e9r et par ikke-destruktive, read-only Abilities som tools, test lokalt, og udvid gradvist, n\u00e5r du har styr p\u00e5 permissions, logging og driftsrisiko.<\/p>\n\n\n\n<p>Dokumentation, der er v\u00e6rd at have \u00e5bent undervejs:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n\n<li>Abilities API: <a href=\"https:\/\/developer.wordpress.org\/apis\/abilities\/\">https:\/\/developer.wordpress.org\/apis\/abilities\/<\/a><\/li>\n\n\n<li>MCP Adapter repo: <a href=\"https:\/\/github.com\/WordPress\/mcp-adapter\">https:\/\/github.com\/WordPress\/mcp-adapter<\/a><\/li>\n\n<\/ul>\n\n\n<div class=\"references-section\">\n                <h2>Referencer \/ Kilder<\/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:\/\/modelcontextprotocol.io\/docs\/getting-started\/intro\" target=\"_blank\" rel=\"noopener noreferrer\">Model Context Protocol &#8211; Intro<\/a><\/li><li><a href=\"https:\/\/modelcontextprotocol.io\/docs\/learn\/architecture#primitives\" target=\"_blank\" rel=\"noopener noreferrer\">Model Context Protocol &#8211; Architecture (Primitives &amp; Transport)<\/a><\/li><li><a href=\"https:\/\/modelcontextprotocol.io\/docs\/learn\/architecture#transport-layer\" target=\"_blank\" rel=\"noopener noreferrer\">Model Context Protocol &#8211; Transport layer<\/a><\/li><li><a href=\"https:\/\/make.wordpress.org\/ai\/2025\/07\/17\/mcp-adapter\/\" target=\"_blank\" rel=\"noopener noreferrer\">MCP Adapter (Make WordPress AI)<\/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:\/\/github.com\/WordPress\/mcp-adapter\" target=\"_blank\" rel=\"noopener noreferrer\">wordpress\/mcp-adapter<\/a><\/li><li><a href=\"https:\/\/github.com\/WordPress\/mcp-adapter\/releases\" target=\"_blank\" rel=\"noopener noreferrer\">MCP Adapter releases<\/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:\/\/wp-cli.org\/\" target=\"_blank\" rel=\"noopener noreferrer\">WP-CLI<\/a><\/li><li><a href=\"https:\/\/nodejs.org\/en\" target=\"_blank\" rel=\"noopener noreferrer\">Node.js<\/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 configuration<\/a><\/li><li><a href=\"https:\/\/github.com\/wptrainingteam\/list-all-urls\" target=\"_blank\" rel=\"noopener noreferrer\">List All URLs plugin<\/a><\/li><li><a href=\"https:\/\/engineering.block.xyz\/blog\/build-mcp-tools-like-ogres-with-layers\" target=\"_blank\" rel=\"noopener noreferrer\">Build MCP tools like ogres with layers<\/a><\/li><li><a href=\"https:\/\/wordpress.com\/blog\/2026\/01\/22\/connect-ai-agents-to-wordpress-oauth-2-1\/\" target=\"_blank\" rel=\"noopener noreferrer\">Connect AI agents to WordPress (OAuth 2.1)<\/a><\/li><\/ul>\n            <\/div>","protected":false},"excerpt":{"rendered":"<p>WordPress Abilities API giver dig typed, discoverable og eksekverbar funktionalitet. Med MCP Adapteren kan AI-klienter som Claude, Cursor og VS Code finde og kalde dine Abilities som MCP tools.<\/p>\n","protected":false},"author":65,"featured_media":236,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[22],"tags":[29,47,12,10],"class_list":["post-240","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-wordpress-okosystem","tag-ai","tag-api","tag-plugins","tag-wordpress"],"_links":{"self":[{"href":"https:\/\/helloblog.io\/da\/wp-json\/wp\/v2\/posts\/240","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/helloblog.io\/da\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/helloblog.io\/da\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/helloblog.io\/da\/wp-json\/wp\/v2\/users\/65"}],"replies":[{"embeddable":true,"href":"https:\/\/helloblog.io\/da\/wp-json\/wp\/v2\/comments?post=240"}],"version-history":[{"count":0,"href":"https:\/\/helloblog.io\/da\/wp-json\/wp\/v2\/posts\/240\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/helloblog.io\/da\/wp-json\/wp\/v2\/media\/236"}],"wp:attachment":[{"href":"https:\/\/helloblog.io\/da\/wp-json\/wp\/v2\/media?parent=240"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/helloblog.io\/da\/wp-json\/wp\/v2\/categories?post=240"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/helloblog.io\/da\/wp-json\/wp\/v2\/tags?post=240"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}