Why build MCP servers in Xano?
Instead of being limited to REST APIs designed for web and mobile apps, you can build AI-native functionality: function stacks meant to be called by an AI model in response to a request like “Check the user table for any admins that haven’t logged in since the first of the month, and send them a reminder about our activity policies.” That means 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 external APIs and services through your Xano function stacks, orchestrated by the AI
- Interact with the APIs and services you’ve already built in Xano
What’s supported with Xano’s MCP Builder?
Servers you build in Xano speak Streamable HTTP, the transport the official MCP SDK has standardized on — that’s the connection URL to hand your clients, and the one to build against. You can use any function we have today in your MCP servers. Xano MCP servers support the2026-07-28 MCP specification, and keep serving clients on every earlier version (2024-11-05, 2025-03-26, 2025-06-18 and 2025-11-25) from the same URL. There’s nothing to configure: each client gets every feature its version supports, and existing clients keep working as before.
Getting Started with MCP Builder
First, create an MCP Server.
To build MCP servers in Xano, we’ll first need to create a server that will house some tools.From the sidebar, click Agents & MCP
Click + Add MCP Server to create your first MCP server
Fill out the necessary information
- 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.
After you’ve created a server, add some tools.
What is a tool?
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. Most of the time you already have the logic — an API endpoint or a function stack you built for your app. Exposing one of those as a tool is a couple of clicks and leaves you with one stack to maintain, so start there. Build a tool from scratch when there’s nothing to reuse.Tools, prompts and resources
An MCP server can offer three kinds of things. Each one is its own workspace object that you build once and attach to one or more servers. The server page has a tab for each, and the Connect menu attaches them: Connect Tool, Connect Prompt or Connect Resource.Tool
Prompt
Resource
orders://{order_id}.Using Existing Function Stacks as Tools
In the existing function stack, click the ⋮ settings icon in the upper-right corner and click Use As AI Tool
Choose the MCP Server you'd like to add the tool to, and give it a name. This name is what the command will be, so make sure it's understandable
Navigate to your MCP Server and check for the newly created tool

A tool created from an existing API endpoint
Adjust the settings for your newly created tool and add instructions
Creating Tools from Scratch
In your MCP Server, click + Add Tool
Fill out the required information
- 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.
Build your tool's function stack
When you're ready, publish your changes
Tool metadata
Beyond its name and instructions, a tool can tell clients how to display it and what it returns. Open the tool, then ⋮ → Settings. Title sits under the name, and the rest is in the MCP section. All of it is optional, and a tool sends only what you set.48x48, or any) and theme (light or dark). The source must be an https URL or a base64 data: URI of a PNG, JPEG or WebP image of at most 64 KiB. Click Upload Image to save an image to your workspace Files and fill in the icon for you. SVG and http URLs aren’t accepted.
Prompts and resources take a Title and Icons in the same way.
In XanoScript, these are fields on the tool:
Structured output
A tool’s result reaches the client in one of two ways, depending on whether it has an output schema.- Without an output schema, the tool returns its result as text, exactly as before. Strings are sent as they are, and anything else as JSON.
- With an output schema, Xano validates the result against the schema and returns it as
structuredContent, alongside the same JSON as text for clients that don’t read structured content. The tool also advertises the schema as itsoutputSchema, so clients know the shape in advance.
Tool output does not match its output schema: items[0].name: expected a string, got int.
A tool with an output schema can also return a full MCP tool result that it builds itself, with content, structuredContent, isError and _meta. Xano passes it through, after validating its structuredContent.
MCP Authentication
Your MCP tools can require authentication, and there are two ways a client can satisfy it.A bearer token on the Authorization header
Set a tool’s Authentication on, and Xano validates the token the same way it does for the secure APIs you’re already building. You paste that token into your client’s config and it rides along with every request. This is the quick path, and it’s all most header-capable clients need — Claude Code, Cursor, VS Code, Windsurf, Antigravity, Raycast, Warp, Gemini CLI, Codex CLI. See Connecting Clients for the per-client setup.OAuth sign-in, for per-user identity and OAuth-only clients
Turn on Sign-in (OAuth) in the server’s settings, and clients sign each user in before they connect. Every request then arrives as the person who made it, and$auth scopes data per user natively. There are two modes:
- Hosted: Xano is the authorization server, and your own login page signs the user in.
- External: your identity provider, such as Auth0, WorkOS, Clerk, Microsoft Entra ID, Okta or Amazon Cognito, signs the user in, and Xano verifies its JWT access tokens.
- Your client can’t send a header at all. Claude Web, Claude mobile, Claude Desktop’s Add custom connector dialog, ChatGPT developer mode, and Microsoft 365 Copilot are OAuth-only.
- You need per-user identity — on any client, including the header-capable ones.
Require sign-in (OAuth)
Bring your own identity provider
Connection URLs and branches
Each server’s connection URL is under Connection URL on its card in the MCP Servers list, and Copy Connection URL on the server’s page. The URL follows the branch you’re working on. On a non-live branch, the branch name is added to the server’s canonical after a colon, so you can connect a client to a branch and test it before you make it live. A URL without a branch always reaches the live branch.Change notifications
Clients on the2026-07-28 specification can listen for changes to a server. When you add, remove or edit an attached tool, prompt or resource in a way the client would see, such as its name, title, description, inputs or icons, connected clients are told to re-list. Edits to a stack alone don’t trigger a notification. There’s nothing to build: Xano sends them automatically.
URL parameters
You can pass URL parameters as part of your connection URL, such as?beta=true, and read them in your tool function stacks as the params variable to change how the tools behave.
Connecting to your MCP Server
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.Cursor
Claude Code
Video walkthroughs




Best Practices
There are some best practices when building tools that we recommend following for the best experience.- Use enum inputs wherever possible so the AI model understands what options are available for your inputs.
- 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.
FAQ
What are the benefits of using MCP?
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?
Is MCP tied to a specific LLM or platform?
How does MCP relate to APIs?
How does MCP relate to APIs?
What is the role of “context” in MCP?
What is the role of “context” in MCP?
How is security handled in MCP?
How is security handled in MCP?
Can I build multiple MCP servers?
Can I build multiple MCP servers?