Getting Started with Xano MCP

Set up your AI backend developer in 5 minutes. Then build in small, testable increments.

What You’ll Build

In this guide, you’ll:

  • Configure your workspace (2 minutes)
  • Connect to Claude Code (recommended) or Claude Desktop
  • Create your first endpoint
  • Learn the iterative testing workflow

By the end, you’ll understand how to build backends through AI conversation with immediate cURL testing.

Setup (5 minutes)

1. Configure Your Workspace

Visit mcp.snappy.ai and complete the setup:

Step 1: Add Your Xano API Key

  • Get your API key from your Xano dashboard
  • Paste it into the configuration form

Step 2: Select Your Instance

  • Choose from the dropdown (e.g., x8az-7pm0-g3wp)
  • This is your Xano instance domain

Step 3: Choose Your Workspace

  • Select which workspace you want to build in
  • This is where all your tables and APIs will be created

Step 4: Optional Configuration

  • Select branch (if using Xano branches)
  • Choose tool type: SDK version (recommended) or raw XanoScript

Step 5: Copy Your Configured URL

  • You’ll get a unique slug URL like: https://snappy-middleware-old-star-2952.fly.dev/slug/abc123
  • This restricts AI access to your chosen workspace (course-correction, not security)

2. Choose Your AI Environment

Recommended: Claude Code

Why Claude Code?

  • Built-in terminal for cURL testing
  • Iterative workflow built-in
  • See results immediately after deployment
  • Better debugging experience

Alternative: Claude Desktop

  • Also works great
  • Requires separate terminal for cURL testing

3. Add the MCP Server

For Claude Code:

Add to your Claude Code MCP configuration:

{
  "mcpServers": {
    "xano": {
      "url": "https://snappy-middleware-old-star-2952.fly.dev/slug/YOUR_SLUG_HERE"
    }
  }
}

Replace YOUR_SLUG_HERE with the slug you copied from mcp.snappy.ai.

For Claude Desktop:

Add to ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "xano": {
      "command": "node",
      "args": ["/path/to/xano-mcp/dist/index.js"],
      "env": {
        "XANO_SLUG_URL": "https://snappy-middleware-old-star-2952.fly.dev/slug/YOUR_SLUG_HERE"
      }
    }
  }
}

4. Restart Your AI Environment

Restart Claude Code or Claude Desktop to load the new MCP server.


Your First Endpoint (The Right Way)

Now that you’re configured, let’s build using the recommended workflow.

Step 1: Explore Your Workspace

Start your first conversation:

You: "Go into my workspace, familiarize yourself with my tables and APIs"

The AI will:

  • List your existing tables
  • Show your API groups
  • Understand your current setup
  • Prepare to build on what you have

Step 2: Create a Simple Endpoint

Start small to verify everything works:

You: "Create a simple hello endpoint that accepts a name parameter and returns a greeting"

The AI will:

  • Generate the SDK code
  • Transform it to XanoScript
  • Deploy to your Xano instance
  • Give you a cURL command to test

Step 3: Test Immediately

This is critical. Test every change with cURL:

curl "https://your-instance.xano.io/api:v1/hello?name=Sarah"

Expected response:

{
  "message": "Hello, Sarah!"
}

Success! You’ve deployed and tested your first endpoint.

Step 4: Iterate and Build

Now build complexity gradually:

You: "Add an email validation endpoint"

AI generates → deploys → gives cURL

curl -X POST https://your-instance.xano.io/api:v1/validate-email \
  -H "Content-Type: application/json" \
  -d '{"email": "test@example.com"}'

Test passes → continue

You: "Create a users table with email, name, and password"

AI creates table → confirms

You: "Generate CRUD endpoints for users with pagination"

AI creates endpoints → provides test commands

# Test list with pagination
curl "https://your-instance.xano.io/api:v1/users?page=1&per_page=10"
 
# Test create
curl -X POST https://your-instance.xano.io/api:v1/users \
  -H "Content-Type: application/json" \
  -d '{
    "email": "user@example.com",
    "name": "Test User",
    "password": "secure123"
  }'

The Iterative Workflow (How to Build Like a Pro)

Small Changes, Fast Feedback

The pattern:

  1. Ask for one thing
  2. AI generates and deploys
  3. cURL test immediately
  4. Verify it works
  5. Build on it

Why this works:

  • Isolates issues early
  • Faster debugging
  • Better results
  • Less backtracking

Example Session

Building authentication step-by-step:

You: "Create a users table"
AI: [Creates table]
✓ Verified

You: "Add a login endpoint"
AI: [Creates endpoint]
cURL test: ✓ Works

You: "Add JWT token generation"
AI: [Updates endpoint]
cURL test: ✓ Works

