Connect the native Directus MCP Server to Claude AI Desktop for streamlined content management conversations. This episode guides you through the setup process to bring Directus data and operations directly into your Claude Desktop chat experience.
Speaker 0: Alright. Alright. Brian here for Directus. In this video, we are going to show you how to connect the Directus native MCP to Claude AI. Alright.
So we're gonna start our journey inside the Directus instance. We're gonna go to the AI settings, and we're gonna make sure that our MCP server is enabled. You could set that up to allow deletes, which will, allow the MCP tools to delete files, which is helpful. You're also gonna wanna make sure that you've got an AI prompts collection set up. This allows you to build reusable workflows using these templated prompts that you can control inside your Directus instance.
The next step of the process, we're just gonna go into the user directory, and we are going to create a new user. This is the recommended way to interact with AI just to keep things nice and secure. So we'll create a new user for Claude AI. For now, I'm gonna give them a administrator access, but before I go to production, I would definitely scope that back. The next step will generate a static access token for it to use with the Directus API, and then we'll hit save.
So with that out of the way, maybe we dive into one of our posts, and then we come into Claude and set up our custom connector. So MCP, it's called connectors under the Claude settings. We're just gonna go in and add a new custom connector, we'll call it Directus CMS, and I'm going to copy and paste my Directus URL. We're gonna go to slash m c p, and then I'm gonna add query params to this, just access underscore token, and I'm gonna make sure I put an equal sign, and then I'm gonna paste that token that we generated after this. So the full directus URL slash m c p question mark access underscore token equals your directus static access token.
You hit add, and this will then connect to that MCP. So you can hit configure here to see all the different tools. You can turn these on or off. Alright. So let's hop in and open up a new chat, and then we'll just ask it something simple.
What does our Directus schema look like inside our instance? Alright. So those keywords should be picked up by Claude, and then it should start calling the tools inside our direct us MCP. Okay. It has ran our system prompt.
Now it's going to call our schema tool, which should fetch all the different collections inside Directus, and now it is going to summarize that for us. We can see what it returned here. And, you know, maybe we want to add a new field to our post collection for an AI generated summary. Right? Let's add a new field to our blog post collection for an AI summary.
Alright. And this should call the fields tool inside Directus. It looks like it's going to fetch more information about the post collection first, which is good, and then it will ask to create a new field inside the post collection. Once that's done, all I do is hit refresh over here on the left side, and now we can see this new field inside our Directus instance. This is just barely scratching the surface of the capabilities inside the Directus MCP and partnering up with something like Claude.
Stay tuned for more videos in this series.