{"id":240,"date":"2026-02-17T18:38:31","date_gmt":"2026-02-17T17:38:31","guid":{"rendered":"https:\/\/helloblog.io\/it\/dal-abilities-api-agli-ai-agent-wordpress-mcp-adapter\/"},"modified":"2026-02-17T18:38:31","modified_gmt":"2026-02-17T17:38:31","slug":"dal-abilities-api-agli-ai-agent-wordpress-mcp-adapter","status":"publish","type":"post","link":"https:\/\/helloblog.io\/it\/dal-abilities-api-agli-ai-agent-wordpress-mcp-adapter\/","title":{"rendered":"Dal\u2019Abilities API agli AI agent: come usare il WordPress MCP Adapter (con esempi reali)"},"content":{"rendered":"\n<p>Con WordPress 6.9 \u00e8 arrivata l\u2019<strong>Abilities API<\/strong>, un modo coerente e \u201cmachine-friendly\u201d per dichiarare cosa sa fare un sito (core o plugin) tramite funzioni <strong>standardizzate, scopribili, tipizzate ed eseguibili<\/strong>. Il passo successivo, per chi sta lavorando su automazioni e agent, \u00e8 naturale: esporre quelle Abilities a strumenti di AI in modo sicuro e controllabile.<\/p>\n\n\n\n<p>Qui entra in gioco il <strong>WordPress MCP Adapter<\/strong>, un pacchetto ufficiale dell\u2019iniziativa <em>AI Building Blocks for WordPress<\/em> che implementa il <strong>Model Context Protocol (MCP)<\/strong> nel perimetro di un sito WordPress. Tradotto in pratica: un client compatibile MCP (Claude Desktop, Claude Code, Cursor, VS Code) pu\u00f2 <strong>scoprire e chiamare<\/strong> le Abilities del tuo sito come se fossero <strong>MCP tools<\/strong>, e in alcuni casi leggere dati come <strong>MCP resources<\/strong>.<\/p>\n\n\n\n<p>In questa guida trovi: installazione del MCP Adapter, come rendere disponibili le Abilities al server di default, come collegare i principali client AI con trasporti STDIO\/HTTP, come usare i tool, come creare server MCP custom per un plugin, un esempio completo con \u201cList All URLs\u201d, e una checklist di sicurezza.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Ripasso veloce: perch\u00e9 Abilities \u00e8 la base giusta<\/h2>\n\n\n\n<p>L\u2019<strong>Abilities API<\/strong> d\u00e0 a WordPress una API funzionale \u201cdi prima classe\u201d e cross-context: la stessa Ability \u00e8 <strong>scopribile ed eseguibile<\/strong> da PHP, JavaScript e REST API, con input\/output definiti e permessi espliciti.<\/p>\n\n\n\n<p>Una Ability la registri una volta con:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n\n<li>Un nome univoco nel formato <code>namespace\/ability-name<\/code><\/li>\n\n\n<li>Uno <strong>schema tipizzato<\/strong> per input e output (input schema e output schema)<\/li>\n\n\n<li>Una <code>permission_callback<\/code> per applicare capability e vincoli<\/li>\n\n\n<li>Una <code>execute_callback<\/code> che esegue davvero l\u2019azione (fetch dati, update post, diagnostica, ecc.)<\/li>\n\n<\/ul>\n\n\n\n<p>WordPress 6.9 include gi\u00e0 3 Abilities di core, utili anche solo per fare prove con MCP:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n\n<li><code>core\/get-site-info<\/code>: ritorna le informazioni del sito configurate in WordPress (tutti i campi o un sottoinsieme).<\/li>\n\n\n<li><code>core\/get-user-info<\/code>: ritorna dettagli base del profilo dell\u2019utente autenticato corrente, utile per personalizzazione\/audit\/comportamenti \u201caccess-aware\u201d.<\/li>\n\n\n<li><code>core\/get-environment-info<\/code>: ritorna dettagli del contesto runtime (ambiente, runtime PHP, info DB server, versione WordPress) per diagnostica e compatibilit\u00e0.<\/li>\n\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Cos\u2019\u00e8 il WordPress MCP Adapter<\/h2>\n\n\n\n<p>Il <strong>WordPress MCP Adapter<\/strong> fa da \u201cponte\u201d tra Abilities e MCP: adatta le Abilities (registrate tramite Abilities API) nelle primitive supportate dal <strong>Model Context Protocol<\/strong> cos\u00ec che un agent possa:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n\n<li>Scoprire ed eseguire funzionalit\u00e0 del sito come <strong>MCP tools<\/strong><\/li>\n\n\n<li>Leggere dati WordPress come <strong>MCP resources<\/strong> quando ha senso esporli in modo passivo<\/li>\n\n<\/ul>\n\n\n\n<p>In altre parole: se il tuo plugin registra gi\u00e0 Abilities, sei molto vicino a renderle utilizzabili da un agent AI, senza inventarti una nuova API proprietaria.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Primer MCP: tools, resources, prompts<\/h3>\n\n\n\n<p>MCP organizza l\u2019interazione in tre primitive:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n\n<li><strong>Tools<\/strong>: funzioni eseguibili chiamate dall\u2019AI per compiere azioni.<\/li>\n\n\n<li><strong>Resources<\/strong>: fonti dati passive (file, righe DB, ecc.) che l\u2019AI legge come contesto.<\/li>\n\n\n<li><strong>Prompts<\/strong>: template preconfigurati per guidare workflow specifici.<\/li>\n\n<\/ul>\n\n\n\n<p>Con il MCP Adapter, la scelta pi\u00f9 comune \u00e8 esporre le Abilities come <strong>tools<\/strong>, perch\u00e9 spesso incarnano logica eseguibile (lettura dati, update contenuti, diagnostica). Per\u00f2 l\u2019adapter \u00e8 flessibile: una Ability puramente read-only che fornisce dati \u201cstatici\u201d (ad esempio un log di debug o una configurazione del sito) pu\u00f2 essere configurata come <strong>resource<\/strong>, cos\u00ec l\u2019AI la usa come contesto senza \u201cinvocarla\u201d come azione.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Installare il MCP Adapter (via plugin)<\/h2>\n\n\n\n<p>Il percorso pi\u00f9 rapido per iniziare \u00e8 installarlo come plugin scaricandolo dalla pagina delle release su GitHub: <a href=\"https:\/\/github.com\/WordPress\/mcp-adapter\/releases\">https:\/\/github.com\/WordPress\/mcp-adapter\/releases<\/a>.<\/p>\n\n\n\n<p>Una volta installato e attivato, il plugin registra:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n\n<li>Un <strong>server MCP di default<\/strong> chiamato <code>mcp-adapter-default-server<\/code><\/li>\n\n\n<li>Tre Abilities custom dell\u2019adapter: <code>mcp-adapter\/discover-abilities<\/code>, <code>mcp-adapter\/get-ability-info<\/code>, <code>mcp-adapter\/execute-ability<\/code><\/li>\n\n\n<li>Le stesse esposte automaticamente come MCP tools: <code>mcp-adapter-discover-abilities<\/code>, <code>mcp-adapter-get-ability-info<\/code>, <code>mcp-adapter-execute-ability<\/code><\/li>\n\n<\/ul>\n\n\n\n<p>Questi tre tool permettono un accesso \u201ca strati\u201d alle Abilities: prima l\u2019agent <strong>scopre<\/strong> cosa \u00e8 disponibile, poi <strong>legge i dettagli<\/strong> di una Ability, infine la <strong>esegue<\/strong>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Rendere disponibili le Abilities al server di default<\/h2>\n\n\n\n<p>Per impostazione predefinita, una Ability \u00e8 disponibile via server di default del MCP Adapter <strong>solo<\/strong> se la marchi esplicitamente come pubblica per l\u2019accesso MCP. Il flag da aggiungere durante la registrazione con <code>wp_register_ability()<\/code> \u00e8 <code>meta.mcp.public<\/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>Per le Abilities di core (che ovviamente non registri tu), puoi intervenire con il filtro <code>wp_register_ability_args<\/code> e \u201carricchire\u201d gli argomenti di registrazione aggiungendo quel flag.<\/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\t\/\/ Enable MCP access for the three current core abilities.\n\t$core_abilities = array(\n\t\t'core\/get-site-info',\n\t\t'core\/get-user-info',\n\t\t'core\/get-environment-info',\n\t);\n\tif ( in_array( $ability_name, $core_abilities, true ) ) {\n\t\t$args['meta']['mcp']['public'] = true;\n\t}\n\n\treturn $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\">\t\/\/ Enable MCP access for the three current core abilities.<\/span><\/span>\n<span class=\"line\"><span style=\"color:#E1E4E8\">\t$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\">\t\t'core\/get-site-info'<\/span><span style=\"color:#E1E4E8\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color:#9ECBFF\">\t\t'core\/get-user-info'<\/span><span style=\"color:#E1E4E8\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color:#9ECBFF\">\t\t'core\/get-environment-info'<\/span><span style=\"color:#E1E4E8\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color:#E1E4E8\">\t);<\/span><\/span>\n<span class=\"line\"><span style=\"color:#F97583\">\tif<\/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\">\t\t$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\">\t}<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color:#F97583\">\treturn<\/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>A questo punto puoi collegare un client AI al tuo WordPress \u201cMCP-enabled\u201d e chiamare quelle Abilities passando dal server di default e dai tool dell\u2019adapter.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Collegare applicazioni AI: STDIO vs HTTP<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Metodi di trasporto<\/h3>\n\n\n\n<p>Per parlare con un sito WordPress esposto come server MCP esistono due meccanismi di trasporto (transport layer): <strong>STDIO<\/strong> e <strong>HTTP<\/strong>. La scelta dipende quasi sempre da dove gira il sito.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n\n<li><strong>STDIO<\/strong>: ideale in locale, soprattutto in ambienti di sviluppo. Nel caso del MCP Adapter, passa da <strong>WP-CLI<\/strong> (quindi WP-CLI deve essere installato localmente).<\/li>\n\n\n<li><strong>HTTP<\/strong>: tipico per installazioni raggiungibili pubblicamente, o quando non vuoi\/puoi usare STDIO. In questo caso puoi usare un proxy remoto basato su Node.js: <code>@automattic\/mcp-wordpress-remote<\/code>.<\/li>\n\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Configurazione minima per STDIO (WP-CLI)<\/h3>\n\n\n\n<p>Per un ambiente WordPress locale, la configurazione minima in stile MCP \u00e8 questa:<\/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>Dettagli importanti:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n\n<li><code>wordpress-mcp-server<\/code> \u00e8 un nome a tua scelta (identificatore del server nella configurazione del client).<\/li>\n\n\n<li><code>command<\/code> \u00e8 <code>wp<\/code> (il binario di WP-CLI).<\/li>\n\n\n<li>In <code>args<\/code>: <code>--path<\/code> punta alla directory di installazione WordPress; <code>mcp-adapter serve<\/code> avvia il server; <code>--server<\/code> sceglie quale server MCP usare (qui il default); <code>--user<\/code> definisce l\u2019utente WordPress con cui autenticare le chiamate (es. admin).<\/li>\n\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Configurazione minima per HTTP (proxy Node.js)<\/h3>\n\n\n\n<p>Per un\u2019installazione pubblica (o semplicemente per evitare STDIO), puoi impostare HTTP usando il proxy <code>@automattic\/mcp-wordpress-remote<\/code> (serve Node.js). L\u2019autenticazione pu\u00f2 avvenire con <strong>application passwords<\/strong> WordPress, oppure con una implementazione OAuth custom.<\/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>Note pratiche:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n\n<li><code>command<\/code> \u00e8 <code>npx<\/code> (esegue pacchetti Node).<\/li>\n\n\n<li>In <code>args<\/code>, <code>-y<\/code> accetta automaticamente l\u2019installazione e <code>@automattic\/mcp-wordpress-remote@latest<\/code> usa l\u2019ultima versione del proxy.<\/li>\n\n\n<li>In <code>env<\/code>, <code>WP_API_URL<\/code> punta all\u2019endpoint MCP del sito, mentre username e application password definiscono l\u2019identit\u00e0 WordPress con cui il client agir\u00e0.<\/li>\n\n<\/ul>\n\n\n\n<p>Se stai usando HTTP proxy verso un WordPress locale, il progetto <code>mcp-wordpress-remote<\/code> include anche una pagina di troubleshooting: <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>. I problemi pi\u00f9 frequenti in questi casi sono legati a pi\u00f9 versioni di Node installate o a certificati SSL locali.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Dove si configura l\u2019MCP server nei client pi\u00f9 usati<\/h2>\n\n\n\n<p>Qui sotto trovi i punti esatti dell\u2019interfaccia dove inserire la configurazione MCP in Claude Desktop, Cursor, Claude Code e VS Code. Il formato della configurazione \u00e8 sostanzialmente lo stesso: cambiano soprattutto nome del file e (nel caso di VS Code) la chiave root (<code>servers<\/code> invece di <code>mcpServers<\/code>).<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Claude Desktop<\/h3>\n\n\n\n<p>In Claude Desktop vai nella sezione Developer (Claude \u2192 Settings \u2192 Developer). Sotto \u201cLocal MCP servers\u201d clicca <strong>Edit config<\/strong>: si aprir\u00e0 il file <code>claude_desktop_config.json<\/code>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"2560\" height=\"1711\" src=\"https:\/\/helloblog.io\/app\/uploads\/sites\/6\/2026\/02\/mcp-01-claude-developer-settings-scaled.png\" alt=\"Pannello Developer Settings di Claude Desktop\" class=\"wp-image-238\" srcset=\"https:\/\/helloblog.io\/app\/uploads\/sites\/6\/2026\/02\/mcp-01-claude-developer-settings-scaled.png 2560w, https:\/\/helloblog.io\/app\/uploads\/sites\/6\/2026\/02\/mcp-01-claude-developer-settings-300x201.png 300w, https:\/\/helloblog.io\/app\/uploads\/sites\/6\/2026\/02\/mcp-01-claude-developer-settings-1024x684.png 1024w, https:\/\/helloblog.io\/app\/uploads\/sites\/6\/2026\/02\/mcp-01-claude-developer-settings-768x513.png 768w, https:\/\/helloblog.io\/app\/uploads\/sites\/6\/2026\/02\/mcp-01-claude-developer-settings-1536x1027.png 1536w, https:\/\/helloblog.io\/app\/uploads\/sites\/6\/2026\/02\/mcp-01-claude-developer-settings-2048x1369.png 2048w, https:\/\/helloblog.io\/app\/uploads\/sites\/6\/2026\/02\/mcp-01-claude-developer-settings-400x267.png 400w\" sizes=\"auto, (max-width: 2560px) 100vw, 2560px\" \/><figcaption class=\"wp-element-caption\">. \u2014 <em>Forr\u00e1s: developer.wordpress.org<\/em><\/figcaption><\/figure>\n\n\n\n<p>I server MCP si definiscono dentro l\u2019oggetto <code>mcpServers<\/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>{\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>Ecco un esempio completo con trasporto 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;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>E lo stesso con trasporto HTTP:<\/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>Dopo aver salvato il file, <strong>riavvia Claude Desktop<\/strong>: legge la configurazione dei server MCP solo all\u2019avvio. Quando tutto \u00e8 ok, nella tab Developer vedrai il server con stato <code>running<\/code> e potrai usarlo nelle conversazioni.<\/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\/6\/2026\/02\/mcp-02-claude-mcp-server-scaled.png\" alt=\"Claude Desktop con WordPress MCP server aggiunto tra i Local MCP servers\" class=\"wp-image-239\" srcset=\"https:\/\/helloblog.io\/app\/uploads\/sites\/6\/2026\/02\/mcp-02-claude-mcp-server-scaled.png 2560w, https:\/\/helloblog.io\/app\/uploads\/sites\/6\/2026\/02\/mcp-02-claude-mcp-server-300x201.png 300w, https:\/\/helloblog.io\/app\/uploads\/sites\/6\/2026\/02\/mcp-02-claude-mcp-server-1024x684.png 1024w, https:\/\/helloblog.io\/app\/uploads\/sites\/6\/2026\/02\/mcp-02-claude-mcp-server-768x513.png 768w, https:\/\/helloblog.io\/app\/uploads\/sites\/6\/2026\/02\/mcp-02-claude-mcp-server-1536x1027.png 1536w, https:\/\/helloblog.io\/app\/uploads\/sites\/6\/2026\/02\/mcp-02-claude-mcp-server-2048x1369.png 2048w, https:\/\/helloblog.io\/app\/uploads\/sites\/6\/2026\/02\/mcp-02-claude-mcp-server-400x267.png 400w\" sizes=\"auto, (max-width: 2560px) 100vw, 2560px\" \/><figcaption class=\"wp-element-caption\">. \u2014 <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>In Cursor vai in Settings (Cursor \u2192 Settings \u2192 Cursor Settings) e apri la sezione <strong>Tools and MCP<\/strong>.<\/p>\n\n\n\n<p>Clicca <strong>Add Custom MCP<\/strong>: Cursor aprir\u00e0 il file <code>mcp.json<\/code>. Il formato della configurazione \u00e8 lo stesso di Claude Desktop. Dopo il salvataggio, torna in Tools and MCP: vedrai il server in lista e potrai abilitarlo per le sessioni di coding.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Claude Code<\/h3>\n\n\n\n<p>Con Claude Code puoi aggiungere i server MCP in due modi:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n\n<li>Inserendo un oggetto <code>mcpServers<\/code> con le configurazioni dentro il file <code>.claude.json<\/code> nella tua home directory (config globale).<\/li>\n\n\n<li>Creando un file <code>.mcp.json<\/code> nella directory del progetto (config per-progetto, utile se vuoi server diversi a seconda del repository).<\/li>\n\n<\/ul>\n\n\n\n<p>In entrambi i casi, puoi usare lo stesso formato visto per Cursor\/Claude Desktop.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">VS Code<\/h3>\n\n\n\n<p>In VS Code la configurazione dei server MCP avviene tramite un file JSON tipicamente chiamato <code>mcp.json<\/code>, da mettere in <code>.vscode<\/code> dentro il workspace. Il dettaglio che cambia \u00e8 che i server stanno dentro l\u2019oggetto <code>servers<\/code> (non <code>mcpServers<\/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>{\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<p>Una volta presente il file, VS Code mostra una toolbar di controllo MCP per avviare\/fermare\/riavviare il server. Quando parte correttamente, ti mostra anche quanti tool sono disponibili (nel caso base dell\u2019adapter: tre).<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Usare i MCP tools: esempio end-to-end<\/h2>\n\n\n\n<p>Una volta connesso il server MCP nel client che preferisci, puoi iniziare a usare i tool esposti dal MCP Adapter. Un esempio semplice in Claude Desktop: chiedi qualcosa come \u201cRecupera le informazioni del sito dal mio WordPress\u201d.<\/p>\n\n\n\n<p>Il flusso tipico \u00e8:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n\n<li>Il client identifica che esiste un MCP server collegato.<\/li>\n\n\n<li>Chiama <code>mcp-adapter-discover-abilities<\/code> per capire quali Abilities sono disponibili.<\/li>\n\n\n<li>Seleziona l\u2019Ability corretta (es. <code>core\/get-site-info<\/code>).<\/li>\n\n\n<li>Chiama <code>mcp-adapter-execute-ability<\/code> passando il nome dell\u2019Ability.<\/li>\n\n\n<li>Riceve i dati e li presenta come risposta (site info).<\/li>\n\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Quando ha senso creare un MCP server custom per un plugin<\/h2>\n\n\n\n<p>Il server di default dell\u2019adapter copre molti casi, ma un <strong>server MCP custom<\/strong> nel tuo plugin ti d\u00e0 pi\u00f9 controllo su come e cosa esporre. Per farlo, l\u2019approccio consigliato \u00e8 installare il pacchetto via Composer e registrare il server nel lifecycle del plugin.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">1) Installare via Composer<\/h3>\n\n\n\n<p>Dalla directory del plugin:<\/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) Caricare l\u2019autoloader di Composer<\/h3>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#24292e\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#e1e4e8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>if ( file_exists( __DIR__ . '\/vendor\/autoload.php' ) ) {\n    require_once __DIR__ . '\/vendor\/autoload.php';\n}\n<\/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>Se \u00e8 realistico che pi\u00f9 plugin nello stesso sito dipendano da MCP Adapter o Abilities API, la documentazione ufficiale raccomanda di usare Jetpack Autoloader per evitare conflitti di versione: <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) Inizializzare l\u2019MCP Adapter<\/h3>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#24292e\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#e1e4e8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>if ( ! class_exists( WPMCPCoreMcpAdapter::class ) ) {\n    \/\/ 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) Registrare un server custom con mcp_adapter_init<\/h3>\n\n\n\n<p>Agganciati all\u2019action <code>mcp_adapter_init<\/code>. La callback riceve l\u2019istanza dell\u2019adapter; poi chiami <code>create_server()<\/code> con configurazione, trasporti, handler e lista di Abilities esposte.<\/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>Parametri da non confondere:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n\n<li>1\u00b0 parametro: identificatore univoco del server (serve anche quando lo avvii via WP-CLI).<\/li>\n\n\n<li>2\u00b0 e 3\u00b0 parametro: namespace e route REST API del server MCP.<\/li>\n\n\n<li>4\u00b0 e 5\u00b0 parametro: nome e descrizione mostrati nei client AI quando elencano i server disponibili.<\/li>\n\n\n<li>6\u00b0 parametro: versione del server.<\/li>\n\n\n<li>10\u00b0 parametro: array dei nomi delle Abilities che vuoi esporre come MCP tools (anche pi\u00f9 di una).<\/li>\n\n\n<li>Gli altri parametri controllano trasporti, error handling e observability. In esempio: HTTP transport, error log e handler di osservabilit\u00e0 \u201cnull\u201d, ma puoi implementare handler custom per integrare transport\/logging\/monitoring proprietari.<\/li>\n\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Esempio completo: aggiungere un server MCP custom a \u201cList All URLs\u201d<\/h2>\n\n\n\n<p>Per vedere un caso concreto, prendiamo il plugin <strong>List All URLs<\/strong>: <a href=\"https:\/\/github.com\/wptrainingteam\/list-all-urls\">https:\/\/github.com\/wptrainingteam\/list-all-urls<\/a>. L\u2019obiettivo \u00e8 esporre la sua Ability <code>list-all-urls\/urls<\/code> come MCP tool tramite un server custom del plugin.<\/p>\n\n\n\n<div class=\"wp-block-group callout callout-warning is-style-warning 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\">Prima di iniziare<\/h4>\n\n\n<p>Se hai attivo il plugin \u201cMCP Adapter\u201d installato come plugin WordPress, disattivalo prima di procedere con l\u2019esempio: qui usiamo l\u2019adapter come dipendenza del plugin via Composer.<\/p>\n\n<\/div>\n\n\n\n<h3 class=\"wp-block-heading\">1) Clonare il repository nella directory plugins<\/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) Passare al branch con Abilities API<\/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) Installare le dipendenze<\/h3>\n\n\n\n<p>Il plugin usa gi\u00e0 Composer, quindi:<\/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) Aggiungere la dipendenza wordpress\/mcp-adapter<\/h3>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#24292e\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#e1e4e8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>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) Modificare list-all-urls.php: init adapter + create_server()<\/h3>\n\n\n\n<p>Apri <code>list-all-urls.php<\/code> e aggiungi in fondo questo codice per inizializzare l\u2019adapter e registrare un server MCP custom che espone solo <code>list-all-urls\/urls<\/code> come tool.<\/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>Dettaglio utile: qui <strong>non<\/strong> serve impostare <code>meta.mcp.public<\/code> sull\u2019Ability <code>list-all-urls\/urls<\/code>, perch\u00e9 la stai esponendo esplicitamente tramite server custom.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">6) Attivare il plugin e aggiornare la configurazione nel client AI<\/h3>\n\n\n\n<p>Dopo aver attivato \u201cList All URLs\u201d da wp-admin, aggiorna la configurazione del tuo client AI per usare anche il nuovo server. Ecco un esempio di <code>mcp.json<\/code> per VS Code che include sia il server di default sia quello custom, entrambi in 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>\u00c8 perfettamente possibile configurare pi\u00f9 server MCP nello stesso client: utile per passare tra siti diversi o tra set di Abilities esposte da plugin differenti. Dopo l\u2019aggiornamento ricordati di <strong>riavviare<\/strong> l\u2019app o (dove supportato) avviare il server MCP dal controllo integrato.<\/p>\n\n\n\n<p>A questo punto puoi chiedere all\u2019AI qualcosa come \u201cElenca tutti gli URL del mio sito WordPress\u201d e il client chiamer\u00e0 il tool <code>list-all-urls-urls<\/code> tramite MCP Adapter.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Sicurezza e best practice (da applicare sempre)<\/h2>\n\n\n\n<p>Un punto da tenere sempre presente: i client MCP agiscono come <strong>utenti WordPress autenticati<\/strong>. Quindi vanno trattati come parte della tua superficie applicativa.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n\n<li><strong>Usa <code>permission_callback<\/code> con attenzione<\/strong>: ogni Ability deve verificare la capability minima necessaria (<code>manage_options<\/code>, <code>edit_posts<\/code>, ecc.).<\/li>\n\n\n<li>Evita <code>__return_true<\/code> per operazioni distruttive (ad esempio cancellazioni o modifiche irreversibili).<\/li>\n\n\n<li><strong>Usa utenti dedicati per accesso MCP<\/strong>: soprattutto in produzione, crea un utente\/ruolo specifico con capability limitate.<\/li>\n\n\n<li>Non esporre Abilities potenti a client AI non verificati\/auditati.<\/li>\n\n\n<li><strong>Preferisci Abilities read-only per endpoint MCP pubblici<\/strong>: se esponi HTTP su internet, concentrati su diagnostica, reportistica e accesso contenuti in sola lettura.<\/li>\n\n\n<li><strong>Implementa autenticazione custom se serve<\/strong>: di default puoi usare application passwords, ma puoi adottare OAuth o altri metodi per alzare il livello di sicurezza.<\/li>\n\n\n<li><strong>Monitora e fai logging dell\u2019uso<\/strong>: valuta handler custom di error\/observability per integrare logging e monitoring nel tuo stack.<\/li>\n\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Come iniziare a sperimentare subito (per davvero)<\/h2>\n\n\n\n<p>Il percorso minimo \u201chello AI\u201d per uno sviluppatore WordPress \u00e8 lineare:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n\n<li>Registra una Ability (anche banale e read-only).<\/li>\n\n\n<li>Aggiungi MCP Adapter (plugin o Composer) e inizializzalo.<\/li>\n\n\n<li>Collega un client compatibile MCP (Claude Desktop, Cursor, VS Code, Claude Code) via STDIO o HTTP.<\/li>\n\n\n<li>Prova a far chiamare il tool dall\u2019AI e controlla permessi\/risposte\/log.<\/li>\n\n<\/ol>\n\n\n\n<p>Se hai gi\u00e0 plugin basati su Abilities API, il MCP Adapter pu\u00f2 trasformarli rapidamente in <strong>API pronte per agent AI<\/strong>, con uno sforzo aggiuntivo minimo. Il consiglio operativo \u00e8 partire piccolo: poche Abilities non distruttive, test in locale, e poi espansione graduale a workflow pi\u00f9 complessi.<\/p>\n\n\n\n<p>Documentazione utile: Abilities API <a href=\"https:\/\/developer.wordpress.org\/apis\/abilities\/\">https:\/\/developer.wordpress.org\/apis\/abilities\/<\/a> e repository MCP Adapter <a href=\"https:\/\/github.com\/WordPress\/mcp-adapter\">https:\/\/github.com\/WordPress\/mcp-adapter<\/a>.<\/p>\n\n\n<div class=\"references-section\">\n                <h2>Riferimenti \/ Fonti<\/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; Introduction<\/a><\/li><li><a href=\"https:\/\/modelcontextprotocol.io\/docs\/learn\/architecture#primitives\" target=\"_blank\" rel=\"noopener noreferrer\">Model Context Protocol &#8211; Architecture (Primitives, Transport Layer)<\/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<\/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:\/\/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:\/\/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 customization<\/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:\/\/github.com\/WordPress\/mcp-adapter\/blob\/trunk\/docs\/getting-started\/installation.md#using-jetpack-autoloader-highly-recommended\" target=\"_blank\" rel=\"noopener noreferrer\">Using Jetpack Autoloader (highly recommended)<\/a><\/li><\/ul>\n            <\/div>","protected":false},"excerpt":{"rendered":"<p>WordPress sta mettendo in fila i mattoni giusti per l\u2019automazione con AI: Abilities API per definire funzioni standard e il MCP Adapter per renderle utilizzabili dagli agent. Vediamo installazione, configurazioni per i client MCP pi\u00f9 usati e best practice di sicurezza.<\/p>\n","protected":false},"author":18,"featured_media":237,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[26,46,117,10],"class_list":["post-240","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ecosistema-wordpress","tag-ai","tag-api","tag-plugins","tag-wordpress"],"_links":{"self":[{"href":"https:\/\/helloblog.io\/it\/wp-json\/wp\/v2\/posts\/240","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/helloblog.io\/it\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/helloblog.io\/it\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/helloblog.io\/it\/wp-json\/wp\/v2\/users\/18"}],"replies":[{"embeddable":true,"href":"https:\/\/helloblog.io\/it\/wp-json\/wp\/v2\/comments?post=240"}],"version-history":[{"count":0,"href":"https:\/\/helloblog.io\/it\/wp-json\/wp\/v2\/posts\/240\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/helloblog.io\/it\/wp-json\/wp\/v2\/media\/237"}],"wp:attachment":[{"href":"https:\/\/helloblog.io\/it\/wp-json\/wp\/v2\/media?parent=240"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/helloblog.io\/it\/wp-json\/wp\/v2\/categories?post=240"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/helloblog.io\/it\/wp-json\/wp\/v2\/tags?post=240"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}