MCP Servers
Last updated
Was this helpful?
Last updated
Was this helpful?
Check out this resource instead: Chatbots
MCP stands for Model Context Protocol, and is essentially a standardized way for AI models (also referred to as Large Language Models, or LLMs) to interact with other services.
Think about the typical flow every time you interact with an AI. You, the user, utilize a client, like ChatGPT, to send instructions or ask questions to an LLM. The client is responsible for taking your input and transforming it into a way that the LLM you're interacting with can understand.
With MCP in the mix, clients are able to take your input, and instruct an LLM on how to interact with other services and tools, like your Xano database, for example. Each separate task that is exposed to the client via the MCP standard is called a tool.
Xano's MCP Servers feature allows you to build tools just like you build any other function stack and expose them to any client that supports the MCP standard, opening up the opportunity to build for AI, using the power of visual development in Xano.
MCP stands for Model Context Protocol.
At its core, MCP is a standardized framework that enables seamless communication and interaction between AI models (especially Large Language Models, or LLMs) and external services. Think of it as a universanguage and set of rules that allows AI models to go beyond their internal knowledge and capabilities by intelligently leveraging external data sources, tools, and functionalities.
Traditionally, interacting with external services from an AI model required complex and often proprietary integrations built into specific clients. MCP simplifies this by providing a consistent and structured way for client applications to describe available tools and instruct AI models on how to use them. This includes defining the tool's purpose, its input parameters, and how the AI model can expect to receive results.
Building MCP Servers in Xano offers a fundamental shift in how you integrate AI capabilities into your applications. Instead of being limited to building traditional REST APIs for standard web or mobile interactions, Xano's MCP Servers empower you to create AI-native functionalities.
You can build function stacks in Xano specifically designed to be used by AI models. This means that you can create tools for your AI to:
Retrieve specific data from your Xano database based on natural language queries
Perform complex data manipulations and calculations triggered by AI insights
Write data back to your Xano database based on AI-driven decisions or user requests interpreted by the AI
Interact with other external APIs and services through your Xano function stacks, orchestrated by the AI
Interact with your own APIs and services you've already built in Xano through the AI
We have built our current MCP support using the SSE transport method. Only tools are available at this time.
You can use any available function we have today in your MCP servers.
As MCP is an evolving protocol, we aim to continue to expand the functionality as it develops. If you are utilizing MCP in Xano and have any feedback or questions, please reach out to our support team.
To build MCP servers in Xano, we'll first need to create a server that will house some tools.
Name
Give your server a name that clearly indicates its purpose.
Description
This is an internal field just for you to expand on the purpose of the MCP server.
Allow Connections
Choose whether or not to allow connections to this MCP server
Add Tag
Tag your MCP servers for easier search throughout your Xano workspace.
MCP Instructions
These instructions are what your clients will look at to understand the purpose of the MCP server. Markdown format is recommended for easy readability for your LLMs and clients. These instructions apply to the server as a whole, and are not used for individual tool instructions.
Tools are essentially individual actions that your MCP server can perform, such as querying a database, adding new records, or calling an external API. You'll build tools just like you build any other function stack.
Name
Give your tool a recognizable name. This is also the command that will be used to execute your tool.
Description
This is an internal-only field just for you to describe the purpose of the tool.
Allow Connections
Enable or disable connection to this specific tool
Add Tag
Tag your tools for easier search across your Xano workspace
Authentication
Determine if this tool requires an authentication token
Tool Instructions
These instructions are what your clients will use to understand how to send requests to the tool, and what the expected result will be. Markdown format is recommended.
We also have some specific functions that may be useful to you when building tools that allow you to interact with existing function stacks.
It's important to understand that MCP is an evolving protocol. Authentication methods and best practices are in flux and may change. The best course of action right now for per-user authentication is to build a custom client that can authenticate your users.
Your MCP tools can have authentication enabled. The method of authentication is a bearer token, similar to the secure APIs you're already building in Xano. You'll include a valid token inside of your client's configuration (if you're using a ready-made client such as Claude Desktop or Cursor), and it will send that token along with your requests.
If you are building a publicly available application with its own user base, and need to make sure that your tools work across your set of users and separates data properly, you'll need to serve your own client that can handle dynamic authentication.
Our end-to-end MCP Server tutorial, linked below, walks you through one example of building your own server and client, both using Xano.
Now that you've built an MCP server and added some tools to it, you can connect with your client of choice. Choose from the list below for a quick getting started guide.
If you're new to MCP servers, we recommend starting with Cursor.
There are some best practices when building tools that we recommend following for the best experience.
Use clear naming conventions and instructions.
Try to find a balance when writing instructions between being clear and descriptive, but also concise. Reducing the amount of tokens sent to an AI model will reduce token cost, improve speed, and improve responses.
Use error handling with clear error messages. If an AI model fails to use a tool, clear error messages will allow it to retry the tool successfully.
What are the benefits of using MCP?
Standardization: MCP provides a common way for different applications and LLMs to interact, reducing the need for custom integrations.
Interoperability: MCP enables different LLMs and applications to work together more easily.
Flexibility: MCP allows developers to connect LLMs to a wide range of external resources.
Efficiency: MCP streamlines the process of building AI agents and applications.
Is MCP tied to a specific LLM or platform?
No, MCP is designed to be an open and vendor-neutral protocol, allowing it to be used with various LLMs and platforms.
How does MCP relate to APIs?
While APIs provide access to specific functions, MCP provides a standardized way for LLMs to discover and use those functions in a context-aware manner.
What is the role of "context" in MCP?
Context is crucial in MCP. It provides the LLM with the necessary information about the user's request, the available tools, and the overall environment, enabling the LLM to make more informed decisions.
How is security handled in MCP?
MCP emphasizes secure communication between clients and servers. Mechanisms like authentication, authorization, and secure data transfer are important considerations in MCP implementations.
Can I build multiple MCP servers?
Yes, in Xano you can build multiple MCP servers and they can all have their own tools available.
If you haven't already, make sure you're familiar with Xano's .
Use wherever possible so the AI model understands what options are available for your inputs.
Introduction to MCP
Build an MCP Server in 10min or Less
MCP Tools and Functions
Building an MCP Server & Client