Building Tool-Calling Agents With Databricks Agent Framework and MCP
Summary
- Model Context Protocol (MCP) integration: This video explains how combining Databricks' Mosaic AI Agent Framework with MCP provides a standardized way for AI agents to interact with external tools, data, and APIs.
- Tool-calling capabilities: Learn how MCP enables agents to retrieve structured and unstructured data, execute custom code, and tackle real enterprise challenges with governance and security built in.
- Governed agent deployment: Discover how Unity Catalog functions can be integrated as agent tools, enabling enterprise deployments that maintain governance and security standards.
Building Tool-Calling Agents With Databricks Agent Framework and MCP

Talk by Elise Gonzales, Staff Product Manager, Databricks ; Siddharth Murching, Software Engineer, Databricks
Want to create AI agents that can do more than just generate text? Join us to explore how combining Databricks' Mosaic AI Agent Framework with the Model Context Protocol (MCP) unlocks powerful tool-calling capabilities. We'll show you how MCP provides a standardized way for AI agents to interact with external tools, data and APIs, solving the headache of fragmented integration approaches. Learn to build agents that can retrieve both structured and unstructured data, execute custom code and tackle real enterprise challenges. Key takeaways: Implementing MCP-enabled tool-calling in your AI agents Prototyping in AI Playground and exporting for deployment Integrating Unity Catalog functions as agent tools Ensuring governance and security for enterprise deployments Whether you're building customer service bots or data analysis assistants, you'll leave with practical know-how to create powerful, governed AI agents.
Databricks Named a Leader in the 2025 Gartner® Magic Quadrant™ for Data Science and Machine Learning Platforms: https://www.databricks.com/blog/databricks-named-leader-2025-gartner-magic-quadrant-data-science-and-machine-learning
Build and deploy quality AI agent systems: https://www.databricks.com/product/artificial-intelligence
See all the product announcements from Data + AI Summit: https://www.databricks.com/events/dataaisummit-2025-announcements
Chapters
0:00Introduction and agenda0:48Forward-looking statements1:56MCP and tool standardization4:02Telco multi-agent overview6:22Playground prototyping10:37Coding and deploying the agent14:37Building custom MCP servers16:46Updating custom MCP servers21:29Data-powered tools with UC26:19Summary and takeaways29:27Conclusion
FAQs
What is the Model Context Protocol and why is it important for agents?
MCP provides a standardized way for AI agents to interact with external tools, data sources, and APIs, solving the complexity of fragmented integration approaches and enabling more capable autonomous agents.
How does Databricks Agent Framework support MCP?
This video demonstrates how the Mosaic AI Agent Framework integrates MCP, allowing developers to build agents that can prototype in AI Playground and export for production deployment with proper governance.
How do MCP servers and data governance connect?
MCP servers expose tools that agents can invoke, and governance must span multiple layers: controlling which tools agents access, which data those tools connect to, and what operations are permitted. Databricks integrates Unity Catalog with MCP to enforce consistent data governance across all tool invocations on the Databricks Data and AI platform.
How can I govern MCP servers and tools?
Control MCP governance by limiting which MCP servers are available in your organization, specifying which agents can invoke specific tools, and enforcing data access controls through Unity Catalog. This layered approach prevents unauthorized data access while enabling agents to perform necessary operations on the Databricks Data and AI platform.
How can I secure MCP servers in enterprise environments?
Secure MCP deployments through authentication and authorization controls at the server level, comprehensive audit logging of all tool invocations, and network isolation where appropriate. The Databricks Agent Framework integrates security so agents operate within defined boundaries and cannot circumvent data governance policies on the Databricks Data and AI platform.
Full transcript
0:00 Introduction and agenda
Welcome everyone. We're really excited to have you with us today. Um, when and I were concocting this summit session a couple months ago, we knew that there was going to be interest in MCP. I don't know if we knew there would be this much interest in MCP. So, really excited to see you all today. Just to introduce myself. I work on building agents at data bricks both with our low code no code solution with agent bricks but also with our code first agent framework.
Uh thanks and I'm a tech lead on the agent platform team working together with to help folks build uh custom agents and you know also this MCP effort. Awesome. Perfect. Let's dive in. Perfect. Okay. So if you've been in any sessions so far today you've probably seen this warning. It's a forward-looking statement. A lot of this may change as we start to roll it out. So, don't take everything um as perfect immediately, but let us know what you're interested in.
0:48 Forward-looking statements
Please complete your surveys. We do take feedback really seriously. We really appreciate the time that you're taking both for summit and for giving us feedback. It does affect our sessions and how we organize. So, would love to hear from you all. And then in terms of an agenda, it doesn't feel like Okay, we're going to skip the clicker. Uh, I'm gonna move in front of you. Perfect. So, we'll start with the state of the union.
What has it been like to develop so far? Why are we excited about the opportunity with MCP? We'll then prototype and deploy an agent with using an MCP server or set of servers for tools. We'll then build and deploy a custom MCP server on data bricks. Finally, we'll add some more tools to our agent. And then we'll end with some takeaways. So, why are we excited to be here? What's the state of the union? We all know tools make agents better.
1:56 MCP and tool standardization
It's the way that they really take action and move from being a chatbot into something that can start to move autonomously and actually act on your behalf. They elevate it really to more than just a chat. So in this example here, you can see I have some vector search indexes. I may also have a delta table with order history. And so this gives me a much more complete picture for my customer of what their order status is as well as company policies on things like returns.
So it really makes your agent a lot more capable. But what have we heard? Why is it hard to use tools today? First, how do LLMs know what tools are available? They're much better at natural language than they are at REST APIs. There also isn't a standard in the community. So how do we build momentum? How do we start to reuse tools? across different companies or across different domains without having to rebuild everything ourselves.
And finally, I want to democratize building and using tools and building and using agents, but I still need governance on top of them. How do I make sure the right people have the right access to tools or the right access to data? And that carries through as I'm developing them with all of these opportunities. That's why we are really excited here. And so this is why Mosaic AI and Unity catalog work really well with MCP.
Mosaic AI and Unity catalog really great for discoverability. So you can see the functions that you have available, the functions that are available to you as well as governance. So how do you maintain permissions? How do you make sure that those carry all the way through, especially as you start to query data? And that works really, really well with MCP. MCP is excellent because it's built for LLMs. So, it's really meant to give Claude and a lot of these tool calling models the ability to understand what tools there are so they can use those tools more effectively.
And I think as we see in this room, there's a lot of community support and so there's a lot of momentum we can build with MCP around using tools and start to build a lot more capabilities into our agents. So, how do they work together? I think the sort of blanket statement here is that we can standardize tools with MCP and then we can govern and deploy with data bricks. So we're actually launching a couple of things today and in the next couple of weeks.
4:02 Telco multi-agent overview
The first one is we will have a set of managed MCP servers to do data retrieval in Unity catalog. So you'll be able to expose that data via those managed servers. I should have updated the slide because it was available as of this morning. Um and your governance is maintained. So on behalf of user o for these are is supported out of the box. So for instance if I had access to a vector search index but did not we both hit the URL for m for the vector search MCP and he's not suddenly going to get access to it.
So we are maintaining that governance all the way through including to the servers that we're managing. The second piece here is you'll be able to build and deploy secure MCP servers. You'll be able to do this really easily. going to show you a really great demo of that using data bicks apps which has OOTH out of the box and a really great development workflow. You all might have seen some of that during the keynote this morning.
It also comes again with built-in governance and management. So you still have that governance layer on top as you're starting to build out these MCP servers. And then finally, you can prototype and deploy with Mosaic AI. So you'll be able to prototype agents using MCP with our AI playground experience. That gives you a really great way to start building an agent without having to write any lines of code for it. And then you'll also be able to leverage MCP servers in agent bricks.
You saw some of that in the demo from this morning as well. Let's dive in. What we'll be building today is uh if you saw my talk earlier this morning, I did also build out a telco customer multi- aent. But specifically for this talk, we'll be focusing on the tech support agent. We'd like it to do a couple of things. First, obviously provide tech support. So, it needs to have access to a knowledge base, a set of FAQs so that it can answer questions about what's going wrong with a customer's device or even with their account.
But, we also want it to be able to check for outages. Let's say and I work at this telecom together and we have an internal outage server. And so, if someone's having issues with their device and they're asking the tech support agent, why can't they ask about outages as well? So now I'm going to show you how to prototype and deploy the agent using our AI playground experience. It's like where is my mouse on that screen?
6:22 Playground prototyping
Which way is it? This way. Sorry, guys. I've lost my mouse. The mouse is on. Oh, there it is. I found it. Haha. Amazing. All right, so we're going to jump into our playground experience, which is right here under AIM ML. And so you can access that really easily. And so I'm going to start with Claude. It's a really great tool calling model. And so has told me that he's made this outage server available and it's ready to use.
And so I'm ready to build my agent. So we're going to go under add tool here. And you can see that we now have a section under add tools that's specifically dedicated to MCP servers. The first thing I'm going to do in here is I'm going to test the server that made available. So I know that this is a custom MCP server. This is something specific to our business. And so I'm going to look and look. See, I found our outage server.
Awesome. All right, let's see if it works. So, what tools do you have? Let's start by getting a lay of the land of what tools are available. Awesome. Okay, so we can see here that there's a check outage status tool. This allows you to check for network outages in a specific region. So, it gives you a sense of also what context you need to provide to the model in order to leverage the tool. And we also have a get network message uh get network metrics tool.
What I'm going to do here is I am going to ask is there an outage in the Moscone center? So let's see is there an outage right now? Can we actually get one of these tools to work? Awesome. So it's going to check the outage status. You can see that right here. And you can see that it put in Moscone center the output here. So what it was returned from the server and so based on the information I've retrieved there is currently an active outage affecting the Mosone center.
Oh no, this is fake. But you can imagine that this would be really useful and shows you immediately whether or not your MCP server is working as expected and also whether or not it's interacting with your model the way that you expect it to. So now let's also add some knowledge based articles and some support tickets so that we can also make this more well informed as people are troubleshooting should there say like not be an outage.
So I'm going to go and add tools. I'm going to hop under MCP servers and this is where our data bricks managed MCP servers come into play. So what I'm going to do is I'm going to I'm going to leverage some vector search indexes that I know another of my colleague went and built out already. So I'm going to choose a schema. and our team, we've all been working in this MCP uh agent schema here. And I have a couple of vector search indexes.
So I have one for my knowledge base. And then I also have one for my support tickets. So that way I can also look at troubleshooting steps that we've completed for other customers. I'm going to save that. And then I'm going to say, what tools do you have now? Perfect. So let's see. Did we actually get those updated tools available? All right, look. We have both our support tickets and our knowledge base. So, let's try to use one of them.
What's the unexpected charges policy? Let's see if we can use the knowledge base and look up one of our policies that I, as a support team member or support uh person would know about. So, it's going to uh query our vector search index here. It's going to ask for unexpected charges policy refund billing dispute. So, it's doing a semantic search here so that we can find the right documents associated with it. And then in a second here, we should get back a couple of different articles from our knowledge base.
Awesome. So, you can see in here that it did go and query over vector search. It found um the dispute period. It pulled out some of those key points from our knowledge base. And it even as well hooked right into playground. So it provided citations so that I could even open one of these and look and verify that the model got the answer correct. So now I've essentially prototyped my text support agent. So what do I do next?
I could go and uh export code and work in a notebook, but my team and I, we've been working in a git based workflow. So I'm actually going to open Intelligj, which is where we've been working. So I'm going to start here in our agent. Um, if you've worked at all with our agent framework, a lot of this code should look really familiar to you. So, you can see here we have claude 37. That was what I was just prototyping with.
10:37 Coding and deploying the agent
We also have a helpful system prompt. I did not put that into playground, but you can imagine I might have written that in here. And then I simply also have some MCP server URLs. So, the first one I have available is uh for my vector search index. So you can see that the API shape is API 20 MCP vector search and then I provided the catalog in schema where those vector search indexes were available. The other one listed here is our custom MCP server that gave me those network outages.
Great. And so now as I scroll down and I start to look at this, you can see that most of what's changed in my agent here is that I can get the tool specs. So I fetch all of the MCP tools in an OpenAI style. So we're mixing and matching here a little bit. Want to get the best of both worlds. And so I can get those tool infos and make sure that um I'm able to actually deploy this agent at the end of the day. The nice thing too is that you also get an MLFlow trace.
So especially as you start to use MCP potentially some of the tools change on your server. You'll be able to dig in and really understand what tool was being called, was it the appropriate tool, uh was a tool potentially removed? And so it started fetching around for other tools. And so that's going to be an important part as we start to lean into MCP. Then here, if I look at my uh tool definition, a lot of this, if you're familiar at all with MCP, should look pretty familiar.
So we have a context manager. We're connecting to our MCP servers uh over async with streamable HTTP. So again, this is really standard, pretty boilerplate code that uh just shows you that you can integrate directly with MCP here. And so you can list your MCP tools. That's one of the required methods that you have to do. And then you can also execute an MCP function. Awesome. And then all I have to do from there is deploy my agent.
Again, if you are at all familiar with the uh agent framework, this should also look really familiar. So I'd like to register my model in UC. So that way I have governance and I have tracking of where that model is being used. And then you can see I start to log my model to MLflow and then start to go through the deployment. So I can get a serving endpoint and then ultimately actually leverage my agent in a multi- aent system.
Let's go and deploy our agent. All right. So I'm going to start running that. And what we'll see here is that it's going to start by logging that model with MLflow. And then it starts to print out everything that it's doing behind the scenes. I'm not going to make you all sit through this. So we have actually already deployed this endpoint. We're just going to refresh that. Perfect. All right. And so you can see here um we've already deployed this.
We have an active version right now. And once we get the next model version deployed, you'll see another pending version. But a great thing about our serving endpoints is that they are zero downtime. So until that next pending deployment is available, you'll still have the old version here as well. Let's make sure that this is actually still the same thing that I had prototyped. So let's jump into playground again. And you can see instead of having selected claude and seeing tools, you can see it's my deployed agent here.
So what tools do you have? Hopefully I can type. Perfect. So here we should see our network outage tool, our network metrics tool, as well as our two vector search indexes that we added. Perfect. So we see our knowledge base, our support tickets, our outage, and then our network metrics. So our agent works as we were expecting. And it was actually pretty easy to do this with MCP. So what did you all just see? We were able to prototype and deploy an agent using an MCP server with tools really easily using the agent framework we have in Mosaic AI.
14:37 Building custom MCP servers
So we prototyped it in playground with Claude. So you want to be able to prove out your agent without having to write code for it. It's much easier to prototype in something like Playground and make sure it's working as you expect it to. You can export the code to get started quickly. I know we didn't show that, but that will be a flow that we support very shortly. And then you can also debug and deploy your agent. So I could see that serving endpoint in there.
Um my old version was available until I have my new pending version which will get uploaded soon. And so I'm going to hand it off now to and he'll show you how he created our outage server. Cool. Uh yeah, thanks. So let's get into how we built this MCP server. Uh and to start with I'm going to show you kind of like what my developerf facing view looks like in the data bricks product uh as I go about and build a server.
So first let me go back to data bricks workspace and I can find my MCP server deployed as a app under data bricks apps. Uh you can see there's this telco outage server here and uh yeah the nice thing actually about having this deployed as an app there's a couple of benefits. One is uh you can see there's like kind of governance and security here. There's permissions on who can actually use my server. Uh you can see I explicitly granted at least permission which is why she was able to actually go ahead and prototype and actually try connecting to the server.
Right? And then uh the other nice thing is actually data bricks apps lets you host basically any generic Python or JavaScript application right so I actually implemented a front end as well for my MCP server and you can see it's kind of like a little ops panel nicely vibe coded uh basically I can you know I can go look at uh the individual tools available in the server and also I can actually go and list uh list tools here as well.
So yeah, you could see the tools that um was using. And yeah, so in terms of how I actually built this thing, um you can actually do this at home as well. If you look up uh data bricks MCP, there's some some documentation here. Um we have some guides on how you can host your own server on data bricks apps. And there's actually like a example repo here as well that basically, you know, provides you some of the templating needed to host and deploy your own server.
16:46 Updating custom MCP servers
And basically what I've done here is I just kind of forked and cloned that thing locally. And if I go and look show you my actual server implementation. Um again kind of similar to the agent code. It's basically standard open source MCP server code here like you know just using the Python SDK to define my server. Um defining the individual tools as Python functions here. Uh and yeah this is basically the uh setup. The actually the only data brick specific thing I had to add is uh this app. yaml file which just tells uh data bricks like when I actually deploy the server to apps what's the command to run right to run the server.
Um so I'm going to go ahead now and actually show you an example of like updating the server to include a new tool. U so currently you know we saw there's tools for retrieving outage information network metrics. Uh but it would be nice also if people you know they're asking questions like I can't send texts or you know my phone phone isn't working like for them to actually be able to report uh issues as well. Right. So I'll go ahead and add a tool here for I have this copy pasted so I don't typo it.
Uh a tool for reporting network issues. So this is a a function here that's going to take in the type of issue uh that's ongoing like is it an outage potentially a degraded service um the region where the issue actually happened and then finally like a description and then it's basically just going to send an API request to my uh yeah telco back end to like report the issue. Uh, and yeah, the nice thing about apps is I can, you know, having this MCP server deployed as apps is I can just go ahead and actually run the server locally to test my changes.
So, I'm going to run uh basically the same command that you saw in the app. l to run the server. Uh, so it's running. And now if I pull it up, uh, yeah, what I should be able to see is, for example, if I go back to that ops panel and I list the tools again, now I can see my new tool, uh, here. And if I want to go ahead and deploy that, uh, to data bricks for, you know, my agent to use, other people's agents to use, um, through the server URL, that's also actually quite simple.
Uh, it actually shows me how to do it from the the app's UI. I basically just need to sync my local code over to datab bricks. So sync my local folder over to the data bricks workspace and then just trigger a redeployment of the app. Uh so I'm going to go ahead and do that. Uh let me first sync the code over. Yep. You can see it detected the change to my server logic. And now let's go ahead and deploy the server. So the server name I mean the app name and then the code path containing the code I just synced.
Um so let's do that and then yeah it's going to basically okay sync the code over and deploy the app. And now if I take a look at the live app again I should be able to see my new tool here as well. If I go to the bottom, yep, I can see my new tool. And then, yeah, if I go into playground again, actually, I can just reuse this existing session. Uh, this is, I guess, one of the nice things is I'll just should just discover the tool and, uh, run it.
So, if I say something like I can't send texts at Mosone Center. Uh, it like seems like a total outage. Uh, let's say something like that. Uh, can I report this issue? uh see what happens. So basically the my new tool should be discovered and let's see what Claude uh does with it. Cool. Uh okay. Yeah, it looks like it's using my my new tool. So it's going to report an issue saying, "Yep, can't send text messages." Called the tool uh and created a support ticket.
And it's telling me, yeah, the ticket's going to be resolved in, let's say, four hours. Um, cool. So, let's go back and, uh, kind of show see what we kind of saw here. Basically, in this example, what we saw is, yeah, you can build your own MCP servers to expose tools, host them on data bricks apps. Um, you know, the hosting is secure, so you can kind of govern who can use your server, have discovery of those servers.
21:29 Data-powered tools with UC
Um and we also provide a template for easily getting started uh and how to host your own custom server uh on apps, right? And uh yeah, that same template is actually also available on data bricks marketplace as well as GitHub. U so uh and yeah, I guess just to reiterate too, I think one of the nice things at least for me as a developer when I do deploy my server in this way is just the fact that I don't have to go through additional security approvals and things like that, right? like data bricks already signed off so I can just deploy my app here and prototype and you know not worry about that process.
Um cool. So now let's take a look at um doing something similar to what did with using the managed MCP servers but uh kind of in code. So like let's say I want to add some additional data powered tools to my agent. Uh I'll go ahead and actually just take a look for this uh for this to actually look at what existing data do we already have uh for our use case in the product. So if I open back up the catalog, I go to the schema where and I have been collaborating, I can see uh there's actually a bunch of stuff under here.
There's basically a combination of tables, volumes, um, as well as like functions for structured data lookup. So, let me take a look here. And, uh, there seems like there's some useful ones in here. There's things like get billing info for a particular customer. There's, uh, things like, yeah, list, I guess, available devices in our product, I guess, ongoing promotions. Okay, so these seem useful. And you can see they're all kind of namespaced under this telco support uh MCP agent schema.
Um so what I can do is actually if I go back to uh data docs here like uh you can see data bricks provides like a managed MCP server for uh running UC tools as well UC functions. Um so to include those tools into my agent I just need to include the server URL which looks something like my workspace and then this path of you know API 202 functions and then catalog schema name. So uh yep and I can actually I can do this as well in playground.
Uh so let me go ahead and add it there. I'll go ahead and add the same schema telco support MCP agent. And this will make all those kind of billing and customer info and other structured data lookup functions available to my agent. And so now if I ask something like uh uh what was the bill for say I'm like helping a customer and I I you know want to uh get their bill. I can ask for a particular customer and should be able to see uh claude discover and select.
Yeah. Okay. It's going to discover and select the billing tool, run a SQL query to look up some information uh and get the result and then summarize uh what my bill was. Yep. So it's able to get the result through SQL and then summarizing it and say yeah had two bills last month and the total is whatever this amount. Um cool and then yeah if I wanted to include this in my agent code this also like uh quite simple is basically if I go back to the MCP server URLs I add that URL format that we looked at earlier.
So it's my workspace URL API 2. 0 MCP and then I'll just put uh you know functions in here and then same schema and um now if I want to go ahead and like test out my agent code and I can ask it a question like uh maybe the same one like what was what was the average bill for customer uh over the last year? Uh let's try something like this. uh and then go ahead and run my agent. Um yeah, and what you'll see is like I can you know I can basically do the same thing in my code first development as well, right? plug in the server URL and uh while it runs I'll show you like yeah the nice things are basically these the tool utilities that mentioned data bricks provides kind of helper APIs for making the off automatically work right when to connect to this MCP server and yeah I can basically see okay what it did is yeah discovered all the tools called my new one produced the result and uh yeah got this got this average monthly bill um cool so the nice thing here too again is that uh when I use this manage MCP server like all the data I'm looking up all the functions vector search that I use I'm only able to use because I have permission uh in unity catalog.
26:19 Summary and takeaways
So like the same data governance uh applies here end to end. Um, yeah, and but it's it's really easy for me to just go ahead and plug that set of tools or data into not only my own custom code agent, but I could also plug it into any agent that kind of understands how to accept an MCP URL, right, and do OOTH um to our server. So, that's, you know, I guess one of the big benefits of MCP. Um, cool. So, let's take a look at uh what we saw here.
Um, yep. This was an example of basically how to connect to your data on Unity catalog through MCP. Uh, you can use these like managed MCP servers that data bricks provides now in beta. You don't have to host your own if you want to access data on data bricks. Um, and then we use that managed server to run some UC functions through MCP for like structured data lookup. And uh yeah, as we mentioned, like the benefit is you can also kind of reuse these servers uh across agents, both your own custom code ones and uh third party ones as well.
Cool. So now I'll hand it back to for some takeaways. Awesome. Thanks. Perfect. So to summarize what you saw here today, uh we're really excited to see a standardization of tools with MCP and being able to then govern and deploy them with data bricks. So that starts with our managed MCP servers for UC data retrieval. So again I should have updated this slide but those are actually available as of yesterday. But again your governance is maintained out of the box.
So that's really important as you start to interact with your data. It's really sensitive to your company and you don't want to be managing permissions in many many different systems because that gets very very ownorous. We also showed you how to build and deploy secure MCP servers leveraging data bricks apps. You get built-in governance, management, OOTH out of the box. And again, those that governance and permissions are maintained as well and a really pretty uh spiffy development workflow.
And finally, we showed you how to prototype and deploy with Mosaic AI. So, prototyping agents using MCP in our AI playground experience. And we didn't show you this, but it will be available when we have our multi-agent supervisor. you will be able to add MCP servers into our multi-agent supervisor in agent bricks. So if you want to try it yourself, here's a QR code. This links to the docs that mentioned. There's also a tiny URL in case that's easier, but we would love for you all to try this.
Give us feedback. We'd love to hear how that goes. So thank you.
Learn more about the Databricks Data and AI platform.
The information provided herein is for general informational purposes only and may not reflect the most current product capabilities or configurations.