You: "Add password hashing with bcrypt"
AI: [Updates endpoint]
cURL test: ✓ Works

You: "Add email uniqueness validation"
AI: [Adds validation]
cURL test: ✓ Works

Result: Complete auth system, every step tested

When Something Breaks

The iterative approach makes debugging trivial:

You: "Add rate limiting to login"
AI: [Updates endpoint]
cURL test: ✗ Returns 500

You: "That broke. Remove the rate limiting and let me review the logs"
AI: [Reverts change]
cURL test: ✓ Working again

Understanding the SDK → XanoScript Transformation

When you ask for an endpoint, here’s what actually happens:

What You Say

"Create a users list endpoint with pagination"

What the AI Generates (SDK)

const endpoint = create('users/list', 'GET')
  .description('Get paginated list of users')
  .input('page', 'int', { default: 1 })
  .input('per_page', 'int', { default: 20, max: 100 })
  .dbQuery('users', {
    pagination: { page: '$input.page', per_page: '$input.per_page' }
  }, 'results')
  .response({
    items: '$results.items',
    page: '$results.curPage',
    total: '$results.itemsTotal'
  });
 
return endpoint.build().script;

What Gets Deployed (XanoScript)

The middleware transforms this into filter-based XanoScript that:

  • Uses Xano’s query filters (not green expressions)
  • Looks clean in the Xano GUI
  • Is reviewable by non-developers
  • Handles pagination properly

This transformation happens automatically. You don’t write XanoScript - the SDK does.


Real-Time Guidance in Action

The SDK provides hints as the AI works:

When AI creates a list endpoint without pagination:

💡 Hint: Consider adding pagination for list endpoints
💡 Watch for pagination variables: curPage, itemsTotal, itemsReceived

When AI attempts invalid XanoScript:

❌ Error: Forward-slash comments not allowed in XanoScript
💡 Use /* */ style comments instead

When AI forgets required fields:

❌ Error: Missing required field: name
💡 Add .input('name', 'text', { required: true })

These hints course-correct the AI before deployment fails.


Next Steps

Now that you understand the setup and workflow:

🏗️ Build Something Real

Try building:

  • User authentication system
  • Product CRUD with search
  • Stripe payment integration
  • File upload handling

See Example Projects →

🔍 Understand How It Works

Learn about the agentic language concept and transformation:

How It Works →

✅ Best Practices

Master the iterative workflow and testing patterns:

Best Practices →

📚 Explore Capabilities

See what else you can build:


Tips for Success

Start Simple

Don’t try to build everything at once:

❌ “Create a complete e-commerce backend with auth, payments, inventory, and shipping”

✅ “Create a products table”
✅ “Add CRUD endpoints for products”
✅ “Add search and filtering”
✅ “Add authentication”
✅ “Integrate Stripe payments”

Test Everything

After every change:

  • Run the cURL command
  • Verify the response
  • Check Xano GUI if needed
  • Only then continue building

Use Claude Code

The terminal access makes testing effortless:

  • AI gives you cURL command
  • You run it immediately
  • See results in same window
  • Iterate based on output

Ask Questions

The AI can explain what it’s doing:

  • “What endpoints did you create?”
  • “Show me the XanoScript that was generated”
  • “How does the pagination work?”
  • “Can you add error handling to that endpoint?”

Common Questions

Q: What’s the slug URL for?

A: It restricts the AI to your chosen workspace. This isn’t security against malicious users - it’s course-correction for misguided AI. If the AI tries to access the wrong workspace, it gets redirected with helpful guidance.

Q: Do I need to understand XanoScript?

A: No. The SDK generates it for you. But you CAN review it in the Xano GUI - it looks clean and uses filters (not expressions).

Q: Can I see what gets deployed before it happens?

A: Yes. The AI can show you the SDK code before deploying. Ask: “Show me the code first” or “Preview before deploying”

Q: What if I want to modify an existing endpoint?

A: Just ask. “Update the users list endpoint to include email in the response” - the AI will modify and redeploy.

Q: How do I debug when something breaks?

A: The iterative workflow makes this easy. You know the last change you made - just ask the AI to revert it or show you the logs.

Q: Can I use this with my Next.js frontend?

A: Absolutely. That’s the recommended pattern. Build your frontend in Next.js, all backend in Xano via this tool. Your React components call Xano endpoints directly - no Next.js API routes needed.


You’re Ready

You now have:

  • ✓ Workspace configured
  • ✓ MCP server connected
  • ✓ First endpoint deployed and tested
  • ✓ Understanding of iterative workflow

Start building. The more you use it, the more natural it becomes.

The AI is waiting for your next instruction.