The Xano MCP Server is an implementation of the Model Context Protocol for interacting with the Xano API, enabling you to manage Xano database operations through a standardized interface. It provides secure authentication and type-safe interactions with your Xano data.
To get started with the Xano MCP Server:
# Clone the repository
git clone [your-repo-url]
cd xano_mcp
# Install dependencies
npm install
Setting up your environment variables:
# Copy the example environment file
cp .env.example .env
Edit the .env
file with your Xano credentials:
XANO_API_KEY=your_api_key_here
XANO_API_URL=your_xano_api_url
NODE_ENV=development
API_TIMEOUT=10000
Variable | Description | Required | Default |
---|---|---|---|
XANO_API_KEY | Your Xano API authentication key | Yes | - |
XANO_API_URL | Xano API endpoint URL | Yes | - |
NODE_ENV | Environment (development/production) | No | development |
API_TIMEOUT | API request timeout in milliseconds | No | 10000 |
Start the MCP server:
# Build the project
npm run build
# Start the server
npm start
# Alternatively, run in development mode
npm run dev
To list all available workspaces:
// List available workspaces
const result = await mcp.use_tool("get_workspaces", {});
console.log('Workspaces:', result);
Creating and working with tables:
// Create a new table
const createResult = await mcp.use_tool("create_table", {
workspaceId: 123,
name: "MyTable"
});
// Add content to a table
const addResult = await mcp.use_tool("add_table_content", {
workspaceId: 123,
tableId: 456,
content: {
created_at: "2024-01-22T17:07:00.000Z"
}
});
// Get table content with pagination
const getResult = await mcp.use_tool("get_table_content", {
workspaceId: 123,
tableId: 456,
pagination: {
page: 1,
items: 50
}
});
// Update table content
const updateResult = await mcp.use_tool("update_table_content", {
workspaceId: 123,
tableId: 456,
contentId: "789",
content: {
created_at: "2024-01-22T17:07:00.000Z"
}
});
Get information about all tables in a workspace:
// List all tables in a workspace
const tables = await mcp.use_tool("get_all_tables", {
workspaceId: 123
});
console.log('Tables:', tables);
The response will be an array of table objects with details:
[
{
id: number,
name: string,
description: string,
created_at: string,
updated_at: string,
guid: string,
auth: boolean,
tag: string[],
workspaceId: number
},
// More tables...
]
The server provides detailed error messages for various issues that might occur:
This makes troubleshooting easier when integrating with your application.
To add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "xano" '{"command":"npx","args":["xano_mcp"]}'
See the official Claude Code MCP documentation for more details.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"xano": {
"command": "npx",
"args": [
"xano_mcp"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.config/Claude/claude_desktop_config.json
2. Add this to your configuration file:
{
"mcpServers": {
"xano": {
"command": "npx",
"args": [
"xano_mcp"
]
}
}
}
3. Restart Claude Desktop for the changes to take effect