[{"data":1,"prerenderedAt":417},["ShallowReactive",2],{"footer-primary":3,"footer-secondary":93,"footer-description":119,"directus-mcp-server-mcp-claude-ai":121,"directus-mcp-server-mcp-claude-ai-next":150,"sales-reps":165},{"items":4},[5,29,49,69],{"id":6,"title":7,"url":8,"page":8,"children":9},"522e608a-77b0-4333-820d-d4f44be2ade1","Solutions",null,[10,15,20,25],{"id":11,"title":12,"url":8,"page":13},"fcafe85a-a798-4710-9e7a-776fe413aae5","Headless CMS",{"permalink":14},"/solutions/headless-cms",{"id":16,"title":17,"url":8,"page":18},"79972923-93cf-4777-9e32-5c9b0315fc10","Backend-as-a-Service",{"permalink":19},"/solutions/backend-as-a-service",{"id":21,"title":22,"url":8,"page":23},"0fa8d0c1-7b64-4f6f-939d-d7fdb99fc407","Product Information",{"permalink":24},"/solutions/product-information-management",{"id":26,"title":27,"url":28,"page":8},"63946d54-6052-4780-8ff4-91f5a9931dcc","100+ Things to Build","https://directus.io/blog/100-tools-apps-and-platforms-you-can-build-with-directus",{"id":30,"title":31,"url":8,"page":8,"children":32},"8ab4f9b1-f3e2-44d6-919b-011d91fe072f","Resources",[33,37,41,45],{"id":34,"title":35,"url":36,"page":8},"f951fb84-8777-4b84-9e91-996fe9d25483","Documentation","https://docs.directus.io",{"id":38,"title":39,"url":40,"page":8},"366febc7-a538-4c08-a326-e6204957f1e3","Guides","https://docs.directus.io/guides/",{"id":42,"title":43,"url":44,"page":8},"aeb9128e-1c5f-417f-863c-2449416433cd","Community","https://directus.chat",{"id":46,"title":47,"url":48,"page":8},"da1c2ed8-0a77-49b0-a903-49c56cb07de5","Release Notes","https://github.com/directus/directus/releases",{"id":50,"title":51,"url":8,"page":8,"children":52},"d61fae8c-7502-494a-822f-19ecff3d0256","Support",[53,57,61,65],{"id":54,"title":55,"url":56,"page":8},"8c43c781-7ebd-475f-a931-747e293c0a88","Issue Tracker","https://github.com/directus/directus/issues",{"id":58,"title":59,"url":60,"page":8},"d77bb78e-cf7b-4e01-932a-514414ba49d3","Feature Requests","https://github.com/directus/directus/discussions?discussions_q=is:open+sort:top",{"id":62,"title":63,"url":64,"page":8},"4346be2b-2c53-476e-b53b-becacec626a6","Community Chat","https://discord.com/channels/725371605378924594/741317677397704757",{"id":66,"title":67,"url":68,"page":8},"26c115d2-49f7-4edc-935e-d37d427fb89d","Cloud Dashboard","https://directus.cloud",{"id":70,"title":71,"url":8,"page":8,"children":72},"49141403-4f20-44ac-8453-25ace1265812","Organization",[73,78,84,88],{"id":74,"title":75,"url":76,"page":77},"1f36ea92-8a5e-47c8-914c-9822a8b9538a","About","/about",{"permalink":76},{"id":79,"title":80,"url":81,"page":82},"b84bf525-5471-4b14-a93c-225f6c386005","Careers","#",{"permalink":83},"/careers",{"id":85,"title":86,"url":87,"page":8},"86aabc3a-433d-434b-9efa-ad1d34be0a34","Brand Assets","https://drive.google.com/drive/folders/1lBOTba4RaA5ikqOn8Ewo4RYzD0XcymG9?usp=sharing",{"id":89,"title":90,"url":8,"page":91},"8d2fa1e3-198e-4405-81e1-2ceb858bc237","Contact",{"permalink":92},"/contact",{"items":94},[95,101,107,113],{"id":96,"title":97,"url":8,"page":98,"children":100},"8a1b7bfa-429d-4ffc-a650-2a5fdcf356da","Cloud Policies",{"permalink":99},"/cloud-policies",[],{"id":102,"title":103,"url":81,"page":104,"children":106},"bea848ef-828f-4306-8017-6b00ec5d4a0c","License",{"permalink":105},"/bsl",[],{"id":108,"title":109,"url":81,"page":110,"children":112},"4e914f47-4bee-42b7-b445-3119ee4196ef","Terms",{"permalink":111},"/terms",[],{"id":114,"title":115,"url":81,"page":116,"children":118},"ea69eda6-d317-4981-8421-fcabb1826bfd","Privacy",{"permalink":117},"/privacy",[],{"description":120},"\u003Cp>A composable backend to build your Headless CMS, BaaS, and more.&nbsp;\u003C/p>",{"id":122,"slug":123,"vimeo_id":124,"description":125,"tile":126,"length":8,"resources":8,"people":8,"episode_number":127,"published":128,"title":129,"video_transcript_html":130,"video_transcript_text":131,"content":132,"status":133,"episode_people":134,"recommendations":135,"season":136,"seo":149},"1e3cca6c-b7f7-4f79-b0c8-428e58624785","mcp-claude-ai","1129654788","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.","b0aff196-aeb4-4807-9283-4a279ca81114",4,"2025-11-20","Connect to Claude AI / Desktop","\u003Cp>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.\u003C/p>\u003Cp>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.\u003C/p>\u003Cp>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.\u003C/p>\u003Cp>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.\u003C/p>\u003Cp>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.\u003C/p>\u003Cp>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.\u003C/p>\u003Cp>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.\u003C/p>\u003Cp>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.\u003C/p>\u003Cp>Stay tuned for more videos in this series.\u003C/p>","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.","\u003Cp>In this episode, we show you how to connect the native Directus MCP Server to Claude AI Desktop. You'll learn how to:\u003C/p>\u003Cul>\u003Cli>Enable the MCP server in your Directus AI settings\u003C/li>\u003Cli>Configure the allow deletes option for file management\u003C/li>\u003Cli>Set up the AI prompts collection for reusable workflows\u003C/li>\u003Cli>Create a dedicated Claude AI user with appropriate permissions\u003C/li>\u003Cli>Generate a static access token for secure API access\u003C/li>\u003Cli>Add a custom connector in Claude Desktop settings\u003C/li>\u003Cli>Configure the connection URL with your Directus instance and access token\u003C/li>\u003Cli>Test the connection by querying your schema\u003C/li>\u003Cli>Add new fields to collections through natural conversation\u003C/li>\u003C/ul>\u003Cp>Watch as we demonstrate the complete setup process, from configuring Directus to adding an AI summary field to a blog post collection. We show how Claude can fetch your schema, understand your collections, and make changes to your Directus instance through conversational AI. This integration brings powerful content management capabilities directly into your Claude Desktop experience.\u003C/p>","published",[],[],{"id":137,"number":138,"year":139,"episodes":140,"show":146},"9781e3ca-7d76-4ebc-8c35-511681cd9394",2,"Native MCP",[141,142,143,122,144,145],"23e7f108-2cb4-4ab2-95b3-62429ce0b697","32408843-f937-47d4-bbcb-65fad031548b","5506f9ca-3a72-4447-8b50-ce4c821e3d1d","4afe2385-df4a-45f0-9409-75bb149b62be","86f0031b-9bf0-44cb-aa66-b3bd03fa89b0",{"title":147,"tile":148},"Directus MCP Server","573a0fb2-4e86-4d87-a7ab-d4f06283b79a",{"title":8,"meta_description":8},{"id":144,"slug":151,"season":137,"vimeo_id":152,"description":153,"tile":154,"length":155,"resources":8,"people":8,"episode_number":156,"published":128,"title":157,"video_transcript_html":158,"video_transcript_text":159,"content":160,"seo":161,"status":133,"episode_people":162,"recommendations":164},"mcp-for-developers","1130318289","Discover powerful developer workflows using the native Directus MCP Server with Claude Code. This episode demonstrates practical use cases including rapid data modeling, automated flow creation, sample data generation, and script writing to accelerate your development process.","f6b21e46-3a64-4047-a53f-a4bd36090dc7",23,5,"Directus MCP For Developers","\u003Cp>Speaker 0: Alright. Alright. Welcome, devs. Brian here for Directus. And in this video, we are going to show you some developer workflows when working with the Directus native MCP and your IDE.\u003C/p>\u003Cp>So no matter where you sit on the Vibe coding spectrum, love it, hate it, don't like it, cautiously optimistic. Hopefully, we're gonna get a few workflows out of here that you can try and take away for your own use. Let's dive in. First stop is just gonna be into the AI settings page of Directus to make sure that the MCP is enabled for this instance. We're gonna allow deletes, which is okay.\u003C/p>\u003Cp>In our development instance, you may want to disable that in production. We've got our AI prompts collection, which is helpful for all the marketers in your life. They get reusable prompt templates they can use with things like Claude or other clients that support it, and we can change the system prompt behavior. With that enabled, what we're going to do next is just go in and create a new user here. So I'm gonna name this Claude Code, you're very right to be security concerned when it comes to LLM and prompt injection and all those bad things that we hear about, and that's why we advocate creating separate users for the MCP, so you could tightly scope those permission settings.\u003C/p>\u003Cp>And, in this case, we're gonna give it admin access because I wanna show you guys some of the schema tools. But do not do this in production. Make sure you scope it down either by the access policy or by the role itself, and make sure you give it the least permissions possible for the task. Right? Alright, so we're going to create a static access token here, we're going to save this user, and now I'm just going to pull this up.\u003C/p>\u003Cp>I've got a little snippet somewhere on my clipboard. I'm going to grab that token that we just created. So basically, this is the command for adding cloud code, adding the MCP server to that. I'm just gonna open up another terminal here inside cursor. I've been jamming a lot with cloud code lately, especially as part of developing this MCP.\u003C/p>\u003Cp>So, that's what we'll cover today. Of course, there's other videos on how to connect it to Cursor or other clients. This is just one workflow that we're gonna show you. Alright. So our first workflow that we're gonna cover, right, is conceptual data models.\u003C/p>\u003Cp>Right. Maybe I've got a new project and, you know, a a Directus makes it super easy to data model anything, really. I could go through and visually map out whatever, and then getting the instant APIs on top of that is just icing on the cake. But in this case, I I wanna move faster. Right?\u003C/p>\u003Cp>So let's open up Cloud Code, and let's just talk to it, add a a con a new data model to Directus. Let's create a new data model for a CRM inside my directus instance. Keep it lightweight for now. Just standard CRM stuff. Let's brainstorm together first before you add it though.\u003C/p>\u003Cp>Alright. Cool. So we will take a look at what happens. Hopefully, this should be a signal to the MCP server that it should go in and run a couple tools and just see what we have inside Directus First, but we'll see how Claude Code reacts. Right?\u003C/p>\u003Cp>It is doing some thinking. We can toggle that with command o and see kind of what we what we got. Organizations, contacts, deals, activities, tasks. Okay. Questions.\u003C/p>\u003Cp>Cool. Let me close this out. Let's skip the extra collections. This looks pretty good for now. Activities, let's use m two o fields versus the m two a.\u003C/p>\u003Cp>Deal pipeline stages, we want those to be a separate collection. Should be a separate collection. Nothing industry specific for now. Alright. So, you know, I appreciate the back and forth here.\u003C/p>\u003Cp>You know, hopefully, now that we've stressed got this planned out, let's just hit continue with the plan and see what Claude can do via the MCP. Alright. We can see it doing some thinking. And and, again, like, I could do this via the UI. We're just gonna see how much quicker it is to do it via the MCP.\u003C/p>\u003Cp>It's going to ask us to call the system prompt. Basically, this just gives some more information about the role. Cool. It looks like the next one it is trying to call is the schema tool, which is good. We'll give it full access.\u003C/p>\u003Cp>That way, it can see the existing schema inside our direct assistance. And I guess I could make this full screen. There we go. Zoom in even further. And I could probably even close the terminal down here.\u003C/p>\u003Cp>Alright. So we could see it's trying to run the collections command. Cool. This should create the collection inside Directus for us. And, again, I'm just gonna give it full access to continue.\u003C/p>\u003Cp>You know, again, be very careful when you're using these tools. Make sure you're inspecting all of the payloads first. You know, especially when it's touching the schema, you might want to export the schema. There is an API endpoint for that. Check the docs at Directus to to verify.\u003C/p>\u003Cp>Alright. Now it's gonna go in and create the different relationships for us, and it looks like it's hit an error. Right? Now the MCP inside Directus, there's two validation layers. Like, we first validate, you know, a a light validation against the input schema.\u003C/p>\u003Cp>And then before we actually perform the operation inside Directus, like creating a field or a relationship, goes through a a much more strict validation, which helps catch some of these errors like this. And you could see it successfully created these relationships right now. Alright. So if I do a hard refresh over here, we close this, we should start to see some of these things get populated, like our contacts and our organizations, the pipeline stages. Right?\u003C/p>\u003Cp>We're still probably waiting on the deals, I would assume. Right. But now I can start entering the data for this. Right? Bryant Gillespie.\u003C/p>\u003Cp>Probably shouldn't put my full email address in here. And I could create a new organization, call that direct us. Great. There we go. And we could see that it it has already got all these relationships set up for us as well, which is is super nice.\u003C/p>\u003Cp>Right? We've got deals, we've got contacts, we can see the title of the deal, we've got a slider for the probability of this thing closing, we've got a link to our stage, let's call this new deal, give it a color, title, of course title is required so it's already added some validation for us. New deal, Brian's deal, Brian's new deal, sounds like a presidential thing. Alright. So that is, just one use case for the MCP.\u003C/p>\u003Cp>Right? And you can see this thing is still going to town. It's adding activities, etcetera. In this case, I'm I'm just gonna go ahead and stop this, And let's start a new thread and look at another potential use case for this. Right?\u003C/p>\u003Cp>So one of the other nice pieces of functionality that is in this iteration of the MCP is the ability to create direct as flows. And you're probably asking me, hey. What are direct as flows? Right? They are low code, no code automations that you can build logic in whenever things happen.\u003C/p>\u003Cp>You can make requests. You can send emails. Right? As a developer, how many times have you had to put in code for a simple email notification when a certain event happens? Directus as it flows are your best friend in that scenario.\u003C/p>\u003Cp>We don't have to submit a PR, wait for three days for somebody to review that change, and the email copy, we could just quickly model it inside flows. But a lot of folks in the community expressed interest in being able to create flows with LLMs. So let's do that. Right? Whenever let's plan a new direct us flow.\u003C/p>\u003Cp>Whenever a contact is created, Send a notification in app to the owner of that contact. Let's plan the flow first and then create it. We confirm. Okay. Alright.\u003C/p>\u003Cp>So, basically, we take a a super simple prompt, and I I could be more specific here to get better results. But using the thinking mode inside Cloud Code, the the latest Sonnet model seems to work really well. And this is kind of the the workflow that I've adopted for myself. Let's get a detailed plan. Let's pick up all the information that we need first, and then, then we send, it off on its task.\u003C/p>\u003Cp>Right? So here's the flow plan. We've got a new contact notification. If the owner is null or assigned, let's add a check for no owner. Use a condition to filter that.\u003C/p>\u003Cp>We don't want to send a notification if there's no owner. Alright. For the message text message text, just use the contact details. Execute the plan. Again, LLMs aren't particularly worried by typos, in some context maybe, but it should go through and then it will actually start building the flow for us.\u003C/p>\u003Cp>So there's two components to flows. We have the flow itself and then the operations within the flow, and it should build both of those forming and then actually combine those together, and make sure everything is linked up properly. So we can see this happening here in real time. Directus flow, creating the operation. Not sure how long this will take.\u003C/p>\u003Cp>And it looks like we're done. Right? A more complex flow would probably take a little bit longer for the LLM to map out, but let's just go in. I'm gonna refresh. We're gonna take a look.\u003C/p>\u003Cp>Here's our new flow that it has created. Whenever an item is created in the contacts collection, we're gonna check the payload for the owner, and then we're going to update the user. We'll send them a notification. I do spot one issue here. Right?\u003C/p>\u003Cp>The trigger dot payload dot ID is, not what we're gonna get. It's actually gonna be a trigger dot key. So, you know, this thing is not infallible, but for thirty five seconds to have this flow is pretty good. Could save me a lot of time. Right?\u003C/p>\u003Cp>Scaffolding this out, and then I'll just dial it in. But let's test this out. We're just gonna send a new contact into the database. I'm gonna make sure that I set myself as the user and boom, in the notifications there we could see new contact has been assigned. I could go in and navigate directly to that contact.\u003C/p>\u003Cp>Alright. Let's move on to the next workflow. So one of the other workflows that I find myself using quite a bit is just adding sample data, just small sets of sample data. MCP is a rather expensive protocol, so you you don't wanna use this to seed a database. But, you know, if we're developing a, a front end, like a a website, right, Typically, you might want to have a kitchen sink page.\u003C/p>\u003Cp>You know, if we take a look at our our block based builder, right, it can be very time consuming to scaffold out a full page with all the different options so that when you are building this, right, you can visually see what's happening. Right? MCP makes that super easy. So this is another workflow. Let's go in with let's create a kitchen sink page inside Directus with all the different block combinations so we can better work on the styling and front end components.\u003C/p>\u003Cp>Alright. So that's the prop we're gonna kick things off with. And it's for whatever reason, this thing is still showing what we previously had. But let's see what happens. Right?\u003C/p>\u003Cp>It's gonna run the direct to schema. It will get all the existing collections that we have. And if I wanna just pull this up side by side in my browser, you know, here's kind of what we've got as far as the home page, what that kinda looks like, But let's have it create this kitchen sink page. So we're just gonna go back and okay. So it looks like it has picked up all the different block types.\u003C/p>\u003Cp>We can see that here. Let's use the schema tool to understand what all of those different options are. And now it should go in and start creating this page for us. Right? Has it created the page?\u003C/p>\u003Cp>It looks like it's gonna go through and create the individual blocks first. So if I show my hidden collections inside Directus, we can go through and see probably some of these different things that it's creating for us. Block hero. Right. This is a block hero.\u003C/p>\u003Cp>Looks like it's doing a bunch of those. Just, block hero with the image positioned on the right side of the content. Cool. So it's gonna go through this process. I'll just speed this up for the sake of the video, and then we'll come back.\u003C/p>\u003Cp>And scene. Now we're back. One of the things that I do have toggled when I'm working with Cloud Code, I I use the thinking mode quite a bit. It seems to help the output a lot. But now we've got our kitchen sink page.\u003C/p>\u003Cp>All we have to do is hit refresh. We could see that it's added quite a few different blocks for us here, which is nice. Looks like it missed one of the form blocks. You missed the form block in our kitchen sink page. Alright.\u003C/p>\u003Cp>So while we're doing that, let's just open this up. We can see the live preview here, which is probably not working. Maybe we just set this to publish for now. It'll be a a different issue for a different video. But let's open up this kitchen sink page, local host 3,000 kitchen sink, and see what we got.\u003C/p>\u003Cp>Alright. This doesn't appear to be working. Let me just go back quickly. I'm gonna add a publish date to this. Again, we'll sort out the versioning later.\u003C/p>\u003Cp>Okay. So now I could see I've got our kitchen sink page. We've got a bunch of different hero layouts. And one of the things that I noticed right away is, you know, if we've got more than two or three buttons, this kinda this design fails. Right?\u003C/p>\u003Cp>It it goes off the the reservation, and this is kinda helpful for fixing that. Right? We may go in, let's just shrink this up a bit, and then we look at our button group. Cool. There's our button group.\u003C/p>\u003Cp>We've got our container classes. Let's just add flex wrap here. And now we can see it's super nice to have these kitchen sink kind of components, but one of the great use cases here is just populating the sample data. Right? Is it our CRM?\u003C/p>\u003Cp>We could have it populate a few sample records for us, or we could even have it generate a seed script for us, which puts us back into the next workflow for this. Alright. So one of the other workflows that is super nice with the MCP and your LLM is having it write scripts for you. This could be migrating from one CMS to another, in this case, Directus. That's a pattern that that our team has used locally with tools like Cloud Code or Cursor.\u003C/p>\u003Cp>You know, there's a lot of things that need to be migrated. And MCP is is good at understanding and, you know, the context around the data, especially when you've given it the schema, but having an LLM move all the data one by one by brick by brick, token by token, is super inefficient. So, let's just have it write a script to load up a bunch of blog posts for us. Let's write a node script to use the Falso library is one that I like to generate a bunch of fake contacts and companies inside our directus instance. Alright.\u003C/p>\u003Cp>So now what I'm gonna do, I'm just gonna copy the URL for Falso here or, gonna do that. Cool. And down here in the actual terminal, I'm just gonna go in and go ahead and install this library. Just get a little jump start. Cool.\u003C/p>\u003Cp>Alright. So it looks like it is reading the package JSON. We should see that. It's gonna pick up our different collections. And what else?\u003C/p>\u003Cp>Contacts and organizations is reading the schema for that, which is great. And we'll see if we can get it to output this script for us. Again, I this is a a more efficient way. It's more repeatable. So if you do need, like, highly deterministic output, this is, a one pattern that's worked really well for us.\u003C/p>\u003Cp>Right? It looks like it's also doing a e n v example. Check if the direct Us SDK is installed. Cool. There's the seed data script.\u003C/p>\u003Cp>We're probably gonna need to install the Directus SDK in the root as well. Looks like it's already taken care of that for us. Cool. We'll allow it to make those changes. We'll go ahead and run the installation script, And then we are going to need to do what?\u003C/p>\u003Cp>Then we'll need to do the e and v variables. Right? PM PMI install. Let's see is what it's got for us as far as the seed data. Alright.\u003C/p>\u003Cp>So different industries. We got the number of organizations, three organizations per contact. Okay. So it's actually picking this up from the directus.e n v. So we shouldn't really need to do anything other than just actually run this.\u003C/p>\u003Cp>Right? Nodeseeddata.js. Created orgs is not iterable. Where is that coming from? Again, if you're gonna go straight vibe code on this, make sure that you are doing everything properly.\u003C/p>\u003Cp>Let's fix the script. Yes. Alright. Looks like it is trying to make sure we're we're actually adding authentication, which is a good thing. Created orgs is not an iterable.\u003C/p>\u003Cp>Okay. Just waiting on you, Claude. Just waiting on you. It is not getting the what what are we doing here? Try running it again.\u003C/p>\u003Cp>There we go. Okay. So it said it has exceeded this successfully. We're gonna take a look, and boom. There's our seed data.\u003C/p>\u003Cp>Right? So that was stupid quick, stupid easy to go in and add this data. And this is based on actual utility. Right? There's not a ton of crazy hype here.\u003C/p>\u003Cp>These are actually just useful workflows in your day to day as you're building with Directus. You make sure you look to the community for more workflows. That is it for this video. Stay tuned for more in the MCP series.\u003C/p>","Alright. Alright. Welcome, devs. Brian here for Directus. And in this video, we are going to show you some developer workflows when working with the Directus native MCP and your IDE. So no matter where you sit on the Vibe coding spectrum, love it, hate it, don't like it, cautiously optimistic. Hopefully, we're gonna get a few workflows out of here that you can try and take away for your own use. Let's dive in. First stop is just gonna be into the AI settings page of Directus to make sure that the MCP is enabled for this instance. We're gonna allow deletes, which is okay. In our development instance, you may want to disable that in production. We've got our AI prompts collection, which is helpful for all the marketers in your life. They get reusable prompt templates they can use with things like Claude or other clients that support it, and we can change the system prompt behavior. With that enabled, what we're going to do next is just go in and create a new user here. So I'm gonna name this Claude Code, you're very right to be security concerned when it comes to LLM and prompt injection and all those bad things that we hear about, and that's why we advocate creating separate users for the MCP, so you could tightly scope those permission settings. And, in this case, we're gonna give it admin access because I wanna show you guys some of the schema tools. But do not do this in production. Make sure you scope it down either by the access policy or by the role itself, and make sure you give it the least permissions possible for the task. Right? Alright, so we're going to create a static access token here, we're going to save this user, and now I'm just going to pull this up. I've got a little snippet somewhere on my clipboard. I'm going to grab that token that we just created. So basically, this is the command for adding cloud code, adding the MCP server to that. I'm just gonna open up another terminal here inside cursor. I've been jamming a lot with cloud code lately, especially as part of developing this MCP. So, that's what we'll cover today. Of course, there's other videos on how to connect it to Cursor or other clients. This is just one workflow that we're gonna show you. Alright. So our first workflow that we're gonna cover, right, is conceptual data models. Right. Maybe I've got a new project and, you know, a a Directus makes it super easy to data model anything, really. I could go through and visually map out whatever, and then getting the instant APIs on top of that is just icing on the cake. But in this case, I I wanna move faster. Right? So let's open up Cloud Code, and let's just talk to it, add a a con a new data model to Directus. Let's create a new data model for a CRM inside my directus instance. Keep it lightweight for now. Just standard CRM stuff. Let's brainstorm together first before you add it though. Alright. Cool. So we will take a look at what happens. Hopefully, this should be a signal to the MCP server that it should go in and run a couple tools and just see what we have inside Directus First, but we'll see how Claude Code reacts. Right? It is doing some thinking. We can toggle that with command o and see kind of what we what we got. Organizations, contacts, deals, activities, tasks. Okay. Questions. Cool. Let me close this out. Let's skip the extra collections. This looks pretty good for now. Activities, let's use m two o fields versus the m two a. Deal pipeline stages, we want those to be a separate collection. Should be a separate collection. Nothing industry specific for now. Alright. So, you know, I appreciate the back and forth here. You know, hopefully, now that we've stressed got this planned out, let's just hit continue with the plan and see what Claude can do via the MCP. Alright. We can see it doing some thinking. And and, again, like, I could do this via the UI. We're just gonna see how much quicker it is to do it via the MCP. It's going to ask us to call the system prompt. Basically, this just gives some more information about the role. Cool. It looks like the next one it is trying to call is the schema tool, which is good. We'll give it full access. That way, it can see the existing schema inside our direct assistance. And I guess I could make this full screen. There we go. Zoom in even further. And I could probably even close the terminal down here. Alright. So we could see it's trying to run the collections command. Cool. This should create the collection inside Directus for us. And, again, I'm just gonna give it full access to continue. You know, again, be very careful when you're using these tools. Make sure you're inspecting all of the payloads first. You know, especially when it's touching the schema, you might want to export the schema. There is an API endpoint for that. Check the docs at Directus to to verify. Alright. Now it's gonna go in and create the different relationships for us, and it looks like it's hit an error. Right? Now the MCP inside Directus, there's two validation layers. Like, we first validate, you know, a a light validation against the input schema. And then before we actually perform the operation inside Directus, like creating a field or a relationship, goes through a a much more strict validation, which helps catch some of these errors like this. And you could see it successfully created these relationships right now. Alright. So if I do a hard refresh over here, we close this, we should start to see some of these things get populated, like our contacts and our organizations, the pipeline stages. Right? We're still probably waiting on the deals, I would assume. Right. But now I can start entering the data for this. Right? Bryant Gillespie. Probably shouldn't put my full email address in here. And I could create a new organization, call that direct us. Great. There we go. And we could see that it it has already got all these relationships set up for us as well, which is is super nice. Right? We've got deals, we've got contacts, we can see the title of the deal, we've got a slider for the probability of this thing closing, we've got a link to our stage, let's call this new deal, give it a color, title, of course title is required so it's already added some validation for us. New deal, Brian's deal, Brian's new deal, sounds like a presidential thing. Alright. So that is, just one use case for the MCP. Right? And you can see this thing is still going to town. It's adding activities, etcetera. In this case, I'm I'm just gonna go ahead and stop this, And let's start a new thread and look at another potential use case for this. Right? So one of the other nice pieces of functionality that is in this iteration of the MCP is the ability to create direct as flows. And you're probably asking me, hey. What are direct as flows? Right? They are low code, no code automations that you can build logic in whenever things happen. You can make requests. You can send emails. Right? As a developer, how many times have you had to put in code for a simple email notification when a certain event happens? Directus as it flows are your best friend in that scenario. We don't have to submit a PR, wait for three days for somebody to review that change, and the email copy, we could just quickly model it inside flows. But a lot of folks in the community expressed interest in being able to create flows with LLMs. So let's do that. Right? Whenever let's plan a new direct us flow. Whenever a contact is created, Send a notification in app to the owner of that contact. Let's plan the flow first and then create it. We confirm. Okay. Alright. So, basically, we take a a super simple prompt, and I I could be more specific here to get better results. But using the thinking mode inside Cloud Code, the the latest Sonnet model seems to work really well. And this is kind of the the workflow that I've adopted for myself. Let's get a detailed plan. Let's pick up all the information that we need first, and then, then we send, it off on its task. Right? So here's the flow plan. We've got a new contact notification. If the owner is null or assigned, let's add a check for no owner. Use a condition to filter that. We don't want to send a notification if there's no owner. Alright. For the message text message text, just use the contact details. Execute the plan. Again, LLMs aren't particularly worried by typos, in some context maybe, but it should go through and then it will actually start building the flow for us. So there's two components to flows. We have the flow itself and then the operations within the flow, and it should build both of those forming and then actually combine those together, and make sure everything is linked up properly. So we can see this happening here in real time. Directus flow, creating the operation. Not sure how long this will take. And it looks like we're done. Right? A more complex flow would probably take a little bit longer for the LLM to map out, but let's just go in. I'm gonna refresh. We're gonna take a look. Here's our new flow that it has created. Whenever an item is created in the contacts collection, we're gonna check the payload for the owner, and then we're going to update the user. We'll send them a notification. I do spot one issue here. Right? The trigger dot payload dot ID is, not what we're gonna get. It's actually gonna be a trigger dot key. So, you know, this thing is not infallible, but for thirty five seconds to have this flow is pretty good. Could save me a lot of time. Right? Scaffolding this out, and then I'll just dial it in. But let's test this out. We're just gonna send a new contact into the database. I'm gonna make sure that I set myself as the user and boom, in the notifications there we could see new contact has been assigned. I could go in and navigate directly to that contact. Alright. Let's move on to the next workflow. So one of the other workflows that I find myself using quite a bit is just adding sample data, just small sets of sample data. MCP is a rather expensive protocol, so you you don't wanna use this to seed a database. But, you know, if we're developing a, a front end, like a a website, right, Typically, you might want to have a kitchen sink page. You know, if we take a look at our our block based builder, right, it can be very time consuming to scaffold out a full page with all the different options so that when you are building this, right, you can visually see what's happening. Right? MCP makes that super easy. So this is another workflow. Let's go in with let's create a kitchen sink page inside Directus with all the different block combinations so we can better work on the styling and front end components. Alright. So that's the prop we're gonna kick things off with. And it's for whatever reason, this thing is still showing what we previously had. But let's see what happens. Right? It's gonna run the direct to schema. It will get all the existing collections that we have. And if I wanna just pull this up side by side in my browser, you know, here's kind of what we've got as far as the home page, what that kinda looks like, But let's have it create this kitchen sink page. So we're just gonna go back and okay. So it looks like it has picked up all the different block types. We can see that here. Let's use the schema tool to understand what all of those different options are. And now it should go in and start creating this page for us. Right? Has it created the page? It looks like it's gonna go through and create the individual blocks first. So if I show my hidden collections inside Directus, we can go through and see probably some of these different things that it's creating for us. Block hero. Right. This is a block hero. Looks like it's doing a bunch of those. Just, block hero with the image positioned on the right side of the content. Cool. So it's gonna go through this process. I'll just speed this up for the sake of the video, and then we'll come back. And scene. Now we're back. One of the things that I do have toggled when I'm working with Cloud Code, I I use the thinking mode quite a bit. It seems to help the output a lot. But now we've got our kitchen sink page. All we have to do is hit refresh. We could see that it's added quite a few different blocks for us here, which is nice. Looks like it missed one of the form blocks. You missed the form block in our kitchen sink page. Alright. So while we're doing that, let's just open this up. We can see the live preview here, which is probably not working. Maybe we just set this to publish for now. It'll be a a different issue for a different video. But let's open up this kitchen sink page, local host 3,000 kitchen sink, and see what we got. Alright. This doesn't appear to be working. Let me just go back quickly. I'm gonna add a publish date to this. Again, we'll sort out the versioning later. Okay. So now I could see I've got our kitchen sink page. We've got a bunch of different hero layouts. And one of the things that I noticed right away is, you know, if we've got more than two or three buttons, this kinda this design fails. Right? It it goes off the the reservation, and this is kinda helpful for fixing that. Right? We may go in, let's just shrink this up a bit, and then we look at our button group. Cool. There's our button group. We've got our container classes. Let's just add flex wrap here. And now we can see it's super nice to have these kitchen sink kind of components, but one of the great use cases here is just populating the sample data. Right? Is it our CRM? We could have it populate a few sample records for us, or we could even have it generate a seed script for us, which puts us back into the next workflow for this. Alright. So one of the other workflows that is super nice with the MCP and your LLM is having it write scripts for you. This could be migrating from one CMS to another, in this case, Directus. That's a pattern that that our team has used locally with tools like Cloud Code or Cursor. You know, there's a lot of things that need to be migrated. And MCP is is good at understanding and, you know, the context around the data, especially when you've given it the schema, but having an LLM move all the data one by one by brick by brick, token by token, is super inefficient. So, let's just have it write a script to load up a bunch of blog posts for us. Let's write a node script to use the Falso library is one that I like to generate a bunch of fake contacts and companies inside our directus instance. Alright. So now what I'm gonna do, I'm just gonna copy the URL for Falso here or, gonna do that. Cool. And down here in the actual terminal, I'm just gonna go in and go ahead and install this library. Just get a little jump start. Cool. Alright. So it looks like it is reading the package JSON. We should see that. It's gonna pick up our different collections. And what else? Contacts and organizations is reading the schema for that, which is great. And we'll see if we can get it to output this script for us. Again, I this is a a more efficient way. It's more repeatable. So if you do need, like, highly deterministic output, this is, a one pattern that's worked really well for us. Right? It looks like it's also doing a e n v example. Check if the direct Us SDK is installed. Cool. There's the seed data script. We're probably gonna need to install the Directus SDK in the root as well. Looks like it's already taken care of that for us. Cool. We'll allow it to make those changes. We'll go ahead and run the installation script, And then we are going to need to do what? Then we'll need to do the e and v variables. Right? PM PMI install. Let's see is what it's got for us as far as the seed data. Alright. So different industries. We got the number of organizations, three organizations per contact. Okay. So it's actually picking this up from the directus.e n v. So we shouldn't really need to do anything other than just actually run this. Right? Nodeseeddata.js. Created orgs is not iterable. Where is that coming from? Again, if you're gonna go straight vibe code on this, make sure that you are doing everything properly. Let's fix the script. Yes. Alright. Looks like it is trying to make sure we're we're actually adding authentication, which is a good thing. Created orgs is not an iterable. Okay. Just waiting on you, Claude. Just waiting on you. It is not getting the what what are we doing here? Try running it again. There we go. Okay. So it said it has exceeded this successfully. We're gonna take a look, and boom. There's our seed data. Right? So that was stupid quick, stupid easy to go in and add this data. And this is based on actual utility. Right? There's not a ton of crazy hype here. These are actually just useful workflows in your day to day as you're building with Directus. You make sure you look to the community for more workflows. That is it for this video. Stay tuned for more in the MCP series.","\u003Cp>In this episode, we explore real-world developer workflows using the native Directus MCP Server with Claude Code. You'll learn how to:\u003C/p>\n\u003Cul>\n\u003Cli>Set up secure MCP access with dedicated users and scoped permissions\u003C/li>\n\u003Cli>Create complete data models through conversation (demo: building a CRM)\u003C/li>\n\u003Cli>Generate Directus Flows for automated notifications and workflows\u003C/li>\n\u003Cli>Build kitchen sink pages with sample content for front-end development\u003C/li>\n\u003Cli>Write custom seed scripts using the Falso library for realistic test data\u003C/li>\n\u003Cli>Debug and iterate on LLM-generated code in real-time\u003C/li>\n\u003C/ul>\n\u003Cp>Watch as we demonstrate multiple development scenarios from initial setup through execution. We cover conceptual data modeling for a lightweight CRM, creating automated notification flows, generating comprehensive test pages with all block combinations, and writing efficient seed scripts for bulk data creation. This episode showcases practical patterns for integrating AI into your daily development workflow, whether you love vibe coding or prefer more traditional approaches. Perfect for developers looking to accelerate your Directus projects with AI assistance.\u003C/p>","bd023627-472e-4f97-94e6-4d89927d16b6",[163],"9fc7c7bf-dd0e-45ac-8f03-a90ab85ef56c",[],{"reps":166},[167,223],{"name":168,"sdr":8,"link":169,"countries":170,"states":172},"John Daniels","https://meet.directus.io/meetings/john2144/john-contact-form-meeting",[171],"United States",[173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222],"Michigan","Indiana","Ohio","West Virginia","Kentucky","Virginia","Tennessee","North Carolina","South Carolina","Georgia","Florida","Alabama","Mississippi","New York","MI","IN","OH","WV","KY","VA","TN","NC","SC","GA","FL","AL","MS","NY","Connecticut","CT","Delaware","DE","Maine","ME","Maryland","MD","Massachusetts","MA","New Hampshire","NH","New Jersey","NJ","Pennsylvania","PA","Rhode Island","RI","Vermont","VT","Washington DC","DC",{"name":224,"link":225,"countries":226},"Michelle Riber","https://meetings.hubspot.com/mriber",[227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,383,384,385,386,387,388,389,390,391,392,393,394,395,396,397,398,399,400,401,402,403,404,405,406,407,408,409,410,411,412,413,414,204,415,416],"Albania","ALB","Algeria","DZA","Andorra","AND","Angola","AGO","Austria","AUT","Belgium","BEL","Benin","BEN","Bosnia and Herzegovina","BIH","Botswana","BWA","Bulgaria","BGR","Burkina Faso","BFA","Burundi","BDI","Cameroon","CMR","Cape Verde","CPV","Central African Republic","CAF","Chad","TCD","Comoros","COM","Côte d'Ivoire","CIV","Croatia","HRV","Czech Republic","CZE","Democratic Republic of Congo","COD","Denmark","DNK","Djibouti","DJI","Egypt","EGY","Equatorial Guinea","GNQ","Eritrea","ERI","Estonia","EST","Eswatini","SWZ","Ethiopia","ETH","Finland","FIN","France","FRA","Gabon","GAB","Gambia","GMB","Ghana","GHA","Greece","GRC","Guinea","GIN","Guinea-Bissau","GNB","Hungary","HUN","Iceland","ISL","Ireland","IRL","Italy","ITA","Kenya","KEN","Latvia","LVA","Lesotho","LSO","Liberia","LBR","Libya","LBY","Liechtenstein","LIE","Lithuania","LTU","Luxembourg","LUX","Madagascar","MDG","Malawi","MWI","Mali","MLI","Malta","MLT","Mauritania","MRT","Mauritius","MUS","Moldova","MDA","Monaco","MCO","Montenegro","MNE","Morocco","MAR","Mozambique","MOZ","Namibia","NAM","Niger","NER","Nigeria","NGA","North Macedonia","MKD","Norway","NOR","Poland","POL","Portugal","PRT","Republic of Congo","COG","Romania","ROU","Rwanda","RWA","San Marino","SMR","São Tomé and Príncipe","STP","Senegal","SEN","Serbia","SRB","Seychelles","SYC","Sierra Leone","SLE","Slovakia","SVK","Slovenia","SVN","Somalia","SOM","South Africa","ZAF","South Sudan","SSD","Spain","ESP","Sudan","SDN","Sweden","SWE","Tanzania","TZA","Togo","TGO","Tunisia","TUN","Uganda","UGA","United Kingdom","GBR","Vatican City","VAT","Zambia","ZMB","Zimbabwe","ZWE","UK","Germany","Netherlands","Switzerland","CH","NL",1773850439924]