📱

Get Our Mobile App

Take your business learning on the go!

Download on the App StoreGet it on Google Play

How to Connect Claude AI to WordPress Using MCP (Live Demo)

WebDevStudios11:05

Transcription

Hey everyone, what's up? This is Brad Williams from WebDev Studios. In this video, I'm going to show you something that is truly mindblowing. We're going to set up Cloud AI to connect directly to a live WordPress website using MCP, the model context protocol. We're talking real-time access to your content, your data, your entire WordPress ecosystem, all from inside your favorite AI client. No exports, no copy paste, no manual uploads, no guessing, direct access to your live data. I'll walk you through exactly how to set it up. Then we'll jump straight into a live demo and you can see how powerful this combination really is. It's a game changer. Let's get into it.

All right, time for another WDS demo. Today we're talking about WordPress and AI. Very exciting topic that I'm sure we're all thinking about. Today I'm actually going to show you some of the advancements in WordPress with the recent 6.9 release. 7.0 is right around the corner, enhancing the AI capabilities even further. But what I want to show off is how we're able to actually hook up Claude, which is one of my favorite AI tools, directly to a WordPress website using the MCP adapter plugin for WordPress. So, let's get into it.

This is Claude, one of my favorite AI tools. You might be familiar with it, similar to ChatCBT, Gemini, or others. And the amazing thing about Claude is you can actually use what's called MCP connection to connect to your favorite uh application. So, what is MCP? You've probably heard it. What does it mean? Model context protocol. Simply, it's an open-source standard for connecting AI applications to other systems. In this case, that other system is going to be WordPress. So it gives these AI systems a standard that they can work against, as well as every other application in the world, a standard of how they feed data and information into these AI agents. So WordPress, open source, always at the forefront of technology. There is a WordPress MCP adapter plugin available, built and supported by the WordPress core AI team, among among other uh contributors. As you can see here, it's available on uh GitHub. This is an amazing plugin you can download and install directly onto your WordPress website. Um, and essentially it allows you to uh bridges the gap between an MCP connection and the WordPress abilities API.

What is the abilities API, you might be asking? Well, the abilities API in WordPress is a new uh API released in 6.9, the most recent version of WordPress. And it's an extremely powerful API that has all of us really, really excited. Um, really, it just allows you to register and and feed specific data points however you want into the a the MCP protocol and into your AI tool. Um, we're going to show off a demo of this in just a second. We'll go through some core concepts, but that's really it. It allows you to register what you want to give these tools. Um, you can decide. Maybe it's all of your posts, maybe it's all of your pages, maybe it's all of your content that you've ever created, maybe it's your users, maybe you have a system you've built in WordPress that has all sorts of customized data for a very unique internet, maybe an e-commerce system. You can bring whatever data you want directly into your AI client from your live website in real time and start having conversations about it, which is absolutely mind-blowing. So, let's show it off.

Go over to Claude. You might be familiar with the Claude interface. I'm on the application right now. But the interesting thing if you click on this plus and look at connectors, you can see I have a WebDev Studios connector already set up. This is using the MCP uh server adapter for WordPress. And I'm going to walk through exactly how we do that. I can also go into Claude and if I go under settings, developer, I can also see my MCP servers that I've set up. In this case, one for WebDev Studios right here.

So, how do we do that? Well, it's easier than you might think. First off, we definitely need to install the WordPress MCP adapter plugin on the WordPress website you plan to um integrate with your AI client. This is a requirement and it's what again connects the abilities API to the MCP adapter. Um, so an AI knows what is available and what it can potentially do once it's connected. So what does that look like? There's two sides of this. One, there's a configuration on the Claude application side. The other one is WordPress. So let's focus on the WordPress side. I mentioned installing the MCP adapter plugin. We also need to create a custom plugin that registers abilities. So, as soon as you connect through MCP, it's going to connect, but it won't know what it can do. It will look for abilities. It will come back empty because there are none registered. So, um, let's look at what a very simple plugin, custom plugin here to register an ability and WordPress, what that looks like. So, we built this plugin and we'll have links in the uh comments on YouTube so you can get these plugins directly, copy paste and kind of edit them as you will. Very simply, we're registering an ability category. So, if you have a lot of abilities, you can categorize them. Um, but here's here's the meat of it. We're registering a new post ability, WDS/getposts. Um, you can see some of the information, label, description, but really the heart of it. We execute a callback function, and this is where it says what are we sending it, right? So, in this case, very simple. We're doing a WP query, pulling back the top 50 posts, uh, and returning them. So, we're taking the top 50 posts from our live website. So if a new post comes out tomorrow and you run this tomorrow, it will be in there and feeding that uh directly into any system that's connected through MCP, in this case Claude. So as soon as I upload this and I have and activate it and I have my MCP adapter uploaded and activated, WordPress uh has the code it needs uh to execute.

