{"id":261,"date":"2026-02-17T18:40:16","date_gmt":"2026-02-17T17:40:16","guid":{"rendered":"https:\/\/helloblog.io\/fr\/wordpress-mcp-adapter-abilities-agents-ia-mcp\/"},"modified":"2026-02-17T18:40:16","modified_gmt":"2026-02-17T17:40:16","slug":"wordpress-mcp-adapter-abilities-agents-ia-mcp","status":"publish","type":"post","link":"https:\/\/helloblog.io\/fr\/wordpress-mcp-adapter-abilities-agents-ia-mcp\/","title":{"rendered":"WordPress MCP Adapter : brancher tes Abilities \u00e0 des agents IA via le Model Context Protocol"},"content":{"rendered":"\n<p>Depuis WordPress 6.9, l\u2019<strong>Abilities API<\/strong> change la donne : on peut enregistrer des capacit\u00e9s applicatives (des \u201cunit\u00e9s de travail\u201d) de fa\u00e7on <strong>standardis\u00e9e, d\u00e9couvrable, typ\u00e9e et ex\u00e9cutable<\/strong>. Ce n\u2019est pas qu\u2019une nouvelle API sympa pour les devs : c\u2019est aussi un socle tr\u00e8s concret pour l\u2019automatisation et les workflows IA sur WordPress.<\/p>\n\n\n\n<p>Dans le monde des agents IA, un mouvement important ces derniers mois est le <strong>Model Context Protocol (MCP)<\/strong> : un protocole qui permet \u00e0 un client IA d\u2019aller chercher du contexte et d\u2019ex\u00e9cuter des actions via des \u201cprimitives\u201d communes. Dit autrement : au lieu de bricoler des int\u00e9grations ad hoc, tu exposes des fonctions et des ressources d\u2019une mani\u00e8re que les outils IA savent comprendre.<\/p>\n\n\n\n<p>C\u00f4t\u00e9 WordPress, il existe d\u00e9sormais un composant officiel pour faire le pont : le <strong>WordPress MCP Adapter<\/strong>. Son objectif est simple : prendre les Abilities d\u00e9j\u00e0 enregistr\u00e9es via l\u2019Abilities API et les \u201cadapter\u201d en primitives MCP, afin que des applications IA puissent <strong>d\u00e9couvrir<\/strong> et <strong>appeler<\/strong> ces fonctionnalit\u00e9s comme des <strong>MCP tools<\/strong> (et, dans certains cas, lire des donn\u00e9es comme des <strong>MCP resources<\/strong>).<\/p>\n\n\n\n<p>Dans cet article, on va voir : (1) le rappel indispensable sur les Abilities, (2) ce que fait exactement l\u2019adapter MCP, (3) comment l\u2019installer et activer l\u2019acc\u00e8s MCP, (4) comment connecter Claude Desktop, Cursor, Claude Code et VS Code, (5) comment cr\u00e9er un serveur MCP personnalis\u00e9 dans ton plugin, (6) un exemple complet avec \u201cList All URLs\u201d, et (7) les bonnes pratiques s\u00e9curit\u00e9.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Rappel express : Abilities API, la fondation<\/h2>\n\n\n\n<p>L\u2019Abilities API apporte \u00e0 WordPress une <strong>API fonctionnelle de premier rang<\/strong>, utilisable \u201ccross-context\u201d (PHP, JavaScript, REST API), avec un format commun pour d\u00e9crire ce que le core ou les extensions savent faire.<\/p>\n\n\n\n<p>Une Ability se d\u00e9finit une seule fois avec :<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n\n<li>Un nom unique (<code>namespace\/ability-name<\/code>).<\/li>\n\n\n<li>Un <strong>sch\u00e9ma d\u2019entr\u00e9e<\/strong> et un <strong>sch\u00e9ma de sortie<\/strong> typ\u00e9s (input\/output schema).<\/li>\n\n\n<li>Un <code>permission_callback<\/code> qui applique des r\u00e8gles d\u2019acc\u00e8s (capabilities).<\/li>\n\n\n<li>Un <code>execute_callback<\/code> qui ex\u00e9cute l\u2019action r\u00e9elle.<\/li>\n\n<\/ul>\n\n\n\n<p>Le code d\u00e9clench\u00e9 dans <code>execute_callback<\/code> peut \u00eatre tr\u00e8s vari\u00e9 : lecture de donn\u00e9es, mise \u00e0 jour de contenus, diagnostics, etc. Une fois enregistr\u00e9e, l\u2019Ability devient <strong>d\u00e9couvrable<\/strong> et <strong>ex\u00e9cutable<\/strong> depuis PHP, JavaScript et la REST API.<\/p>\n\n\n\n<p>WordPress 6.9 embarque trois Abilities \u201ccore\u201d par d\u00e9faut, pratiques pour tester rapidement :<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n\n<li><code>core\/get-site-info<\/code> : renvoie les informations de site configur\u00e9es dans WordPress (par d\u00e9faut tous les champs, ou un sous-ensemble filtr\u00e9).<\/li>\n\n\n<li><code>core\/get-user-info<\/code> : renvoie les infos de profil de base de l\u2019utilisateur authentifi\u00e9 courant (personnalisation, audit, comportements sensibles aux droits).<\/li>\n\n\n<li><code>core\/get-environment-info<\/code> : renvoie des infos de contexte runtime utiles au diagnostic (environnement, runtime PHP, infos serveur BDD, version WordPress).<\/li>\n\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">WordPress MCP Adapter : \u00e0 quoi \u00e7a sert concr\u00e8tement ?<\/h2>\n\n\n\n<p>Le <strong>WordPress MCP Adapter<\/strong> fait partie d\u2019une initiative plus large : <em>AI Building Blocks for WordPress<\/em>. Son r\u00f4le : convertir les Abilities enregistr\u00e9es via l\u2019Abilities API en primitives compatibles MCP (au sens de l\u2019architecture MCP) pour que des agents IA puissent :<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n\n<li><strong>D\u00e9couvrir<\/strong> des fonctionnalit\u00e9s du site et les invoquer sous forme de <strong>MCP tools<\/strong> (fonctions ex\u00e9cutables).<\/li>\n\n\n<li>Lire certaines informations WordPress comme des <strong>MCP resources<\/strong> (sources de donn\u00e9es passives).<\/li>\n\n<\/ul>\n\n\n\n<p>La cons\u00e9quence pratique est importante : <strong>si ton plugin enregistre d\u00e9j\u00e0 des Abilities, tu es \u00e0 un pas de les rendre utilisables par un agent IA.<\/strong><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Petit m\u00e9mo MCP : tools, resources, prompts<\/h3>\n\n\n\n<p>MCP structure l\u2019interaction autour de trois primitives principales :<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n\n<li><strong>Tools<\/strong> : fonctions ex\u00e9cutables que le client IA appelle pour agir (lecture\/\u00e9criture\/diagnostic\u2026).<\/li>\n\n\n<li><strong>Resources<\/strong> : sources de donn\u00e9es \u201cpassives\u201d (fichiers, lignes de base, etc.) lues par l\u2019IA pour du contexte.<\/li>\n\n\n<li><strong>Prompts<\/strong> : gabarits pr\u00e9configur\u00e9s (templates) pour guider des workflows sp\u00e9cifiques.<\/li>\n\n<\/ul>\n\n\n\n<p>Avec l\u2019adapter WordPress, les Abilities sont g\u00e9n\u00e9ralement expos\u00e9es comme des <strong>tools<\/strong>, car elles incarnent une logique ex\u00e9cutable. Mais l\u2019adapter est flexible : si une Ability est strictement en lecture seule et ressemble plut\u00f4t \u00e0 une \u201csource de contexte\u201d (ex. un log de debug ou une configuration statique), elle peut \u00eatre configur\u00e9e comme <strong>resource<\/strong> pour que l\u2019IA l\u2019ing\u00e8re sans avoir \u00e0 \u201cappeler\u201d explicitement une action.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Installer le MCP Adapter (mode plugin)<\/h2>\n\n\n\n<p>La voie la plus rapide pour d\u00e9marrer consiste \u00e0 installer l\u2019adapter comme plugin, en t\u00e9l\u00e9chargeant l\u2019archive depuis la page Releases du d\u00e9p\u00f4t GitHub : <a href=\"https:\/\/github.com\/WordPress\/mcp-adapter\/releases\">https:\/\/github.com\/WordPress\/mcp-adapter\/releases<\/a>.<\/p>\n\n\n\n<p>Une fois activ\u00e9, le plugin :<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n\n<li>Enregistre un <strong>serveur MCP par d\u00e9faut<\/strong> nomm\u00e9 <code>mcp-adapter-default-server<\/code>.<\/li>\n\n\n<li>Ajoute trois Abilities d\u00e9di\u00e9es \u00e0 l\u2019acc\u00e8s MCP : <code>mcp-adapter\/discover-abilities<\/code>, <code>mcp-adapter\/get-ability-info<\/code>, <code>mcp-adapter\/execute-ability<\/code>.<\/li>\n\n\n<li>Expose automatiquement ces Abilities en <strong>MCP tools<\/strong> : <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>Ces trois tools fournissent une approche \u201cen couches\u201d pour acc\u00e9der aux Abilities : un agent peut <strong>d\u00e9couvrir<\/strong> ce qui existe, <strong>inspecter<\/strong> une Ability (sch\u00e9mas, permissions, etc.), puis <strong>ex\u00e9cuter<\/strong> l\u2019Ability.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Rendre une Ability accessible au serveur MCP par d\u00e9faut<\/h2>\n\n\n\n<p>Point cl\u00e9 : <strong>le serveur MCP par d\u00e9faut n\u2019expose pas toutes les Abilities automatiquement<\/strong>. Par d\u00e9faut, une Ability n\u2019est disponible via ce serveur que si tu la marques explicitement comme \u201cpublique\u201d pour MCP, via un flag <code>meta.mcp.public<\/code> lors de l\u2019enregistrement avec <code>wp_register_ability()<\/code>.<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#24292e\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#e1e4e8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>'meta' =&gt; array(\n    'mcp' =&gt; array(\n        'public' =&gt; true,  \/\/ Required for MCP default server access\n    ),\n),\n<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color:#24292e;color:#e1e4e8\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color:#9ECBFF\">'meta'<\/span><span style=\"color:#F97583\"> =><\/span><span style=\"color:#79B8FF\"> array<\/span><span style=\"color:#E1E4E8\">(<\/span><\/span>\n<span class=\"line\"><span style=\"color:#9ECBFF\">    'mcp'<\/span><span style=\"color:#F97583\"> =><\/span><span style=\"color:#79B8FF\"> array<\/span><span style=\"color:#E1E4E8\">(<\/span><\/span>\n<span class=\"line\"><span style=\"color:#9ECBFF\">        'public'<\/span><span style=\"color:#F97583\"> =><\/span><span style=\"color:#79B8FF\"> true<\/span><span style=\"color:#E1E4E8\">,  <\/span><span style=\"color:#6A737D\">\/\/ Required for MCP default server access<\/span><\/span>\n<span class=\"line\"><span style=\"color:#E1E4E8\">    ),<\/span><\/span>\n<span class=\"line\"><span style=\"color:#E1E4E8\">),<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>Pour les Abilities du core, tu ne vas pas r\u00e9-enregistrer : tu peux modifier leurs arguments via le filtre <code>wp_register_ability_args<\/code> afin d\u2019ajouter ce flag <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>&lt;?php\n\/**\n * Plugin Name: Enable core abilities\n * Version: 1.0.0\n *\n * @package enable-core-abilities\n *\/\n\nadd_filter( 'wp_register_ability_args', 'myplugin_enable_core_abilities_mcp_access', 10, 2 );\n\/**\n * Enable MCP access for core abilities.\n *\n * @param array  $args         Ability registration arguments.\n * @param string $ability_name Ability ID.\n * @return array Modified ability registration arguments.\n *\/\nfunction myplugin_enable_core_abilities_mcp_access( array $args, string $ability_name ) {\n    \/\/ Enable MCP access for the three current core abilities.\n    $core_abilities = array(\n        'core\/get-site-info',\n        'core\/get-user-info',\n        'core\/get-environment-info',\n    );\n    if ( in_array( $ability_name, $core_abilities, true ) ) {\n        $args['meta']['mcp']['public'] = true;\n    }\n\n    return $args;\n}\n\n<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color:#24292e;color:#e1e4e8\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color:#F97583\">&#x3C;?<\/span><span style=\"color:#79B8FF\">php<\/span><\/span>\n<span class=\"line\"><span style=\"color:#6A737D\">\/**<\/span><\/span>\n<span class=\"line\"><span style=\"color:#6A737D\"> * Plugin Name: Enable core abilities<\/span><\/span>\n<span class=\"line\"><span style=\"color:#6A737D\"> * Version: 1.0.0<\/span><\/span>\n<span class=\"line\"><span style=\"color:#6A737D\"> *<\/span><\/span>\n<span class=\"line\"><span style=\"color:#6A737D\"> * <\/span><span style=\"color:#F97583\">@package<\/span><span style=\"color:#6A737D\"> enable-core-abilities<\/span><\/span>\n<span class=\"line\"><span style=\"color:#6A737D\"> *\/<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color:#B392F0\">add_filter<\/span><span style=\"color:#E1E4E8\">( <\/span><span style=\"color:#9ECBFF\">'wp_register_ability_args'<\/span><span style=\"color:#E1E4E8\">, <\/span><span style=\"color:#9ECBFF\">'myplugin_enable_core_abilities_mcp_access'<\/span><span style=\"color:#E1E4E8\">, <\/span><span style=\"color:#79B8FF\">10<\/span><span style=\"color:#E1E4E8\">, <\/span><span style=\"color:#79B8FF\">2<\/span><span style=\"color:#E1E4E8\"> );<\/span><\/span>\n<span class=\"line\"><span style=\"color:#6A737D\">\/**<\/span><\/span>\n<span class=\"line\"><span style=\"color:#6A737D\"> * Enable MCP access for core abilities.<\/span><\/span>\n<span class=\"line\"><span style=\"color:#6A737D\"> *<\/span><\/span>\n<span class=\"line\"><span style=\"color:#6A737D\"> * <\/span><span style=\"color:#F97583\">@param<\/span><span style=\"color:#F97583\"> array<\/span><span style=\"color:#6A737D\">  $args         Ability registration arguments.<\/span><\/span>\n<span class=\"line\"><span style=\"color:#6A737D\"> * <\/span><span style=\"color:#F97583\">@param<\/span><span style=\"color:#F97583\"> string<\/span><span style=\"color:#6A737D\"> $ability_name Ability ID.<\/span><\/span>\n<span class=\"line\"><span style=\"color:#6A737D\"> * <\/span><span style=\"color:#F97583\">@return<\/span><span style=\"color:#F97583\"> array<\/span><span style=\"color:#6A737D\"> Modified ability registration arguments.<\/span><\/span>\n<span class=\"line\"><span style=\"color:#6A737D\"> *\/<\/span><\/span>\n<span class=\"line\"><span style=\"color:#F97583\">function<\/span><span style=\"color:#B392F0\"> myplugin_enable_core_abilities_mcp_access<\/span><span style=\"color:#E1E4E8\">( <\/span><span style=\"color:#F97583\">array<\/span><span style=\"color:#E1E4E8\"> $args, <\/span><span style=\"color:#F97583\">string<\/span><span style=\"color:#E1E4E8\"> $ability_name ) {<\/span><\/span>\n<span class=\"line\"><span style=\"color:#6A737D\">    \/\/ Enable MCP access for the three current core abilities.<\/span><\/span>\n<span class=\"line\"><span style=\"color:#E1E4E8\">    $core_abilities <\/span><span style=\"color:#F97583\">=<\/span><span style=\"color:#79B8FF\"> array<\/span><span style=\"color:#E1E4E8\">(<\/span><\/span>\n<span class=\"line\"><span style=\"color:#9ECBFF\">        'core\/get-site-info'<\/span><span style=\"color:#E1E4E8\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color:#9ECBFF\">        'core\/get-user-info'<\/span><span style=\"color:#E1E4E8\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color:#9ECBFF\">        'core\/get-environment-info'<\/span><span style=\"color:#E1E4E8\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color:#E1E4E8\">    );<\/span><\/span>\n<span class=\"line\"><span style=\"color:#F97583\">    if<\/span><span style=\"color:#E1E4E8\"> ( <\/span><span style=\"color:#79B8FF\">in_array<\/span><span style=\"color:#E1E4E8\">( $ability_name, $core_abilities, <\/span><span style=\"color:#79B8FF\">true<\/span><span style=\"color:#E1E4E8\"> ) ) {<\/span><\/span>\n<span class=\"line\"><span style=\"color:#E1E4E8\">        $args[<\/span><span style=\"color:#9ECBFF\">'meta'<\/span><span style=\"color:#E1E4E8\">][<\/span><span style=\"color:#9ECBFF\">'mcp'<\/span><span style=\"color:#E1E4E8\">][<\/span><span style=\"color:#9ECBFF\">'public'<\/span><span style=\"color:#E1E4E8\">] <\/span><span style=\"color:#F97583\">=<\/span><span style=\"color:#79B8FF\"> true<\/span><span style=\"color:#E1E4E8\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color:#E1E4E8\">    }<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color:#F97583\">    return<\/span><span style=\"color:#E1E4E8\"> $args;<\/span><\/span>\n<span class=\"line\"><span style=\"color:#E1E4E8\">}<\/span><\/span>\n<span class=\"line\"><\/span><\/code><\/pre><\/div>\n\n\n\n<p>Avec \u00e7a en place, tu peux connecter un client IA \u00e0 ton site et appeler ces Abilities core via les tools du serveur par d\u00e9faut.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Connecter des applications IA \u00e0 ton site WordPress MCP<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Les deux transports MCP : STDIO et HTTP<\/h3>\n\n\n\n<p>Pour parler \u00e0 un site WordPress expos\u00e9 en serveur MCP, MCP pr\u00e9voit deux m\u00e9canismes de transport : <strong>STDIO<\/strong> et <strong>HTTP<\/strong>. Le bon choix d\u00e9pend surtout d\u2019o\u00f9 tourne ton site.<\/p>\n\n\n\n<p>Pour un environnement local de dev WordPress, le plus simple est g\u00e9n\u00e9ralement <strong>STDIO<\/strong>. Le MCP Adapter le supporte via <strong>WP-CLI<\/strong> (donc WP-CLI doit \u00eatre install\u00e9 localement). La configuration minimale ressemble \u00e0 \u00e7a :<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#24292e\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#e1e4e8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>{\n  &quot;wordpress-mcp-server&quot;: {\n    &quot;command&quot;: &quot;wp&quot;,\n    &quot;args&quot;: [\n      &quot;--path=\/path\/to\/your\/wordpress\/installation&quot;,\n      &quot;mcp-adapter&quot;,\n      &quot;serve&quot;,\n      &quot;--server=mcp-adapter-default-server&quot;,\n      &quot;--user={admin_user}&quot;\n    ]\n  }\n}\n\n<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color:#24292e;color:#e1e4e8\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color:#E1E4E8\">{<\/span><\/span>\n<span class=\"line\"><span style=\"color:#79B8FF\">  \"wordpress-mcp-server\"<\/span><span style=\"color:#E1E4E8\">: {<\/span><\/span>\n<span class=\"line\"><span style=\"color:#79B8FF\">    \"command\"<\/span><span style=\"color:#E1E4E8\">: <\/span><span style=\"color:#9ECBFF\">\"wp\"<\/span><span style=\"color:#E1E4E8\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color:#79B8FF\">    \"args\"<\/span><span style=\"color:#E1E4E8\">: [<\/span><\/span>\n<span class=\"line\"><span style=\"color:#9ECBFF\">      \"--path=\/path\/to\/your\/wordpress\/installation\"<\/span><span style=\"color:#E1E4E8\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color:#9ECBFF\">      \"mcp-adapter\"<\/span><span style=\"color:#E1E4E8\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color:#9ECBFF\">      \"serve\"<\/span><span style=\"color:#E1E4E8\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color:#9ECBFF\">      \"--server=mcp-adapter-default-server\"<\/span><span style=\"color:#E1E4E8\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color:#9ECBFF\">      \"--user={admin_user}\"<\/span><\/span>\n<span class=\"line\"><span style=\"color:#E1E4E8\">    ]<\/span><\/span>\n<span class=\"line\"><span style=\"color:#E1E4E8\">  }<\/span><\/span>\n<span class=\"line\"><span style=\"color:#E1E4E8\">}<\/span><\/span>\n<span class=\"line\"><\/span><\/code><\/pre><\/div>\n\n\n\n<p>\u00c0 noter :<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n\n<li><code>wordpress-mcp-server<\/code> est un identifiant libre (tu peux le nommer comme tu veux).<\/li>\n\n\n<li>La commande est <code>wp<\/code> (WP-CLI).<\/li>\n\n\n<li>Dans <code>args<\/code> : <code>--path<\/code> pointe vers l\u2019installation WordPress, <code>mcp-adapter serve<\/code> d\u00e9marre le serveur, <code>--server<\/code> choisit quel serveur MCP utiliser (ici le serveur par d\u00e9faut), <code>--user<\/code> d\u00e9finit l\u2019utilisateur WordPress utilis\u00e9 pour s\u2019authentifier (ex. <code>admin<\/code>).<\/li>\n\n<\/ul>\n\n\n\n<p>Pour un WordPress publiquement accessible, ou si tu ne veux pas passer par STDIO, tu peux utiliser <strong>HTTP<\/strong> via un proxy distant : <code>@automattic\/mcp-wordpress-remote<\/code> (<a href=\"https:\/\/www.npmjs.com\/package\/@automattic\/mcp-wordpress-remote\">https:\/\/www.npmjs.com\/package\/@automattic\/mcp-wordpress-remote<\/a>). Dans ce cas, il te faut <strong>Node.js<\/strong> : <a href=\"https:\/\/nodejs.org\/en\">https:\/\/nodejs.org\/en<\/a> et une authentification bas\u00e9e sur les <strong>Application Passwords WordPress<\/strong> (ou une impl\u00e9mentation OAuth custom).<\/p>\n\n\n\n<p>Configuration minimale en 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;wordpress-mcp-server&quot;: {\n    &quot;command&quot;: &quot;npx&quot;,\n    &quot;args&quot;: [&quot;-y&quot;, &quot;@automattic\/mcp-wordpress-remote@latest&quot;],\n    &quot;env&quot;: {\n      &quot;WP_API_URL&quot;: &quot;https:\/\/yoursite.example\/wp-json\/mcp\/mcp-adapter-default-server&quot;,\n      &quot;WP_API_USERNAME&quot;: &quot;{admin_user}&quot;,\n      &quot;WP_API_PASSWORD&quot;: &quot;{application-password}&quot;\n    }\n  }\n}\n\n<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color:#24292e;color:#e1e4e8\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color:#E1E4E8\">{<\/span><\/span>\n<span class=\"line\"><span style=\"color:#79B8FF\">  \"wordpress-mcp-server\"<\/span><span style=\"color:#E1E4E8\">: {<\/span><\/span>\n<span class=\"line\"><span style=\"color:#79B8FF\">    \"command\"<\/span><span style=\"color:#E1E4E8\">: <\/span><span style=\"color:#9ECBFF\">\"npx\"<\/span><span style=\"color:#E1E4E8\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color:#79B8FF\">    \"args\"<\/span><span style=\"color:#E1E4E8\">: [<\/span><span style=\"color:#9ECBFF\">\"-y\"<\/span><span style=\"color:#E1E4E8\">, <\/span><span style=\"color:#9ECBFF\">\"@automattic\/mcp-wordpress-remote@latest\"<\/span><span style=\"color:#E1E4E8\">],<\/span><\/span>\n<span class=\"line\"><span style=\"color:#79B8FF\">    \"env\"<\/span><span style=\"color:#E1E4E8\">: {<\/span><\/span>\n<span class=\"line\"><span style=\"color:#79B8FF\">      \"WP_API_URL\"<\/span><span style=\"color:#E1E4E8\">: <\/span><span style=\"color:#9ECBFF\">\"https:\/\/yoursite.example\/wp-json\/mcp\/mcp-adapter-default-server\"<\/span><span style=\"color:#E1E4E8\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color:#79B8FF\">      \"WP_API_USERNAME\"<\/span><span style=\"color:#E1E4E8\">: <\/span><span style=\"color:#9ECBFF\">\"{admin_user}\"<\/span><span style=\"color:#E1E4E8\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color:#79B8FF\">      \"WP_API_PASSWORD\"<\/span><span style=\"color:#E1E4E8\">: <\/span><span style=\"color:#9ECBFF\">\"{application-password}\"<\/span><\/span>\n<span class=\"line\"><span style=\"color:#E1E4E8\">    }<\/span><\/span>\n<span class=\"line\"><span style=\"color:#E1E4E8\">  }<\/span><\/span>\n<span class=\"line\"><span style=\"color:#E1E4E8\">}<\/span><\/span>\n<span class=\"line\"><\/span><\/code><\/pre><\/div>\n\n\n\n<p>D\u00e9tails importants :<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n\n<li>La commande <code>npx<\/code> ex\u00e9cute des paquets Node.js.<\/li>\n\n\n<li><code>-y<\/code> accepte automatiquement l\u2019installation du paquet.<\/li>\n\n\n<li><code>WP_API_URL<\/code> doit pointer vers l\u2019endpoint MCP du site (namespace du serveur inclus).<\/li>\n\n\n<li><code>WP_API_USERNAME<\/code> et <code>WP_API_PASSWORD<\/code> servent \u00e0 l\u2019authentification (mot de passe d\u2019application).<\/li>\n\n\n<li>Le proxy <code>mcp-wordpress-remote<\/code> propose aussi des pistes de diagnostic pour les connexions HTTP en local, notamment si tu as plusieurs versions de Node.js ou des soucis de certificats SSL : <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>.<\/li>\n\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Configurations sp\u00e9cifiques : Claude Desktop, Cursor, Claude Code, VS Code<\/h3>\n\n\n\n<div class=\"wp-block-group callout callout-info is-style-info is-layout-flow wp-block-group-is-layout-flow\" style=\"border-width:1px;border-radius:8px;padding-top:1rem;padding-right:1.5rem;padding-bottom:1rem;padding-left:1.5rem\">\n\n<h4 class=\"wp-block-heading callout-title\">Valeurs d\u2019exemple<\/h4>\n\n\n<p>Les exemples ci-dessous utilisent un site Studio \u201cWordPress MCP\u201d dans <code>\/Users\/jonathanbossenger\/Studio\/wordpress-mcp<\/code>, accessible via <code>http:\/\/localhost:8885\/<\/code>, et un user admin <code>admin<\/code>. Remplace avec ton chemin et ton utilisateur.<\/p>\n\n<\/div>\n\n\n\n<h4 class=\"wp-block-heading\">Claude Desktop<\/h4>\n\n\n\n<p>Claude Desktop (Anthropic) a support\u00e9 MCP tr\u00e8s t\u00f4t. Pour ajouter un serveur MCP : va dans l\u2019onglet <strong>Developer<\/strong> (<em>Claude \u2192 Settings \u2192 Developer<\/em>), puis sous \u201cLocal MCP servers\u201d clique <strong>Edit config<\/strong>. Cela ouvre l\u2019emplacement du fichier <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\/4\/2026\/02\/mcp-01-claude-developer-settings-scaled.png\" alt=\"Panneau Developer Settings de Claude Desktop\" class=\"wp-image-257\" srcset=\"https:\/\/helloblog.io\/app\/uploads\/sites\/4\/2026\/02\/mcp-01-claude-developer-settings-scaled.png 2560w, https:\/\/helloblog.io\/app\/uploads\/sites\/4\/2026\/02\/mcp-01-claude-developer-settings-300x201.png 300w, https:\/\/helloblog.io\/app\/uploads\/sites\/4\/2026\/02\/mcp-01-claude-developer-settings-1024x684.png 1024w, https:\/\/helloblog.io\/app\/uploads\/sites\/4\/2026\/02\/mcp-01-claude-developer-settings-768x513.png 768w, https:\/\/helloblog.io\/app\/uploads\/sites\/4\/2026\/02\/mcp-01-claude-developer-settings-1536x1027.png 1536w, https:\/\/helloblog.io\/app\/uploads\/sites\/4\/2026\/02\/mcp-01-claude-developer-settings-2048x1369.png 2048w, https:\/\/helloblog.io\/app\/uploads\/sites\/4\/2026\/02\/mcp-01-claude-developer-settings-400x267.png 400w\" sizes=\"auto, (max-width: 2560px) 100vw, 2560px\" \/><figcaption class=\"wp-element-caption\">Acc\u00e8s \u00e0 la configuration des serveurs MCP dans Claude Desktop. \u2014 <em>Forr\u00e1s: WordPress Developer Blog<\/em><\/figcaption><\/figure>\n\n\n\n<p>Les serveurs se d\u00e9clarent dans un objet <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\n<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color:#24292e;color:#e1e4e8\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color:#E1E4E8\">{<\/span><\/span>\n<span class=\"line\"><span style=\"color:#79B8FF\">  \"mcpServers\"<\/span><span style=\"color:#E1E4E8\">: {<\/span><\/span>\n<span class=\"line\"><span style=\"color:#E1E4E8\">  }<\/span><\/span>\n<span class=\"line\"><span style=\"color:#E1E4E8\">}<\/span><\/span>\n<span class=\"line\"><\/span><\/code><\/pre><\/div>\n\n\n\n<p>Exemple en transport 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\n<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color:#24292e;color:#e1e4e8\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color:#E1E4E8\">{<\/span><\/span>\n<span class=\"line\"><span style=\"color:#79B8FF\">  \"mcpServers\"<\/span><span style=\"color:#E1E4E8\">: {<\/span><\/span>\n<span class=\"line\"><span style=\"color:#79B8FF\">    \"wordpress-mcp-server\"<\/span><span style=\"color:#E1E4E8\">: {<\/span><\/span>\n<span class=\"line\"><span style=\"color:#79B8FF\">      \"command\"<\/span><span style=\"color:#E1E4E8\">: <\/span><span style=\"color:#9ECBFF\">\"wp\"<\/span><span style=\"color:#E1E4E8\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color:#79B8FF\">      \"args\"<\/span><span style=\"color:#E1E4E8\">: [<\/span><\/span>\n<span class=\"line\"><span style=\"color:#9ECBFF\">        \"--path=\/Users\/jonathanbossenger\/Studio\/wordpress-mcp\"<\/span><span style=\"color:#E1E4E8\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color:#9ECBFF\">        \"mcp-adapter\"<\/span><span style=\"color:#E1E4E8\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color:#9ECBFF\">        \"serve\"<\/span><span style=\"color:#E1E4E8\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color:#9ECBFF\">        \"--server=mcp-adapter-default-server\"<\/span><span style=\"color:#E1E4E8\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color:#9ECBFF\">        \"--user=admin\"<\/span><\/span>\n<span class=\"line\"><span style=\"color:#E1E4E8\">      ]<\/span><\/span>\n<span class=\"line\"><span style=\"color:#E1E4E8\">    }<\/span><\/span>\n<span class=\"line\"><span style=\"color:#E1E4E8\">  }<\/span><\/span>\n<span class=\"line\"><span style=\"color:#E1E4E8\">}<\/span><\/span>\n<span class=\"line\"><\/span><\/code><\/pre><\/div>\n\n\n\n<p>Exemple en transport 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\n<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color:#24292e;color:#e1e4e8\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color:#E1E4E8\">{<\/span><\/span>\n<span class=\"line\"><span style=\"color:#79B8FF\">  \"mcpServers\"<\/span><span style=\"color:#E1E4E8\">: {<\/span><\/span>\n<span class=\"line\"><span style=\"color:#79B8FF\">    \"wordpress-mcp-server\"<\/span><span style=\"color:#E1E4E8\">: {<\/span><\/span>\n<span class=\"line\"><span style=\"color:#79B8FF\">      \"command\"<\/span><span style=\"color:#E1E4E8\">: <\/span><span style=\"color:#9ECBFF\">\"npx\"<\/span><span style=\"color:#E1E4E8\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color:#79B8FF\">      \"args\"<\/span><span style=\"color:#E1E4E8\">: [<\/span><span style=\"color:#9ECBFF\">\"-y\"<\/span><span style=\"color:#E1E4E8\">, <\/span><span style=\"color:#9ECBFF\">\"@automattic\/mcp-wordpress-remote@latest\"<\/span><span style=\"color:#E1E4E8\">],<\/span><\/span>\n<span class=\"line\"><span style=\"color:#79B8FF\">      \"env\"<\/span><span style=\"color:#E1E4E8\">: {<\/span><\/span>\n<span class=\"line\"><span style=\"color:#79B8FF\">        \"WP_API_URL\"<\/span><span style=\"color:#E1E4E8\">: <\/span><span style=\"color:#9ECBFF\">\"http:\/\/localhost:8885\/wp-json\/mcp\/mcp-adapter-default-server\"<\/span><span style=\"color:#E1E4E8\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color:#79B8FF\">        \"WP_API_USERNAME\"<\/span><span style=\"color:#E1E4E8\">: <\/span><span style=\"color:#9ECBFF\">\"admin\"<\/span><span style=\"color:#E1E4E8\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color:#79B8FF\">        \"WP_API_PASSWORD\"<\/span><span style=\"color:#E1E4E8\">: <\/span><span style=\"color:#9ECBFF\">\"2SEB qW5j D7CW fpsh pbmN RGva\"<\/span><\/span>\n<span class=\"line\"><span style=\"color:#E1E4E8\">      }<\/span><\/span>\n<span class=\"line\"><span style=\"color:#E1E4E8\">    }<\/span><\/span>\n<span class=\"line\"><span style=\"color:#E1E4E8\">  }<\/span><\/span>\n<span class=\"line\"><span style=\"color:#E1E4E8\">}<\/span><\/span>\n<span class=\"line\"><\/span><\/code><\/pre><\/div>\n\n\n\n<p>Apr\u00e8s sauvegarde, il faut <strong>red\u00e9marrer Claude Desktop<\/strong> (il ne recharge la conf MCP qu\u2019au d\u00e9marrage). Ensuite tu dois voir le serveur dans Developer \u2192 Local MCP servers, id\u00e9alement avec le statut <code>running<\/code>.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Cursor<\/h4>\n\n\n\n<p>Dans Cursor : va dans <em>Cursor \u2192 Settings \u2192 Cursor Settings<\/em>, puis ouvre la section <strong>Tools and MCP<\/strong>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"2560\" height=\"1603\" src=\"https:\/\/helloblog.io\/app\/uploads\/sites\/4\/2026\/02\/mcp-04-cursor-scaled.png\" alt=\"Panneau de r\u00e9glages Tools &#038; MCP dans Cursor\" class=\"wp-image-258\" srcset=\"https:\/\/helloblog.io\/app\/uploads\/sites\/4\/2026\/02\/mcp-04-cursor-scaled.png 2560w, https:\/\/helloblog.io\/app\/uploads\/sites\/4\/2026\/02\/mcp-04-cursor-300x188.png 300w, https:\/\/helloblog.io\/app\/uploads\/sites\/4\/2026\/02\/mcp-04-cursor-1024x641.png 1024w, https:\/\/helloblog.io\/app\/uploads\/sites\/4\/2026\/02\/mcp-04-cursor-768x481.png 768w, https:\/\/helloblog.io\/app\/uploads\/sites\/4\/2026\/02\/mcp-04-cursor-1536x962.png 1536w, https:\/\/helloblog.io\/app\/uploads\/sites\/4\/2026\/02\/mcp-04-cursor-2048x1283.png 2048w, https:\/\/helloblog.io\/app\/uploads\/sites\/4\/2026\/02\/mcp-04-cursor-400x251.png 400w\" sizes=\"auto, (max-width: 2560px) 100vw, 2560px\" \/><figcaption class=\"wp-element-caption\">Cursor centralise l\u2019ajout des serveurs MCP dans Tools and MCP. \u2014 <em>Forr\u00e1s: WordPress Developer Blog<\/em><\/figcaption><\/figure>\n\n\n\n<p>Clique sur <strong>Add Custom MCP<\/strong> : Cursor ouvre alors le fichier <code>mcp.json<\/code>. La structure de configuration est la m\u00eame que pour Claude Desktop. Apr\u00e8s sauvegarde, reviens dans Tools and MCP : le serveur doit appara\u00eetre et tu peux l\u2019activer pour tes sessions.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Claude Code<\/h4>\n\n\n\n<p>Pour Claude Code, tu as deux options :<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n\n<li>D\u00e9clarer <code>mcpServers<\/code> dans <code>~\/.claude.json<\/code> (disponible globalement).<\/li>\n\n\n<li>Cr\u00e9er un fichier <code>.mcp.json<\/code> \u00e0 la racine de ton projet (config sp\u00e9cifique \u00e0 un projet).<\/li>\n\n<\/ul>\n\n\n\n<p>Dans les deux cas, tu utilises le m\u00eame format que Cursor\/Claude Desktop (objet <code>mcpServers<\/code>).<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">VS Code<\/h4>\n\n\n\n<p>VS Code se configure via un fichier JSON d\u00e9crivant les serveurs MCP (doc VS Code : <a href=\"https:\/\/code.visualstudio.com\/docs\/copilot\/customization\/mcp-servers\">https:\/\/code.visualstudio.com\/docs\/copilot\/customization\/mcp-servers<\/a>). En pratique, tu cr\u00e9es souvent un <code>mcp.json<\/code> dans un dossier <code>.vscode<\/code> au sein du workspace.<\/p>\n\n\n\n<p>Diff\u00e9rence notable : VS Code attend un objet <code>servers<\/code> (et non <code>mcpServers<\/code>). Le reste (command\/args\/env) est identique.<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#24292e\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#e1e4e8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>{\n  &quot;servers&quot;: {\n    \/\/ MCP server definitions go here\n  }\n}\n\n<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color:#24292e;color:#e1e4e8\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color:#E1E4E8\">{<\/span><\/span>\n<span class=\"line\"><span style=\"color:#79B8FF\">  \"servers\"<\/span><span style=\"color:#E1E4E8\">: {<\/span><\/span>\n<span class=\"line\"><span style=\"color:#6A737D\">    \/\/ MCP server definitions go here<\/span><\/span>\n<span class=\"line\"><span style=\"color:#E1E4E8\">  }<\/span><\/span>\n<span class=\"line\"><span style=\"color:#E1E4E8\">}<\/span><\/span>\n<span class=\"line\"><\/span><\/code><\/pre><\/div>\n\n\n\n<p>Une fois en place, VS Code affiche une barre de contr\u00f4le MCP pour d\u00e9marrer\/arr\u00eater\/red\u00e9marrer le serveur. Quand tout est OK, VS Code indique aussi le nombre de tools disponibles (dans l\u2019exemple pr\u00e9sent\u00e9 : 3 tools).<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"2560\" height=\"1631\" src=\"https:\/\/helloblog.io\/app\/uploads\/sites\/4\/2026\/02\/mcp-06-vscode-scaled.png\" alt=\"VS Code affichant la configuration mcp.json et les contr\u00f4les MCP\" class=\"wp-image-259\" srcset=\"https:\/\/helloblog.io\/app\/uploads\/sites\/4\/2026\/02\/mcp-06-vscode-scaled.png 2560w, https:\/\/helloblog.io\/app\/uploads\/sites\/4\/2026\/02\/mcp-06-vscode-300x191.png 300w, https:\/\/helloblog.io\/app\/uploads\/sites\/4\/2026\/02\/mcp-06-vscode-1024x652.png 1024w, https:\/\/helloblog.io\/app\/uploads\/sites\/4\/2026\/02\/mcp-06-vscode-768x489.png 768w, https:\/\/helloblog.io\/app\/uploads\/sites\/4\/2026\/02\/mcp-06-vscode-1536x979.png 1536w, https:\/\/helloblog.io\/app\/uploads\/sites\/4\/2026\/02\/mcp-06-vscode-2048x1305.png 2048w, https:\/\/helloblog.io\/app\/uploads\/sites\/4\/2026\/02\/mcp-06-vscode-400x255.png 400w\" sizes=\"auto, (max-width: 2560px) 100vw, 2560px\" \/><figcaption class=\"wp-element-caption\">VS Code lit <code>.vscode\/mcp.json<\/code>, pilote le serveur MCP, et affiche le nombre de tools disponibles. \u2014 <em>Forr\u00e1s: WordPress Developer Blog<\/em><\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Utiliser les MCP tools expos\u00e9s par WordPress<\/h2>\n\n\n\n<p>Une fois ton serveur MCP connect\u00e9, tu peux commencer \u00e0 exploiter les tools expos\u00e9s par l\u2019adapter. Exemple simple dans Claude Desktop : demander \u201cGet the site info from my WordPress site\u201d.<\/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\/4\/2026\/02\/mcp-03-claude-query-scaled.png\" alt=\"Requ\u00eate dans Claude Desktop utilisant le serveur MCP WordPress et renvoyant les infos du site\" class=\"wp-image-260\" srcset=\"https:\/\/helloblog.io\/app\/uploads\/sites\/4\/2026\/02\/mcp-03-claude-query-scaled.png 2560w, https:\/\/helloblog.io\/app\/uploads\/sites\/4\/2026\/02\/mcp-03-claude-query-300x201.png 300w, https:\/\/helloblog.io\/app\/uploads\/sites\/4\/2026\/02\/mcp-03-claude-query-1024x684.png 1024w, https:\/\/helloblog.io\/app\/uploads\/sites\/4\/2026\/02\/mcp-03-claude-query-768x513.png 768w, https:\/\/helloblog.io\/app\/uploads\/sites\/4\/2026\/02\/mcp-03-claude-query-1536x1027.png 1536w, https:\/\/helloblog.io\/app\/uploads\/sites\/4\/2026\/02\/mcp-03-claude-query-2048x1369.png 2048w, https:\/\/helloblog.io\/app\/uploads\/sites\/4\/2026\/02\/mcp-03-claude-query-400x267.png 400w\" sizes=\"auto, (max-width: 2560px) 100vw, 2560px\" \/><figcaption class=\"wp-element-caption\">Claude identifie le serveur MCP, d\u00e9couvre les Abilities, puis ex\u00e9cute celle qui correspond \u00e0 la demande. \u2014 <em>Forr\u00e1s: WordPress Developer Blog<\/em><\/figcaption><\/figure>\n\n\n\n<p>Dans ce sc\u00e9nario, le client IA :<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n\n<li>D\u00e9tecte qu\u2019un serveur MCP est disponible.<\/li>\n\n\n<li>Appelle <code>mcp-adapter-discover-abilities<\/code> pour lister les Abilities accessibles.<\/li>\n\n\n<li>D\u00e9duit que <code>core\/get-site-info<\/code> correspond \u00e0 la demande.<\/li>\n\n\n<li>Appelle <code>mcp-adapter-execute-ability<\/code> en lui passant <code>core\/get-site-info<\/code>.<\/li>\n\n\n<li>R\u00e9cup\u00e8re les donn\u00e9es et formule une r\u00e9ponse avec les infos du site.<\/li>\n\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Aller plus loin : cr\u00e9er un serveur MCP personnalis\u00e9 dans ton plugin<\/h2>\n\n\n\n<p>Le serveur par d\u00e9faut couvre d\u00e9j\u00e0 beaucoup de cas, mais tu peux vouloir un <strong>serveur MCP sp\u00e9cifique \u00e0 ton plugin<\/strong>. L\u2019int\u00e9r\u00eat : contr\u00f4ler finement quelles Abilities deviennent des tools (et comment), sans d\u00e9pendre du flag <code>meta.mcp.public<\/code>.<\/p>\n\n\n\n<p>Pour faire \u00e7a, il faut installer le package via Composer, puis cr\u00e9er\/enregistrer ton serveur MCP.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">1) Installer le package via Composer<\/h3>\n\n\n\n<p>Depuis le dossier de ton 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\n<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color:#24292e;color:#e1e4e8\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color:#B392F0\">composer<\/span><span style=\"color:#9ECBFF\"> require<\/span><span style=\"color:#9ECBFF\"> wordpress\/mcp-adapter<\/span><\/span>\n<span class=\"line\"><\/span><\/code><\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">2) Charger l\u2019autoloader Composer<\/h3>\n\n\n\n<p>Dans le fichier principal du 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>if ( file_exists( __DIR__ . '\/vendor\/autoload.php' ) ) {\n    require_once __DIR__ . '\/vendor\/autoload.php';\n}\n\n<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color:#24292e;color:#e1e4e8\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color:#F97583\">if<\/span><span style=\"color:#E1E4E8\"> ( <\/span><span style=\"color:#79B8FF\">file_exists<\/span><span style=\"color:#E1E4E8\">( <\/span><span style=\"color:#79B8FF\">__DIR__<\/span><span style=\"color:#F97583\"> .<\/span><span style=\"color:#9ECBFF\"> '\/vendor\/autoload.php'<\/span><span style=\"color:#E1E4E8\"> ) ) {<\/span><\/span>\n<span class=\"line\"><span style=\"color:#F97583\">    require_once<\/span><span style=\"color:#79B8FF\"> __DIR__<\/span><span style=\"color:#F97583\"> .<\/span><span style=\"color:#9ECBFF\"> '\/vendor\/autoload.php'<\/span><span style=\"color:#E1E4E8\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color:#E1E4E8\">}<\/span><\/span>\n<span class=\"line\"><\/span><\/code><\/pre><\/div>\n\n\n\n<p>Si plusieurs plugins risquent de d\u00e9pendre de l\u2019Abilities API ou du MCP Adapter sur le m\u00eame site, il est recommand\u00e9 d\u2019utiliser <strong>Jetpack Autoloader<\/strong> pour \u00e9viter les conflits de versions (doc du d\u00e9p\u00f4t) : <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) Initialiser le MCP Adapter<\/h3>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#24292e\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#e1e4e8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>if ( ! class_exists( WPMCPCoreMcpAdapter::class ) ) {\n    \/\/ 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) D\u00e9clarer un serveur MCP custom avec mcp_adapter_init<\/h3>\n\n\n\n<p>Tu peux maintenant cr\u00e9er un serveur sur le hook <code>mcp_adapter_init<\/code>. Le callback re\u00e7oit l\u2019instance <code>McpAdapter<\/code>, et tu appelles <code>create_server()<\/code> avec la configuration souhait\u00e9e.<\/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>Param\u00e8tres \u00e0 bien comprendre :<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n\n<li>(1) Identifiant unique du serveur : utilis\u00e9 notamment quand tu d\u00e9marres le serveur via WP-CLI.<\/li>\n\n\n<li>(2) et (3) Namespace et route REST API de ton serveur MCP.<\/li>\n\n\n<li>(4) et (5) Nom et description affich\u00e9s c\u00f4t\u00e9 applications IA.<\/li>\n\n\n<li>(6) Version du serveur.<\/li>\n\n\n<li>(10) Liste des Abilities \u00e0 exposer en tant que tools (tu peux en mettre plusieurs).<\/li>\n\n\n<li>Les autres param\u00e8tres couvrent la m\u00e9thode de transport, la gestion d\u2019erreurs, et l\u2019observabilit\u00e9. Tu peux utiliser ceux fournis, ou impl\u00e9menter tes propres handlers pour int\u00e9grer ton transport\/logging\/monitoring.<\/li>\n\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Exemple complet : ajouter un serveur MCP au plugin \u201cList All URLs\u201d<\/h2>\n\n\n\n<p>Pour un exemple r\u00e9aliste de serveur MCP custom, on peut partir du plugin \u201cList All URLs\u201d : <a href=\"https:\/\/github.com\/wptrainingteam\/list-all-urls\">https:\/\/github.com\/wptrainingteam\/list-all-urls<\/a>.<\/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\">Important<\/h4>\n\n\n<p>Avant de tester ce sc\u00e9nario, d\u00e9sactive le plugin MCP Adapter si tu l\u2019avais activ\u00e9, afin de bien valider l\u2019ex\u00e9cution via la d\u00e9pendance Composer dans le plugin d\u2019exemple.<\/p>\n\n<\/div>\n\n\n\n<h3 class=\"wp-block-heading\">1) Cloner le plugin dans wp-content\/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\n<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color:#24292e;color:#e1e4e8\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color:#79B8FF\">cd<\/span><span style=\"color:#9ECBFF\"> wp-content\/plugins<\/span><\/span>\n<span class=\"line\"><span style=\"color:#B392F0\">git<\/span><span style=\"color:#9ECBFF\"> clone<\/span><span style=\"color:#9ECBFF\"> git@github.com:wptrainingteam\/list-all-urls.git<\/span><\/span>\n<span class=\"line\"><\/span><\/code><\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">2) Basculer sur la branche qui int\u00e8gre l\u2019Abilities 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\n<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color:#24292e;color:#e1e4e8\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color:#79B8FF\">cd<\/span><span style=\"color:#9ECBFF\"> list-all-urls<\/span><\/span>\n<span class=\"line\"><span style=\"color:#B392F0\">git<\/span><span style=\"color:#9ECBFF\"> checkout<\/span><span style=\"color:#9ECBFF\"> abilities<\/span><\/span>\n<span class=\"line\"><\/span><\/code><\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">3) Installer les d\u00e9pendances Composer du plugin<\/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 install\n\n<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color:#24292e;color:#e1e4e8\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color:#B392F0\">composer<\/span><span style=\"color:#9ECBFF\"> install<\/span><\/span>\n<span class=\"line\"><\/span><\/code><\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">4) Ajouter 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\n<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color:#24292e;color:#e1e4e8\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color:#B392F0\">composer<\/span><span style=\"color:#9ECBFF\"> require<\/span><span style=\"color:#9ECBFF\"> wordpress\/mcp-adapter<\/span><\/span>\n<span class=\"line\"><\/span><\/code><\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">5) Modifier list-all-urls.php : init + serveur custom<\/h3>\n\n\n\n<p>Dans <code>list-all-urls.php<\/code>, ajoute en bas du fichier :<\/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>D\u00e9tail int\u00e9ressant : ici, tu <strong>n\u2019as pas besoin<\/strong> d\u2019ajouter <code>meta.mcp.public<\/code> sur l\u2019Ability <code>list-all-urls\/urls<\/code>, parce que tu l\u2019exposes explicitement via ton serveur MCP custom.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">6) Activer le plugin et configurer ton client IA sur le nouveau serveur<\/h3>\n\n\n\n<p>Active le plugin \u201cList All URLs\u201d dans l\u2019admin WordPress. Ensuite, mets \u00e0 jour la configuration MCP de ton application IA pour utiliser le nouveau serveur.<\/p>\n\n\n\n<p>Exemple de configuration VS Code qui d\u00e9clare \u00e0 la fois le serveur par d\u00e9faut et celui du plugin \u201cList All URLs\u201d, en STDIO :<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#24292e\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#e1e4e8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>{\n  &quot;servers&quot;: {\n    &quot;wordpress-mcp-server&quot;: {\n      &quot;command&quot;: &quot;wp&quot;,\n      &quot;args&quot;: [\n        &quot;--path=\/Users\/jonathanbossenger\/Studio\/wordpress-mcp&quot;,\n        &quot;mcp-adapter&quot;,\n        &quot;serve&quot;,\n        &quot;--server=mcp-adapter-default-server&quot;,\n        &quot;--user=admin&quot;\n      ]\n    },\n    &quot;list-all-urls-mcp-server&quot;: {\n      &quot;command&quot;: &quot;wp&quot;,\n      &quot;args&quot;: [\n        &quot;--path=\/Users\/jonathanbossenger\/Studio\/wordpress-mcp&quot;,\n        &quot;mcp-adapter&quot;,\n        &quot;serve&quot;,\n        &quot;--server=list-all-urls-mcp-server&quot;,\n        &quot;--user=admin&quot;\n      ]\n    }\n  }\n}\n\n<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color:#24292e;color:#e1e4e8\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color:#E1E4E8\">{<\/span><\/span>\n<span class=\"line\"><span style=\"color:#79B8FF\">  \"servers\"<\/span><span style=\"color:#E1E4E8\">: {<\/span><\/span>\n<span class=\"line\"><span style=\"color:#79B8FF\">    \"wordpress-mcp-server\"<\/span><span style=\"color:#E1E4E8\">: {<\/span><\/span>\n<span class=\"line\"><span style=\"color:#79B8FF\">      \"command\"<\/span><span style=\"color:#E1E4E8\">: <\/span><span style=\"color:#9ECBFF\">\"wp\"<\/span><span style=\"color:#E1E4E8\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color:#79B8FF\">      \"args\"<\/span><span style=\"color:#E1E4E8\">: [<\/span><\/span>\n<span class=\"line\"><span style=\"color:#9ECBFF\">        \"--path=\/Users\/jonathanbossenger\/Studio\/wordpress-mcp\"<\/span><span style=\"color:#E1E4E8\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color:#9ECBFF\">        \"mcp-adapter\"<\/span><span style=\"color:#E1E4E8\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color:#9ECBFF\">        \"serve\"<\/span><span style=\"color:#E1E4E8\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color:#9ECBFF\">        \"--server=mcp-adapter-default-server\"<\/span><span style=\"color:#E1E4E8\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color:#9ECBFF\">        \"--user=admin\"<\/span><\/span>\n<span class=\"line\"><span style=\"color:#E1E4E8\">      ]<\/span><\/span>\n<span class=\"line\"><span style=\"color:#E1E4E8\">    },<\/span><\/span>\n<span class=\"line\"><span style=\"color:#79B8FF\">    \"list-all-urls-mcp-server\"<\/span><span style=\"color:#E1E4E8\">: {<\/span><\/span>\n<span class=\"line\"><span style=\"color:#79B8FF\">      \"command\"<\/span><span style=\"color:#E1E4E8\">: <\/span><span style=\"color:#9ECBFF\">\"wp\"<\/span><span style=\"color:#E1E4E8\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color:#79B8FF\">      \"args\"<\/span><span style=\"color:#E1E4E8\">: [<\/span><\/span>\n<span class=\"line\"><span style=\"color:#9ECBFF\">        \"--path=\/Users\/jonathanbossenger\/Studio\/wordpress-mcp\"<\/span><span style=\"color:#E1E4E8\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color:#9ECBFF\">        \"mcp-adapter\"<\/span><span style=\"color:#E1E4E8\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color:#9ECBFF\">        \"serve\"<\/span><span style=\"color:#E1E4E8\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color:#9ECBFF\">        \"--server=list-all-urls-mcp-server\"<\/span><span style=\"color:#E1E4E8\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color:#9ECBFF\">        \"--user=admin\"<\/span><\/span>\n<span class=\"line\"><span style=\"color:#E1E4E8\">      ]<\/span><\/span>\n<span class=\"line\"><span style=\"color:#E1E4E8\">    }<\/span><\/span>\n<span class=\"line\"><span style=\"color:#E1E4E8\">  }<\/span><\/span>\n<span class=\"line\"><span style=\"color:#E1E4E8\">}<\/span><\/span>\n<span class=\"line\"><\/span><\/code><\/pre><\/div>\n\n\n\n<p>Le fait d\u2019avoir <strong>plusieurs serveurs MCP<\/strong> dans la m\u00eame application est un gros plus : tu peux basculer entre plusieurs sites WordPress, ou isoler des groupes d\u2019Abilities par plugin\/usage.<\/p>\n\n\n\n<p>Apr\u00e8s mise \u00e0 jour de la config : red\u00e9marre l\u2019application (ou d\u00e9marre explicitement le serveur MCP dans l\u2019UI quand l\u2019app le permet). Tu devrais voir le nouveau serveur et pouvoir demander \u00e0 l\u2019IA \u201cList all URLs on my WordPress site\u201d : elle appellera alors le tool <code>list-all-urls-urls<\/code> via l\u2019adapter.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">S\u00e9curit\u00e9 : les r\u00e8gles \u00e0 appliquer avant d\u2019ouvrir la porte aux agents<\/h2>\n\n\n\n<p>Un point \u00e0 garder en t\u00eate : un client MCP agit comme un <strong>utilisateur WordPress connect\u00e9<\/strong>. Il faut donc consid\u00e9rer l\u2019int\u00e9gration MCP comme une extension de ta surface applicative.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n\n<li><strong>Soigne le <code>permission_callback<\/code><\/strong> : chaque Ability doit v\u00e9rifier la capability minimale requise (<code>manage_options<\/code>, <code>edit_posts<\/code>, etc.). \u00c9vite <code>__return_true<\/code> sur les op\u00e9rations destructrices (suppression de contenu, modifications sensibles\u2026).<\/li>\n\n\n<li><strong>Utilise des comptes d\u00e9di\u00e9s pour l\u2019acc\u00e8s MCP<\/strong> : en production, cr\u00e9e un user\/role sp\u00e9cifique avec des droits limit\u00e9s. N\u2019expose pas des Abilities puissantes \u00e0 des clients IA non auditables.<\/li>\n\n\n<li><strong>Privil\u00e9gie le read-only pour les endpoints MCP publics<\/strong> : si tu exposes du HTTP sur Internet, reste d\u2019abord sur du diagnostic, du reporting et de l\u2019acc\u00e8s contenu en lecture.<\/li>\n\n\n<li><strong>Authentification sur mesure si n\u00e9cessaire<\/strong> : le mode par d\u00e9faut passe par les application passwords, mais tu peux impl\u00e9menter OAuth ou un autre sch\u00e9ma pour durcir la s\u00e9curit\u00e9.<\/li>\n\n\n<li><strong>Surveille et journalise l\u2019usage<\/strong> : exploite des handlers d\u2019erreur et d\u2019observabilit\u00e9 personnalis\u00e9s pour brancher ton stack de logs\/monitoring.<\/li>\n\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">D\u00e9marrer aujourd\u2019hui : le chemin \u201chello IA\u201d minimal<\/h2>\n\n\n\n<p>Pour exp\u00e9rimenter sans se perdre : le minimum c\u00f4t\u00e9 dev WordPress consiste \u00e0 (1) enregistrer une Ability, (2) ajouter\/initialiser le MCP Adapter, (3) connecter un client IA compatible MCP.<\/p>\n\n\n\n<p>Si tu as d\u00e9j\u00e0 des plugins bas\u00e9s sur l\u2019Abilities API, l\u2019adapter transforme ces Abilities en <strong>API pr\u00eates pour des agents IA<\/strong> avec tr\u00e8s peu d\u2019effort additionnel. La strat\u00e9gie la plus saine : commencer petit, exposer d\u2019abord quelques Abilities non destructrices et en lecture seule, tester en local (Claude Desktop, Cursor), puis \u00e9largir progressivement vers des workflows plus ambitieux.<\/p>\n\n\n\n<p>Pour aller plus loin : documentation Abilities API <a href=\"https:\/\/developer.wordpress.org\/apis\/abilities\/\">https:\/\/developer.wordpress.org\/apis\/abilities\/<\/a> et d\u00e9p\u00f4t du 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>R\u00e9f\u00e9rences \/ Sources<\/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: Intro<\/a><\/li><li><a href=\"https:\/\/modelcontextprotocol.io\/docs\/learn\/architecture#primitives\" target=\"_blank\" rel=\"noopener noreferrer\">Model Context Protocol: Architecture (Primitives &amp; Transport Layer)<\/a><\/li><li><a href=\"https:\/\/modelcontextprotocol.io\/docs\/learn\/architecture#transport-layer\" target=\"_blank\" rel=\"noopener noreferrer\">Model Context Protocol: 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:\/\/github.com\/WordPress\/mcp-adapter\" target=\"_blank\" rel=\"noopener noreferrer\">MCP Adapter GitHub repository<\/a><\/li><li><a href=\"https:\/\/github.com\/WordPress\/mcp-adapter\/releases\" target=\"_blank\" rel=\"noopener noreferrer\">MCP Adapter Releases<\/a><\/li><li><a href=\"https:\/\/www.npmjs.com\/package\/@automattic\/mcp-wordpress-remote\" target=\"_blank\" rel=\"noopener noreferrer\">@automattic\/mcp-wordpress-remote<\/a><\/li><li><a href=\"https:\/\/github.com\/Automattic\/mcp-wordpress-remote\/blob\/trunk\/Docs\/troubleshooting.md\" target=\"_blank\" rel=\"noopener noreferrer\">mcp-wordpress-remote troubleshooting<\/a><\/li><li><a href=\"https:\/\/wp-cli.org\/\" target=\"_blank\" rel=\"noopener noreferrer\">WP-CLI<\/a><\/li><li><a href=\"https:\/\/make.wordpress.org\/core\/2020\/11\/05\/application-passwords-integration-guide\/\" target=\"_blank\" rel=\"noopener noreferrer\">Application Passwords Integration Guide<\/a><\/li><li><a href=\"https:\/\/code.visualstudio.com\/docs\/copilot\/customization\/mcp-servers\" target=\"_blank\" rel=\"noopener noreferrer\">VS Code MCP servers documentation<\/a><\/li><li><a href=\"https:\/\/github.com\/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><li><a href=\"https:\/\/engineering.block.xyz\/blog\/build-mcp-tools-like-ogres-with-layers\" target=\"_blank\" rel=\"noopener noreferrer\">Build MCP tools like ogres with layers<\/a><\/li><\/ul>\n            <\/div>","protected":false},"excerpt":{"rendered":"<p>Les Abilities de WordPress 6.9 posent les bases d\u2019une API fonctionnelle typ\u00e9e et ex\u00e9cutable. Avec le WordPress MCP Adapter, tu peux les exposer comme des outils MCP pour que des clients IA (Claude, Cursor, VS Code\u2026) les d\u00e9couvrent et les invoquent en toute logique.<\/p>\n","protected":false},"author":12,"featured_media":256,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[63],"tags":[29,44,12,10],"class_list":["post-261","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ecosysteme-wordpress","tag-api","tag-ia","tag-plugins","tag-wordpress"],"_links":{"self":[{"href":"https:\/\/helloblog.io\/fr\/wp-json\/wp\/v2\/posts\/261","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/helloblog.io\/fr\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/helloblog.io\/fr\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/helloblog.io\/fr\/wp-json\/wp\/v2\/users\/12"}],"replies":[{"embeddable":true,"href":"https:\/\/helloblog.io\/fr\/wp-json\/wp\/v2\/comments?post=261"}],"version-history":[{"count":0,"href":"https:\/\/helloblog.io\/fr\/wp-json\/wp\/v2\/posts\/261\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/helloblog.io\/fr\/wp-json\/wp\/v2\/media\/256"}],"wp:attachment":[{"href":"https:\/\/helloblog.io\/fr\/wp-json\/wp\/v2\/media?parent=261"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/helloblog.io\/fr\/wp-json\/wp\/v2\/categories?post=261"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/helloblog.io\/fr\/wp-json\/wp\/v2\/tags?post=261"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}