How to Build an MCP Server for Your Bubble App (Step-by-Step)

Dennis H. Lewis shows how to build an MCP server for a Bubble app using Relevance AI as middleware, making your app discoverable to AI agents. Without MCP, applications become invisible to the growing AI assistant ecosystem. He walks through a real example with Conjurro, a project-management tool, showing how Bubble workflows feed data to MCP tools that automate reporting and bottleneck detection.
Chapters
Dennis Lewis here from ratio.dev. And while you're busy building your application, I don't care how you're doing it, traditional development, Bubble, whatever it is, and you're hard at work doing it, the rest of the world is building AI agents that can do things inside applications automatically, intelligently, without a human being in the loop. And here's the thing, if your app can't talk to those agents, It's invisible, it's irrelevant, and it's only a matter of time before it gets left behind. So today I'm going to show you exactly how to fix that by setting up an MCP server that works seamlessly with your Bubble application. And trust me, this is something every single person who's building an app right now needs to understand. And I know what you're thinking, come on, Dennis, I just figured out APIs. Don't make me learn something new. But this is the kicker. This isn't just another thing. This might be the thing that determines whether your app thrives in the age of AI or quietly fades away. So before we jump in, if you want all the tools, the plugins, the resources I mentioned in this video and my other videos, go grab free access to our No-Code Resource Center. The link is in the description, just your name and your email. That's it. We update it every week. So just go get it. Come back and continue listening. So let me start off with kind of the basics, because if you've never heard of an MCP server before, that's great. There's no problem. Most people haven't. MCP stands for Model Context Protocol, and it was created by Anthropic, the folks behind Claude, and it has quickly become an industry standard. And here's how I want you to kind of think about it. It's like having an API, but on steroids. So a regular API lets your application talk to other software. Based on standardized data structures that you pass back and forth. An MCP server goes further. It exposes a set of tools that AI agents can discover, they can understand, and they can use autonomously. So it's an API with a wrapper around it that gives AI models all the information they need to be able to work with your application. So, you know, that means any agent running inside Claude, Perplexity, OpenAI, Hermes, you name it, can then work with your application to do stuff that is useful for your users. So that could be creating a task. It could be marking it as complete. It could be pulling a report or creating an invoice or adding a lead to your CRM, all without human beings having to touch buttons. So let me kind of put this in perspective with a story. A few years back when we were deep in the trenches building our Web3 blogging platform, Circles, I remember thinking, if we just build the best app, users will come. And to some extent that was true, but here's what I didn't really appreciate at the time. The ecosystem around an app matters as much as the app itself. So we spent months building an incredible blockchain plugin, you know, content creation flow, thumbnail images. We've built AI tools, subscriptions, tips, the whole nine yards. We threw the kitchen sink in there, everything. And we discovered the hard way that how your app fits into the broader architecture is just as important as what it does. In fact, it's probably more important because it really is impossible to solve every problem inside one application. I remember back in the days, ERPs were just coming out and, you know, it was the idea behind SAP or behind some of the really, you know, the Oracle or the big ERP systems is that you could do everything inside one application suite, accounting, production, HR, whatever it was. And that was the promise. But sometimes being able to do everything means you don't do anything really, really well. And in today's world, especially being able to specialize in solving really specific, hard-to-solve problems for a specific audience is a superpower. But you also have to be able to communicate with the rest of the tools that that user is already using or may want to use in the future. To be able to take your hardcore solution to that really tough part of the problem and then combine it with somebody else's really tough hardcore solution to a different problem and have them work together. And that is amazing, but it isn't easy. And so we're now living in the age of AI agents and everything you hear, whether you like it or not, whether you're ready or not, Everybody's talking about AI agents. And if you want your application to play nice in the wider world of, you know, software products out there, you need an MCP strategy. This isn't just a nice-to-have-someday thing. This is a, you gotta have it right now thing for almost every application, especially if you're going after, you know, businesses and especially bigger businesses. So let's take this and get more practical. The first and most important decision you need to make when you're building your MCP strategy is where you're going to house that MCP server. And you've got lots and lots of options. You could theoretically try to build an MCP server functionality directly inside your Bubble application. But let me tell you why we don't do that here at ratio.dev. We've decided to always use Relevance AI as our middleware for AI. And here's the thinking behind that. First, it protects us from the ever-changing landscape of AI provider APIs. We're not locked into OpenAI or Anthropic or, or which, you know, we can mix and match Gemini, whatever the best tool for the best problem to solve as quickly as possible. So, Relevance AI gives us that middleware where we can just quickly switch between providers and between models, because let's face it, every day something new is coming out and you don't want to have to be doing all that work. Second, and this is the beautiful part about this, is Relevance automatically gives us the ability to encapsulate the tools we build into a public-facing MCP server. And third, because almost all the tools we deploy inside our MCP server also need to have AI logic baked into them. Having Relevance be the single source of truth for this as our middleware means that we can mix and match capability with our Bubble backend without having to maintain two separate MCP servers. Or so it's— and I'm going to show you in just a minute about how this actually works in the practical world. We're already using Relevance AI to connect our Bubble applications with powerful AI tools. We already have that pipeline working. Adding MCP on top of that is not starting from scratch. It's extending infrastructure that we already know and trust. So that's the architectural decision that works for us. It might be slightly different from you. Maybe you already use a different middleware, or maybe, you know, you want to have a, a custom-built MCP server. There could be cases for that, where that's better. But in this situation that we find ourselves in, and the applications we're building for our customers, this has been a really a sweet spot for us. So let me talk about a specific use case so that this can be something you really understand. We are in the process of building and launching Conjurro. Conjurro is going to be a ratio project product for project management and a bunch of other stuff that helps businesses like ours and like our customers that are building things, makers, builders. They could be building software. They could be building, you know, machinery for, you know, factories. I don't know, but there's a commonality there of how, you know, there's projects, there's, you know, project management. We have a concept called Spellbooks. A lot of really cool stuff and we're integrating into Conjuror AI in multiple different ways and at multiple different levels. And one of the key things that we want this system to be able to do is to play nice in the wider world. If somebody uses Perplexity Computer for, you know, doing their content work or for coding for something else, or, you know, or just their you know, day-to-day AI assistant, well, we want it to be able to work well with Conjurro CRM and Conjurro's project management system and to, you know, handle meetings and transcripts and stuff like that. And so by incorporating tools into our MCP server, we are able to achieve that hybrid structure where the AI is actually accessing detailed transactional information from Conjurro about what's going on in the business. So, you know, whether that be invoicing or, you know, project management and what tasks have been completed, what milestones have been completed, when, how many times they've been postponed, all of that information that is immensely valuable for analyzing with AI suddenly becomes visible. And it can combine with more of the sort of the fluffy information that we usually use AI for, for writing blog posts or social media posts, or, you know, there's all that other stuff. That goes on in your business. And so now you're creating a really dense web of really powerful empowered information management at a really reasonable price point. So from day one, Conjuror is going to have a full suite of MCP tools available. So that means, you know, and they'll work with Claude, they work with Perplexity, they work with Hermes, they work with ClawBot, all of these work in the same way. So that could be to create a new task in the system, or to analyze all the tasks inside a project, or to analyze all the tasks that a specific user has completed in the last week or the last 3 months. And to pull that information, bring it in. And then, you know, maybe, you know, we have a function called a ProjectMeister, which is going to be writing emails to users every day based on what's happened inside Juro, you know, what, what tasks are pending, what are, where the bottlenecks are, what, you know, what do you need to get done today? All of that is, is, you know, really powerful model to be able to put it in your day-to-day business work. The way this works, and I'm going to jump in here quickly to the Bubble builder here first, is you need a mechanism for pulling out information from your Bubble database. Okay. Now you could just expose the data layers, but then, you know, you're all of those relationships and all of the business logic would be just kind of pulled away. Whereas what we like to do is, for example, here you're seeing a backend workflow called Project Summary. And what it does is it takes some inputs. So the name of a project and the start date and the end date, and it's going to return a a summary and that summary is a JSON structure of structured data. So I'm returning here and you can see here, it has the ID of the project. It has the project name, it has the project description, and then it does a section of completed milestones, pending milestones, completed tasks, pending tasks, all based off of those criteria for this project and these, and this date range. It's also pulling in all of the information from project updates that have been created via voice notes or via emails or meeting transcriptions. And all of that information is consolidated into a JSON structure that can be called from Relevance at any specific time that any tool in Relevance needs that information. And so we would go into Relevance here now, and you can see here that we have a list of tools, and one of them is a Get Project Data, and this is very simple. This just calls that Bubble API. Okay. And pulls in the information, but now I can use this tool inside my other tools. So I can go back and say, I have a tool that analyzes a project. And see, if I go in here, you're going to see that the first thing it's going to do is pull in the project data. Okay. And this is actually an important point for you to know, because you could create tools that just take that JSON structure in as an input value. And sometimes that's fine. We do that a lot of time with smaller structures, but you do have to be careful. There are limits by the Bubble API connector that limit the size of the parameters that you can pass to external APIs. So that means that if you're pulling in a lot of information from the database, you can run into that limit and Bubble won't fail gracefully. It will just stop working and you're going to— it takes some debugging skills to figure out that the reason it's not— it's suddenly broken is because some of those fields are getting truncated. And so they're now, they're not correct structures. The syntax is wrong and then the API calls fail and it's just a headache. Whereas the limits when you actually pull data from Bubble are much bigger. So in that case, we like to have the tool communicate back to Bubble and say, okay, give me all my project data. And then it pulls that all out. And then you can pass that data from one step to another in this, in the tool workflow. So, you know, here we create a custom, a customer-facing report. We create our internal report. We calculate a health score. We convert that into a number. And then we pass that back to the Bubble in a structured way so that you can actually have a process in Bubble. That communicates to Relevance, or you can expose this Analyze a Project tool inside your MCP server. And any, any AI that you use in your normal day-to-day life can now discover how that works. Now, there are things that are important to make this work well. You do need to think about giving the correct name and description of your tools inside Relevance. When you're creating your inputs, give them names and descriptions. Questions as well. That's really important. It will also be able to analyze if it's required, all of that, that will get passed into the MCP server as well. But, you know, this is all part of that wrapper that, that makes your tools useful and that you don't have to go in and write really complicated prompts telling it how to do things. The AI model will read this. It will understand. It will say, oh, this is a tool for analyzing a project. Okay, what do I need? I need to receive the report date. I need to have the task categories. I need the company profile, the version, is this version test, you know, the start date, the end date. Okay. I need all of this information and in what format does it need to be? And boom, now I can call this and use it and analyze a project. And then I can say, okay, now pull in the list of projects and analyze all of them. And now go through that analysis and find the critical bottlenecks and tell me where I need to spend and focus my time. And it can just automatically do this. And then you can make it recurring and say, now do this every morning and send me an email. So this is where this gets really, really powerful. Now, when you're in Relevance, to create an MCP server is really easy. You just go here to the more tab here and you'll see MCP servers. And you just click here, you pick the tools you want to include, and then you generate the server configuration and boom, it's available. Okay. And now you can just go and connect with OAuth to your Relevance project. And boom, your Perplexity or your ClawBot can automatically communicate with your application. And you can also now give this access to your users. So you'll need to think about a security layer and how do you control those so that the privacy rules are respected correctly, all of that. But now your application is visible and useful to a much wider audience. Okay. And this means that you're now a team player. You're not just building an isolated tool that human beings use, but you're also becoming part of a worldwide ecosystem of applications that AI can use. And that may very well be a critical factor for success in the future for your software. So, and then obviously I've just kind of gone over the basics here, but if this is something that, you know, you would like to have happen in your Bubble application, maybe you don't want to worry about all the moving parts. Feel free to reach out to us here at ratio.dev, and we will definitely sit down with you and help you put together the tools, the API calls, the MCP configuration, the testing, the security, so that your application can achieve the same goals as what I've been talking to you about with Conjuror. So, uh, yeah, that is the big picture of how, uh, to enable your Bubble application to work inside or collaborate with an MCP server. Sometimes you may have tools that are just actual API calls to Bubble. And so you'll just create a mini tool in Relevance that calls an API in, in Bubble. That's That's another simple thing. So it doesn't, they don't all have to be super complicated. Some of them can be really simple. I mean, you know, one tool may just be in my CRM, move a lead from one status to the next. Okay. That can be, you know, that can be super, super fast. Before I wrap up, don't think about this as, okay, this is something I should do down the road. This is mission critical, I think. I mean, right now. This is, could be a standout, make the difference feature for your software. And so I really think that this is worthwhile for you. Yeah. Like I said, we're here for you. Be sure to go to ratio.dev and sign up for our no-code resource center. Check out our school community. That's where all our videos go first. That's where they're all organized into courses and it's really easy to find all that content. So, uh, yeah, if you've enjoyed this video, give it a like, give it a thumbs up, subscribe to our channel. If you haven't done that yet, do it please. It just makes us happy. And thank you very much for listening. And I will see you on the next video.
More from Dennis

Is Google Killing Websites? The Future of Search, SEO & Web Design After Google I/O

Something we're still looking forward to in Bubble: richer design experiences! #bubble #nocode #ai

Big mistake companies are making right now: firing employees instead of empowering them. #ai







