WCUS Prep: MCP Adapter and Abilities API ![rw-book-cover](https://i.ytimg.com/vi/P2Ti-GZ7Y-U/maxresdefault.jpg) ## Metadata - Author: [[Jonathan Bossenger]] - Full Title: WCUS Prep: MCP Adapter and Abilities API - Category: #articles - Document Note: --- tags: [Assign relevant tags or keywords to the notee to facilitate organization and retrieval. Add a # before each tag. Tags cannot have special characters. Do not use the tag #articles] - #wordpress - #mcp - #abilitiesapi - #restapi - #composer - #workshop Author: Jonathan Bossenger Source: YouTube Livestream (Jonathan Bossenger) Reference: https://www.youtube.com/watch?v=P2Ti-GZ7Y-U date created: 2025-08-18 12:48 --- # Title: WCUS Prep — MCP Adapter + Abilities API (WordPress) ## 🧭 Table of Contents: - [📝 Summary](#-summary) - [📖 Main Content](#-main-content) - [🧩 Context & Goals](#-context--goals) - [🛠️ Abilities-API Primer](#️-abilities-api-primer) - [🔌 MCP Adapter & Server Setup](#-mcp-adapter--server-setup) - [🧪 Demo & Troubleshooting](#-demo--troubleshooting) - [🗒️ Notes](#️-notes) - [📖 References](#-references-1) - [🗣️ Paraphrase](#️-paraphrase) - [📰 Newsletter](#-newsletter) - [✅ Action Items](#-action-items) - [🧪 Hypotheses](#-hypotheses) - [📊 Methodology](#-methodology) - [❓ Questions](#-questions) - [🔮 Future Research](#-future-research) - [💡 Implications](#-implications) - [🧠 Learning Styles Assessment](#-learning-styles-assessment) - [📊 Accessibility Assessment](#-accessibility-assessment) - [🌍 DEIB Assessment](#-deib-assessment) - [✅ Logical validity + Tone](#-logical-validity--tone) - [🛡️ DARVO Analysis](#️-darvo-analysis) - [🔍 SEO Evaluation](#-seo-evaluation) - [🎯 Conclusion](#-conclusion) ### 📚 References: Include a list of sources consulted and cited in the article. - 🎥 Video: https://www.youtube.com/watch?v=P2Ti-GZ7Y-U - 📘 WP REST API Handbook: https://developer.wordpress.org/rest-api/ - 🧩 WP Plugin Handbook (structuring plugins): https://developer.wordpress.org/plugins/ *(External docs for background context; the core facts below cite the video timestamps.)* --- ## 📝 Summary: The livestream previews a **WordCamp US** workshop showing how to connect a local WordPress site to **Model Context Protocol (MCP)** using a new **WordPress MCP Adapter** and the emerging **Abilities API**. Jonathan walks through installing the Abilities API as a plugin, registering a custom ability, spinning up an **MCP server** in a custom plugin, and wiring clients (e.g., VS Code) to call WordPress “abilities” as MCP tools. He covers **Composer** requirements, **application passwords**, **NVM/NPX path gotchas**, and **local SSL** quirks. A working test fetches the first 10 URLs from the local site via the exposed ability. --- ## 📖 Main Content: ### 🧩 Context & Goals - 🔗 **Workshop aim**: connect local WordPress ↔ MCP, showcase **Abilities API** as the registry/executor for actions. ([03:06–05:01](https://www.youtube.com/watch?v=P2Ti-GZ7Y-U&t=186)) - 🆕 **MCP adapter status**: first stable version committed “this week.” ([03:56–04:13](https://www.youtube.com/watch?v=P2Ti-GZ7Y-U&t=236)) - 🎯 **Session goal**: update existing “List URLs” plugin to the Abilities API and prove MCP end-to-end. ([06:18–07:08](https://www.youtube.com/watch?v=P2Ti-GZ7Y-U&t=378)) ### 🛠️ Abilities-API Primer - 🧠 **Why**: WordPress lacked a structured registry for “abilities” usable by PHP, REST, and AI tooling. ([12:23–13:16](https://www.youtube.com/watch?v=P2Ti-GZ7Y-U&t=743)) - 🧰 **What it provides**: register, list, and **execute** named abilities with **input/output schemas** and **permission callbacks**—plus **built-in REST** routes to run them. ([12:59–14:13](https://www.youtube.com/watch?v=P2Ti-GZ7Y-U&t=779)) - 🔁 **API shift**: older “Feature API” → new **Abilities API**; use `label`, `description`, `input_schema`, `output_schema`, `execute_callback`, `permission_callback`. No more “type.” ([22:15–23:08](https://www.youtube.com/watch?v=P2Ti-GZ7Y-U&t=1335)) ### 🔌 MCP Adapter & Server Setup - 🧩 **Custom plugin** hosts an **MCP server**: define server ID, namespace, routes; list abilities to expose as MCP tools. ([31:36–33:32](https://www.youtube.com/watch?v=P2Ti-GZ7Y-U&t=1896), [44:40–45:31](https://www.youtube.com/watch?v=P2Ti-GZ7Y-U&t=2680)) - 📦 **Composer** needed when installing via package; manual copy still needs vendor deps (autoload). Include `vendor/autoload.php`. ([47:52–49:13](https://www.youtube.com/watch?v=P2Ti-GZ7Y-U&t=2872)) - 🔐 **Auth**: use **Application Passwords** for now. ([47:52–48:10](https://www.youtube.com/watch?v=P2Ti-GZ7Y-U&t=2872)) - 🧭 **VS Code config**: workspace `mcp.json` with server command (often `npx`), API URL, username, application password, optional log path. Use **full NPX path** if NVM makes trouble. ([56:31–57:29](https://www.youtube.com/watch?v=P2Ti-GZ7Y-U&t=3391)) ### 🧪 Demo & Troubleshooting - 🧪 **Test**: ask client to fetch “first 10 URLs” via the registered ability; success after giving the server a **clear name** recognizable to the client. ([59:37–61:44](https://www.youtube.com/watch?v=P2Ti-GZ7Y-U&t=3577)) - 🔒 **Local SSL**: add “allow insecure local certs” flag in MCP config when using self-signed dev certs. ([58:38–59:37](https://www.youtube.com/watch?v=P2Ti-GZ7Y-U&t=3518)) - 🔚 **Wrap-up**: next steps include slides and more examples. ([67:00–end](https://www.youtube.com/watch?v=P2Ti-GZ7Y-U&t=4020)) --- ### 🗒️ Notes - 🏁 **Kickoff** ([02:22–03:08](https://www.youtube.com/watch?v=P2Ti-GZ7Y-U&t=142)) - 🎙️ *Context*: Early stream; preparing for **WordCamp US** workshop. - 🧭 *Plan*: Connect local WP → **MCP**, wire **Abilities API**, integrate with editors. - 🆕 **MCP adapter first stable** ([03:56–04:13](https://www.youtube.com/watch?v=P2Ti-GZ7Y-U&t=236)) - 🚀 *Status*: Committed “this week.” Canonical plugin for WP MCP integration. - 📦 *Access*: Repo available; testing and README fixes underway. - 🧩 **Abilities API rationale** ([12:23–14:13](https://www.youtube.com/watch?v=P2Ti-GZ7Y-U&t=743)) - 🧠 *Need*: Central registry of capabilities for PHP/REST/AI. - 🧰 *Run via REST*: `/wp-json/wp/v2/abilities` list; “run” endpoint executes callbacks. - 🔐 *Auth*: Requires authenticated user (e.g., Application Passwords). - 🔁 **From Features → Abilities** ([22:15–24:56](https://www.youtube.com/watch?v=P2Ti-GZ7Y-U&t=1335)) - 🧾 *Schema*: `label`, `description`, `input_schema`, `output_schema`, `execute_callback`, `permission_callback`, `meta`. - ✏️ *API diffs*: No “type”; `execute_callback` naming; ordered arrays for readability. - 🔌 **Registering an ability** ([26:01–27:05](https://www.youtube.com/watch?v=P2Ti-GZ7Y-U&t=1561)) - 🛎️ *Hook*: Register on `abilities_api_init`. - 🧪 *Example*: “List URLs” ability accepts `post_type` + `limit`, returns array. - 🧱 **Building the MCP server plugin** ([31:36–33:32](https://www.youtube.com/watch?v=P2Ti-GZ7Y-U&t=1896)) - 🧩 *Plugin header*: Standard WP plugin bootstrap. - ⚙️ *Config*: Server ID, namespace (`ai-experiments`), REST transport, version. - 📦 **Composer vs manual** ([34:55–36:02](https://www.youtube.com/watch?v=P2Ti-GZ7Y-U&t=2095), [47:52–49:13](https://www.youtube.com/watch?v=P2Ti-GZ7Y-U&t=2872)) - 🧷 *Reality*: Manual copy still needs dependencies → run Composer to build `vendor/`. - 🔗 *Fix*: `require __DIR__.'/vendor/autoload.php';` - 🖥️ **Client configuration (VS Code)** ([56:31–57:29](https://www.youtube.com/watch?v=P2Ti-GZ7Y-U&t=3391)) - 🧭 *mcp.json*: `servers[]` with command, args, env (API URL, username, app password). - 🛣️ *NVM tip*: Use full path to **npx**. - 🧪 *Logging*: Set `LOG_DIR` to plugin path for debugging. - 🔒 **Local SSL tip** ([58:38–59:37](https://www.youtube.com/watch?v=P2Ti-GZ7Y-U&t=3518)) - 🧪 *Flag*: Allow self-signed certs for dev environments in the MCP client config. - ✅ **Working run** ([59:37–61:44](https://www.youtube.com/watch?v=P2Ti-GZ7Y-U&t=3577)) - 🌐 *Request*: “Fetch first 10 URLs.” - 🧭 *Gotcha*: Clear **server name** helps the client resolve the right tools. - 📈 *Outcome*: Tool returns the expected list. - 🧾 **Close** ([67:00–end](https://www.youtube.com/watch?v=P2Ti-GZ7Y-U&t=4020)) - 🧰 *Next*: Slides, more examples; possibly Composer guidance for workshop. --- ## 📖 References: - 🎥 **Primary**: *WCUS Prep: MCP Adapter and Abilities API* — https://www.youtube.com/watch?v=P2Ti-GZ7Y-U - 📘 **Background**: WP REST API — ht - Summary: Exploring WordPress MCP Adapter and Abilities API - #WCUS Workshop Preparation In this live stream, I'm preparing for my WordCamp US workshop by delving into setting up a local WordPress install, exploring the new Model Context Protocol (MCP) adapter, and configuring the Abilities API. The session includes hands-on steps for installing and troubleshooting the MCP adapter via Composer, and how to incorporate it into VS Code. Additionally, I take a look at issues related to installation methods and discuss potential improvements. This video is especially useful for developers interested in integrating AI functionalities with WordPress. 00:00 Stream Kickoff and Introduction 03:01 Exciting News: WordCamp US Workshop 03:49 Setting Up the MCP Adapter 04:54 Diving into the Abilities API 05:48 Hands-On with WordPress Plugins 08:18 Creating a Local WordPress Install 11:07 Exploring the Abilities API Code 14:21 Updating the List URLs Plugin 16:18 Registering and Testing Abilities 30:16 Setting Up the MCP Adapter Plugin 33:20 Checking Composer Support 33:59 PHP Issues and Fixes 37:27 Manual Installation Approach 38:22 Setting Up MCP Adapter 52:08 Configuring VS Code 58:32 Troubleshooting and Final Thoughts 01:06:56 Wrapping Up the Stream Connect: https://www.twitch.tv/jonathanbossenger https://bsky.app/profile/jonathanbossenger.com https://twitter.com/jon_bossenger https://www.linkedin.com/in/jonathanbossenger/ Credits: Music provided by Bass Rebels https://www.bassrebels.co.uk #wordpress #coding #ai - URL: https://www.youtube.com/watch?v=P2Ti-GZ7Y-U It’s Friday. I’m streaming an hour early this week again.So if you are joining me today, welcome. If you’re catching this on YouTube, welcome.There doesn’t seem to be anybody in the chat yet, so that’s fine. We’ll get there.What am I streaming today? If you didn’t know, I’m going to be speaking at WordCampUS this year.I’m quite excited about that. It’s my first time attending WordCampUS, and I’m going to bepresenting a workshop on essentially all the stuff I’ve been fiddling with for the last few months.So, hooking up a local WordPress install to model context protocol, or at least enablingmodel context protocol. The transcription service is going to have fun with that sentence.Connecting the abilities API and then hooking it all up to something like COSA or VS Code,or whatever the case may be. So the reason I’m doing this today and not weeks ago is because thefirst stable version of the MCP adapter literally was committed this week.It was two days ago, and I tested it yesterday.I fixed the issue in the README, and it’s now available as a composer package, possibly.Maybe not; I’m not sure.But it’s there.You can access it.You can go to github.com/wordpress/mcpadapter,and it’s there.This is going to be the canonical plug-in,if you will, version of the MCP adapter for WordPress.It’s one of the four building blocks of forward press that the AI team is going to be working on.It forms the foundation of what my workshop is about,one of the parts of my workshop.The other part is the Abilities API.The Abilities API started being publicly availablealso around two days ago.The code was there for a while.The initial pull request was created. See here.See if I can find the date this pull request was created.Last week, because it was about a week ago, this was created.A bunch of things were merged recently,one of which was thatthis is currently available on GitHub as a plugin; you can just install it as a plugin.It will eventually also become a Composer packageand NPM package, but for now you can use it as a plugin. So essentially this is the stuff that I’ll be presenting in my workshop.And so I want to read it, my thing.I want to kind of just work through it today, see how it all works, figure out what it does.I experimented with it a little bit yesterday just to kind of get the basics working.But today I want to put together something that is more functional. So what I’m going to do is set this all up and thenI’m going to update the List URLs plugin.In List URLs, a while ago I added feature API support,which I will now need to change to Abilities API support, which is great because now it’s all there.So I’ll basically just update this functionality here to support features,connect it to VS Code, and make sure it all works.So that’s the goal for today. And I’m going to be taking extensive notes along the wayin my little stream notes doc so that I can prepare for my workshop.So that will be the goal for today.In fact, I think what I’m going to do is create a separatenotes document for the workshop.And then I’ll use that to get where I need to go.Yeah, there we go. WC, here are the workshop notes.And let’s just plug these in here.There we go.Okay.So first things first, let’s create a local WordPress install. I'm just going to use Studio for this.I was just going to call this AI experiments.There's one other thing I want to do.Okay. Oh, Blast. I wanted this to have a local URL and enable SSH. Do I need SSH?Yeah, I'm going to leave SSH on, and I'll show you in a second why. Alright, so there is my site. The first thing I'm going to do is install the Abilities API.Currently, that is just a plugin.There are no installation steps yet because the goal is to eventually make this available as a Composer package.However, there is a plugin entry point that essentially just enables this as a plugin and then requires all the code.So that's what I'm going to do.I'm going to clone this. Let's open up that site.And while it's doing that, let's clone.Okay, so that's done its thing.Let's just go into the Abilities API.That's the ability class, and its registry, its API, and then rest controls. Okay. So these are all in the includes.This is all very WordPress.This basically creates the sort of core API function. The ability we’ll be using needs to be registered insidethe Ability API in its hook.So that’s great.It then also allows you to unregister the abilityto get the ability.This is sort of a core API functionality,and it then uses various other things,which I’m not going to worry too much about now.I just want to check what the REST API does.There’s a run controller and a list controller.The run controller is WPV2 abilities. You can run an ability from here,which I’m guessing will essentially get the abilityand then execute it, yeah, execute it.That’s cool.So what’s important about this,and if you are watching this later,I wrote a blog post about the Abilities APIon my personal site,which you can find at jrthbuzzard.com,the WordPress Abilities API.I talk about the fact that while developingthe Model Context Protocol support for WordPress,the core project realized that there’s nostructured registry of WordPress core abilities.So the Abilities API was developedas a way to expose core abilitiesto be used on the PHP side and on the client side.In your PHP code, you could simply call...There is no... So if a plugin registers an ability, you can somewhere else,call getAbility, and then you can just execute the abilityand it'll run whatever the code does.What the REST API ability is, is it essentially allows you to run that from a REST API endpoint. So what that meansis if you want to add functionality to a WordPress install via your plugin, you don't have to goand create a separate REST API endpoint. There's built-in REST API support for your ability. SoI'll dive into that in a second. It's kind of useful for the AI stuff, but also just usefulfor WordPress development in general. It's a good idea to check this out and get an understandingof how it works. I'll show you a bit of what that does. Then there's also the listcontroller, which obviously just lists the abilities. So we can have a look at those in a second.Okay, so that's essentially what I need to worry about all in there. So let us go and install my plugin. Use list URLs. Now I should just be able to updatethe feature registration to support abilities because the code is practically the same.So let's see if that is indeed the case. Check branches. I don't think I've mergedthat in. I was going to merge it in.Yeah, it's already been merged; I don't know why I have those branches out there, but okay.So let's just clone this code.In fact, I think this is even in the version of the Blaggen Reaper. All right.I don't have my local repository.OK, let's open up this.I'm going to close down all this WordCamp stuff.OK, so let's go to plugins.Let's go to URLs there.So let's activate—OK, let's do this. Going to enable debugging.Going to run my little debug app.Okay, so that should enable debugging.Yeah, all good. Okay, so that's open so I can see if anything goes wrong. So I should just be able to activate the Abilities API; there should be no issues there. Great.Let's have a look at the REST API endpoints for that. So let's go...Make my life easier and set a permalink structure.Let's go WP.js.WPV2.Here we go.So there's the abilities.Great.So if we just go WPV to abilities,you're not allowed to do that.Oh, okay, so you need to have... Maybe it's because there are no abilities set yet.Let's see, is it a curious?Yes.AbilitiesList.pv2.apilities.Get permissions callback.What kind of user can read?Yeah, so it looks like I need to be an authenticated user.So let's go with Postman for that, and we'll set up an authenticated user.I don't...Oh, I do have an account.I'll just sign into my account quickly.I think I might already be signed in.Yeah, hold tight.I like password apps because you can't see my password when I sign in.Okay, that's good.So, I tested this yesterday, but I'm going to...Okay, so let's...I did this on another machine yesterday, so let's get this.So it's an experiment still if you look over. This is a completely different URL.Let me delete that one.So, get abilities.Okay, and then we're going to need an application password.So let’s create one for my user.Okay.It’s basically admin and password.Let’s see if this works.Okay.So that makes sense.There are no abilities yet.So that’s cool.Okay.So at least the recipe Ionpoint works.I need to be authenticated to be able to see it.Perfect.So that’s all good.Okay.So now let me update my plugin.So if I go into the still URLs, theoretically,I should be able to because the Abilities API is essentiallythe feature API with just feature replaced with ability.Core functionality, as far as I know, still works.So it should be a case of WPRegisterAbility.That should work.And then this will probably be WP\_Pobility.No, maybe not.I wonder if it’s the other one that came up.Okay, let’s have a look.I think I saw it in the REST API stuff. That's a REST server.Okay, let's go and look for the resource enum.Maybe it's called something else.Okay, here we go.Limit to PHP.Let's make it case sensitive.Oh, it doesn't seem to exist anymore.Okay.So this thing does have some tests.So let's see what we can find in the tests.Label description, input schema, output schema, exit callback, mission callback. Oh, it doesn't seem to have—OK, that makes sense.Applethees don't have a type because when the AppletheesAPI was created, it was kind of created to solve an AI problem.But now it's been created to solve a different problem,a similar-ish problem.But I don't think they have a type anymore.So it has a label, description, input schema,the same as before, output schema, executecallback, and permission callback.Permission callback.OK, so this is called execute callback now.So that's a slight difference.Permission callback remains the same.Output schema remains the same.Input schema is probably the same, hopefully.OK, so that should all work.Registability.Regitability ID and array of properties. This one is— ah, that's another thing that's different.ID— let’s just go back to the Regitability.It's the name and then properties.Let’s go into that.The name and then the array of properties.OK, so that's the other slight difference.For this.This is actually quite a bit different.So let’s just go here.So that goes there.And then the array property starts. I like to have these things.Or not the other.OK, so it's the name of the ability.And then label, description, input, output, execute, permission, and meta.So that's label. Okay, so this has changed quite a bit, but I mean, it's just properties in thein the array: label, description, input, output.Okay, change the code. Paul is suggesting some fixes for me, so let’s go with those.Based on this,I’ve got some extra...brackets somewhere.Lost my screen for some reason.Okay.And then this can get tabbed a bit better.Okay, there we go.So it has the name property.And then an associative array: label, description.I don’t need that.Label, description, input, output, label, description, output, input,OK. Exit callback, permission callback, and better. Exit callback, okay.So I’m going to move these around because I like to have these things in the same order. I’m weird that way.Label description input.I’ll put execute permission.Execute permission.Okay.It doesn’t make a difference in the grand scheme of things.It’s an array of properties.So as long as the keys are right, it’ll work.But that should do it.So we send the post type and a limit.That was all the same.Okay, so not too many changes. The other thing that I want to dois I need to register this.I need to register this in the right place.Oh no, these are all the tests.I don’t want to be here.It should be done on the AbilitiesIn API.So register the plugins feature using the Visual API.On the Abilities API, register a list of all abilities. Can I spell?There is only one ability, so that’s fine.Then the mission callback is what goes there.It sends the type of the post and it uses generate.That’s fine.Okay.So that’s all good.I probably could have used AI to do this.I just wanted to do it myself to understand. Okay.So what I'm going to do now is pop this in a branch somewhere.Okay.Now, the other thing that I want to do is I want to...Okay, it's using the sPluginAct to feature API.So I don't want to use that.I want to do something like if function exists,because this is not going to be a plugin eventually.It's going to be a composer package or a way to do it,whatever the case is.No, that's not what I want.Repress.The TAPI is available.All right. I'm hungry and my lunch is sitting right here, so I'm going to grab a bite quickly.Before I... actually, while we're doing that, let's see if the ability is registered.Oh wait, I need to activate my plugin.No errors.And my ability is excellent. Okay, time for a bite. Okay, for now that my ability is there, now I can install and set up the MCP adapter.Now, because this is a Composer package,I need to use Composer and install it into a plugin.There is a manual installation option, which we can do.But then, essentially, you use the adapterto set up the MCP server configuration,and then you create an MCP serverwith all the information you need.You then also add your abilities to the MCP server instance.Now what's cool about this is you could have,As far as I understand,you could have multiple MCP server plugins configuredon a WordPress site with different abilities. So you could, for example, createa development plugin that you use for development,and then you can create a production pluginthat you use for production,and it exposes different abilities via MCP.So that's kind of cool.It's a little bit more work, but it's kind of cool. There is an example plugin thatI hope I'm not going to mispronounce his name,but it's OVDU.I know it was OV; it's one of my colleagues at work.That is Slackman.There is an example implementation that OV created,which shows you how you can set all this up. So I could, for example, just install this plugin,and then I'll have whatever MCP servers or abilitiesor whatever OVs used.But I want one specifically for my environment.So let us create a plugin.So I'm going to call it—Excuse me.The AI experiments MCP server. And inside of that, I'm going to create a new plugin file.And this is just going to have default plugin header stuff.I don't care about the URI.Multi-channel processing, no. Model context protocol.I should give it a version. OK, that's fine.So now I can't have co-pilot defaults to 010.I'm going to go 0, 0, 1.OK.Yeah, let's do the usual HIPAAspot stuff.That's fine.No problem with that.OK.So now, with that in place—I'm going to see if the composer support for this plugin is there.Now, when I tested this yesterday, it wasn't quite there yet.I had to do this manually, but I'm just going to see if it's available.I know that OV is working on it.If it's not available, that's fine.Now, I don't want to mark.If it's not available, then I will just—Wait, I need to compose around it first.Did I just break my PHP?Oh, good grief.\*sigh\*I was not expecting that.I was fiddling around with Laravel Valet a while back.I don't know.Please send me PHP broken.Okay, PHP is working.Okay.Let's try Composer install again.Composer init.Oh, thank goodness.That was quick and easy at least. Yeah, that's fine.I'm going to go back to theIt's fine, that's fine.I don't care about that.Let's go WordPress plugin.GPR, oh, what?(indistinct)It's all right.Nope, nope, nope.That's fine.Okay.Now let's see if we can composeor require WordPress.I don't think it's there yet.Yeah, I didn't think so.Okay, so it's not there.So that's fine because what's cool is in OV's packagein this plugin example,he actually has the code to set it up from GitHub.So essentially, what it takes is adding these repositories. Shoot, I just realized people coming into this thingmight need composer install, unless we go the manual route.Let me see how the manual route works.I haven't tested that out yet.So the way to do it, if you want to go via composers,you add the repositories and then you requirethe WordPress MCB adapter.But let's do the...Hmm, just realized composer will be required for this.I think I want to do the manual route for now because it doesn't require composer. It's just easier.So let's delete this.I can't guarantee that everybody there will haveComposer installed, so let's do it this way.Okay, that gives us all of that.So there's the MCP adapter.So now, if we use the Jetpack Autoloader that is bundled with this,why did that jump?Good grief.Okay, so if that is at WP content, love MCP adapter.That's nothing, that's nothing, comparison.Okay.[Sigh]Yeah.That comes legit back on the letter.So this still requires Composer.So I'm going to make a note of this.And then I need to do one of two things.I'm either going to need to help peoplewith installing Composer at the workshop,which is not great.Or I'm going to have to find another wayto get this installed without Composer.So what I can do is ask the workshop folksto have Composer installed.But I will feed this back to Oviand see what he thinks.Anyway, for now, let's delete this.Let's go.Let's do our experiments. Content plugins.See here, experiment.Let's go to Poser, and it's again.Yeah.GPL 2.0 or later.No, no, no. Yes, okay, that's fine.I'll just go back to the main page.So now let's go and add this.So essentially, you add the repositories, so it'll pick up the mcpAdapter,and then you say require the mcpAdapter,and it will then pick up everything else it needs. So, I go "Composer install" here.That's fine.So that does everything I need,and you'll see it has added the JPEG-1 loader,which is now part of all the vendor stuff.So that works.Then the way to do this is to initialize the adapter.Yeah, so I'm just going to go right at the top of the file.I prefer to top my plugins.Get the adapter instance, hook into the initialization, and then the server config happens there.The server config looks something like this.There we go. I tend to be a fan of the long array syntax.So I'm going to just do that here.It's just a personal preference.I'm going to leave the resources and prompts out for now.The thing I like to do is I like to, you'll notice that these things are kind ofgrayed out PHP Sports, so basically it says you can replace the qualifier with animport, so I like to do that. It's not necessary. I just think it makes the code. It's easier to read personally, and it sticks all the imports at the top here. Okay, somy server ID is going to be AI experiment server.It's going to be server.Apparently, I can't spell "experiments" correctly.So I'm going to copy this into my clipboard.My namespace is going to be AI experiments; my REST route is going to be MCP, my AI experimentsmcpserver. I'm just going to give it the same description. Version one is fine. It uses theREST transport class error handler, and all that. It just uses all the default stuff, so that'sfine. I'm going to leave these comments here because it makes my life easier. Okay, and then what I can do is I can grab my ability and I can stick it in the listof abilities to expose,and then this will automatically adapt those abilities into MCP tools.Okay, so that's theoretically all that's needed.The permission callback is handled by the ability.So in this case, I've set it to just return true,but I could obviously configure that to be more defined.So that's why the MCP server doesn't have to worry about.Currently, the MCP servers are still using application passwords.That might change in the future,but that's fine because we've really set up an application password. So that's theoretically all that's needed to get all this configured and working.So if I go to my plugins,I should now have the experiment survey. If I activate that, it shouldnot break, but it broke. Uncaught error class that it did not find.Okay.I forgot the other thing that is needed.I probably should suggest this as a fixbecause once Compose is installed,I need to includethe vendor autoloader. So let's actually move thisto hereand let's go requirethat one.And I'm going to add that to the readme.Suppose that Ovi is doing it.He's mapping.He's using the PSR4 autoload mapping.So that's one way to do it.So maybe I don't need to add that.I just need to remember it.That's why I'm building this, so that I remember.OK, so let's try that again.Much better.No more bugs.That's good.OK, so now to check this, there is nowthe AI experiments namespace.Oh, hang on. I'm using.No, I'm not using the same namespace.That's fine. Okay.So if I go to,maybe just on P2,there will now be a bunch of additional namespaces.If I go AI experiments, which I again can't spell, I think it's just AI experiments,Oh wait, it's not in the... sorry, it's not WPV2, that's what I'm doing wrong.That might need to change.Why is it doing that?Oh no, it's WPJSON, AI experiments, MCP.Why is it searching for that? Stop being stupid.There.That's better. There we go. And then there's MCP. So that's all working. So that's how Ican check the MCP servers are working and it's all doing its thing. Okay. So then now I can connectthis to cursor, Claude, whatever the case, I'll be. So to do that, I'm going to connectmine to VS Code, because VS Code is just slightly different.I'm going to close this.Going to open my experiments site.OK.And then I can never remember how to find the damn MCPconfiguration in VS Code. So...There is a global MCP, but VS Code for some reason doesn't.It goes through commands; there's no like menu for it.No, is that what I want? Yes.No, that's not what I want. Or it can be.I think this is the global...cpd......ad server.(sighing)What I'm going to do is I'm going to do this in a workspace.So let's go.So it's .vscode mcp.jo-sum..vscode.I do find cursor is better.All of that. Anyway. Okay, so...It's just servers. Okay. Make an example of the configuration, which is essentially thesame as what it was previously. Yeah, so it's this kind of thing. Any differences in VS code?It's the word servers. Okay, so let's do that. Let's go servers. Okay, so we can give itthe same name. Alright, so a couple of things.I tend to use the full path to NBX,just because of NVM being terrible.So that’s what I want.There’s a bug in the MCPC implementationwhere if you’re running NVM and you have multiple versionsof NBX installed, it’ll just find the first one on the list.And that might be an old one, which is terrible.Okay, that all stays the same. This becomes the API URL. So that’s essentiallyit uses that to discover tools and things. Use the same username and password so we cangrab the... oh, did I copy it? I didn’t copy it. Wait, where did I use it? I used it inPostman, that’s right. So we can just copy it out a bit. Cation password, and then I see what I tend to do is I tend to get the path tothe MCP server plugin and I pop that in there as a log. Just so I can see what’shappening.And then the last thing I’m going to do, just because I know this, because I discovered this recently, so I might need to add this to the troubleshooting for the MCP adapter.There is an issue with local SSL certificates. And if you have a local, let me find it quickly.I recently added a troubleshooting guide to the docs.So there’s the NBX stuff.I think I must try and get all of these over to the adapter.Here’s all the information about the local environment. So you need to add this to your configurationif you’re using SSR, which I’m doing in this case.And then if you do that, it all works.OK, so this should work now.And I should see a tool if this all works correctly. OK, there’s a tool.It doesn’t give me a list of what tools, which would be nice.But anyway, let’s see what co-pilot can do for me. So let's close that and that.And then let's say, can you fetch the first 10 URLs from my local WordPress site?Now it should detect the tool.Okay, let's try it this way.Can you...Does it have the tools available?Let's change this to WordPress.I just make it WordPress.local.That might be why it's a problem.Okay, let's try that again.Can you fetch the first 10 URLs from my local WordPress site? Here we go.Okay, so I needed to give it a better server name,so it knew where to look.That's fine.That's good. There we go.There's only one, which is fine, but that's all that works.(laughs)Okay, that's kind of cool.I like that.So I built a version of this yesterday.I'm gonna delete that version.So let's just go here, GitHub.Let's just go to ix.I bought it yesterday.It's essentially the same code. It's got the vendor autolab.Okay, there's some better checkingand stuff. It actually registers the ability in the plugin and then initializes all ofthis stuff. So that's fine. I'm just going to make a note in my notes about when addingthe mcpserver2.js code. Make sure to give it a logical name. It's probablybecause I didn't have the word WordPress in there. It didn't get it from there. Cool. So I think I'm going to log an issue.I don't know if it's valid. I think I'll log it anyway.Okay, maybe we should adapt to issues.Manual installation still requires Composer.So let's tell this.I should get the link for the manual installation method.Checking something here...It's possible to use the code without needing Composer.However, installing the dependencies to the vendor folder requires the use of Composer.If we offer a manual method...(sighs)Okay, I'm going to just leave that as a thing there. I'll share this with Ovi after the stream. But that’s that. I'm going to call it there. This is going to be a short stream today.Nobody's watching. I don't know where everybody is today.So, and I've got stuff I need to do later.So I'm going to call that today.I'm pretty happy with where I got with all of that.I sort of understand how it all works together.Given it a good test, I'm hoping that something can be figured out before my workshop.Otherwise, I'm going to have a problem with folks and Composer.I'll figure that one out.But yeah, it all works.It all does what it needs to do.So next week, I'm going to be doing a lot more slide prepand working out what I can also build with this.But yeah, excited to see where this goes.So you're not watching this live because there's nobody in the chat, so I will say cheerio. If you're watching this on YouTube,I’ll see you next week., WCUS Prep: MCP Adapter and Abilities API, Jonathan Bossenger, 01k2z1gxm7fexsx460r5vth9by.