The final step is the user. So when MCP connects, it needs a user. It needs to understand the authentication and capabilities, roles and capabilities of that user. So what I recommend and what we do for our clients, we set up an MCP user account. Call it whatever you want. U this is an account that's going to have very limited permissions. In this case, a contributor. They cannot publish. We don't want them to publish, right? In this case, we're just pulling information to work with our content. But what I want to point out here is once you set up this user, it's uh the MCP connection in Claude actually needs an application password, not your user password. This is an application password which you can see right here. It's very simple. Give it a name, you know, Claude MCP, whatever you want to call it. As soon as you add it, it is going to show you your one your password. You're only going to see this once. This is security release. I will delete this as soon as this video is done because you never want to p publish this publicly. Copy this. You're going to need this for Claude. If you want to get rid of it, you can just revoke it. In this case, I'll revoke it so it's gone.

Once you have that password and your username, now we need to add the Claude connection. So this is a very simple file on Claude. It looks just like this. It's a JSON file. I'll show you exactly where it goes. Couple bits you need to modify here. The name, of course, this is WebDev Studios. The URL, of course, where your website lives, and that MCP uh MCP adapter has been installed and activated. Your username of the account that's going to connect. And then that application password. This is where a lot of people get hung up. This is not WordPress user password. This is that application password that you only see once. Save it. Go back into Claude. We can go uh into our settings, go into developer. You'll see the config here. If if nothing's connected, the only thing here will be edit config. Click that and it will take you right to where that configuration file is. I'm not going to open this because my live password is in here. But when you right-click open this, this is where you would paste that code I just showed. Um, make sure you have that username, application password, and away you go.

Now, once you set this, you have to restart Claude. Claude will not make this connection until you restart it. And create a new chat. Don't go into an existing chat. Start a new chat. Right? So, you can see if it's working right here under connectors. When you restart, you should see your new connection. Now, we are connected to our live WebDev Studios website. What could we possibly do now that we're connected? Well, I'm glad you asked that cuz let's show.

So, let's just throw in some basic prompts and make sure things are working. So, I'm going to just pull my recent post. Tell me which topics I'm covering, what gets the most detailed coverage, and identify any potential gaps. Again, this is pulling from my live website. It's not trying to analyze what it sees on my blog or read some feed. It is pulling exactly the ability I set up. You can see it's discovering it. It's getting the info. Now it knows what it can pull. And now it's giving me a breakdown of my live content. This is where the mind starts to explode because this stuff is is awesome. Right now, just think of the things that you can do once you have access to this in your favorite AI tool. Right? Not only just architecting a content calendar, looking for gaps in content, really understanding the trends, um, but it can do so much more than that, right? So, this is a very basic example. Here's some gaps in content it's identifying, right? We've all done prompts. We all understand that. So, then we can really start to dig in. Why not read my latest blog post and and generate a monthly newsletter digest? That's a great idea, right? Claude to the rescue. ChatGpt to the rescue. Right, here we go. It's executing the ability again. It's pulling back my post. It will sometimes save your content in the cache. So, keep that in mind. But generally speaking, it's going to go retrieve them when you ask it to talk about it and want to work with it. So, um, it's actually generating the skill into a doc file. So, let's just stop that because we don't want to go down that road, but you could put it into a doc, whatever you might want to do.

Um, SEO, huge, right? We love SEO, AI, search, all that good stuff. We can analyze our content again in real time. Just take my top five blog post. Give me some AB test variations on the title. What do we think will rank well in search engines? So, now it's starting to give me some ideas. Again, massively powerful, right? And we're just scraping the surface. So, um, imagine pulling in not only your content, imagine pulling in Google Analytics data with that content, right? Not only can you analyze gaps in content, but you can actually see what is working and what isn't working. What content resonates and keeps people on our website based on our analytic stats and what content do people bounce immediately when they hit. This will be able to tell you in a matter of seconds. Imagine you could pull in HubSpot. You could pull in all these different data factors and analyze it with your content. You could also build out top your competitors. Hey, where are gaps in content based on our competitors based on our analytic data. Right? This is some really, really exciting stuff in the world of WordPress. And we're really just scratching the surface. Again, this was a simple example if we go back to our code of we're just pulling post. You could pull metadata against these posts. You could do gap analysis on your SEO metatags, description, title, all of that. All you have to do is feed it, create an ability, feed it into that ability, and now WordPress or I'm sorry, Claude or your AI tool will have all that data and all that context. So again, sky's the limit. Pull in your content, post, pages, products, pull in, you know, whatever sorts of data you want to pull in and analyze. And it's, as we all know, AI does an amazing job at that. So um, again, this is a quick example of how WordPress and AI is evolving rapidly. This is available in WordPress 6.9. It's available today. This is production ready. We're sitting down with our clients. We're talking about how we can integrate this for their marketing teams, workflows, all that great stuff. But this is changing the game and we're right on board with it.