### Get Started and Integration Examples Source: https://docs.xano.com/developer-mcp/tools Examples demonstrating how to get started with the CLI and understand when to use the CLI versus the Meta API. ```javascript // Get started cli_docs({ topic: "start" }) ``` ```javascript // When to use CLI vs Meta API cli_docs({ topic: "integration" }) ``` ```javascript // Full workspace commands cli_docs({ topic: "workspace", detail_level: "detailed" }) ``` -------------------------------- ### Pull Hello World Example Source: https://docs.xano.com/xano-cli/guide-from-scratch Pull a pre-built 'Hello World' example from a GitHub repository into your local project directory. This provides a starting point with existing tables, functions, and API endpoints. ```bash xano workspace git pull -d ./my-new-app \ -r https://github.com/xano-inc/xanoscript-examples \ --path helloworld ``` -------------------------------- ### Start Profile Wizard Source: https://docs.xano.com/xano-cli/profiles Initiates the interactive profile setup wizard. This is useful for CI/CD, self-hosted instances, or when token-based authentication is preferred. ```bash xano profile wizard ``` -------------------------------- ### Creates a new install token on the snippet Source: https://docs.xano.com/xano-features/metadata-api/accountapi Creates a new install token for a specific snippet. This allows for new installations or access grants. ```APIDOC ## POST /snippets/{snippet_id}/tokens ### Description Creates a new install token for a specific snippet. ### Method POST ### Endpoint /snippets/{snippet_id}/tokens ### Parameters #### Path Parameters - **snippet_id** (string) - Required - The ID of the snippet for which to create a token. #### Query Parameters None #### Request Body - **field1** (type) - Required/Optional - Description ### Request Example { "example": "request body" } ### Response #### Success Response (200) - **field1** (type) - Description #### Response Example { "example": "response body" } ``` -------------------------------- ### Install Xano Skills Globally Source: https://docs.xano.com/ Installs the 'xano-init' and 'xanoscript-docs-expert' agent skills globally for Claude Code. ```bash npx skills add xano-inc/xano-developer-mcp -a claude-code -g ``` -------------------------------- ### OpenAI Reasoning Effort Examples Source: https://docs.xano.com/ai-tools/agents Examples of reasoning effort settings for OpenAI models. ```text low ``` ```text medium ``` ```text high ``` -------------------------------- ### Addon Input Parameter Example Source: https://docs.xano.com/xanoscript/addons Example of defining an input parameter for an addon, specifying its type and optionality. ```xanoscript input { int user_id? } ``` -------------------------------- ### Example Data Payload for GET Retrieval Source: https://docs.xano.com/xano-transform/using-xano-transform This JSON payload is used to demonstrate data retrieval using the GET filter in Xano Transform. ```json { "v": 10, "items": [ { "id": 1, "name": "s1", "score": 100, "tags": [ {"tag":"beta","weight":5}, {"tag":"test","weight":50} ] }, { "id": 2, "name": "x9", "score": 87, "tags": [ {"tag":"abc","weight":10}, {"tag":"def","weight":90} ] } ] } ``` -------------------------------- ### Install Xano Skills Globally Source: https://docs.xano.com/ Installs the 'xano-init' and 'xanoscript-docs-expert' agent skills globally for Claude Code. These skills assist with workspace setup and provide XanoScript reference. ```bash npx skills add xano-inc/xano-developer-mcp -a claude-code -g ``` -------------------------------- ### Create a New Build with Description Source: https://docs.xano.com/xano-cli/static-hosting Uploads a zip file as a new build, including a description for tracking changes. ```bash xano static_host build create my-site -f ./dist.zip -n "v2.0.0" -d "Redesigned landing page" ``` -------------------------------- ### API Declaration Example Source: https://docs.xano.com/xanoscript/key-concepts This example declares a GET API named 'user_list' that uses 'user' authentication and returns a list of users. It includes an empty input block as required. ```javascript // Returns a list of all users with formatted names and creation dates. query user_list verb=GET { auth = "user" input { } } ``` -------------------------------- ### Build and Create Static Host Source: https://docs.xano.com/xano-cli/guide-from-scratch Build your frontend project and upload it to Xano's static hosting service. ```bash xano static_host build create ``` -------------------------------- ### Get Record by ID (Simple) Source: https://docs.xano.com/xanoscript/function-reference/database-operations A simplified example of retrieving a record from 'test_data' using its ID. ```javascript db.get test_data { field_name = "id" field_value = $input.id } as foundRecord ``` -------------------------------- ### Run Xano Profile Wizard Source: https://docs.xano.com/xano-cli/command-reference Initiates the interactive profile setup wizard. You can optionally provide a profile name and account origin URL. ```bash xano profile wizard ``` ```bash xano profile wizard -n production -o https://my-xano.my-domain.com ``` -------------------------------- ### Build and Deploy Frontend Source: https://docs.xano.com/xano-cli/guide-from-existing Build your frontend project, zip the output, and upload it to Xano's static hosting. This process deploys your frontend alongside your Xano backend. ```bash npm run build zip -r build.zip ./dist xano static_host build create my-site -f ./build.zip -n "v1.0.0" ``` -------------------------------- ### Install Xano Developer MCP via VS Code Command Source: https://docs.xano.com/developer-mcp/clients/vs-code Use this command to install the Xano Developer MCP directly within VS Code. This method is convenient for quick setup. ```shell npx -y @xano/developer-mcp ``` -------------------------------- ### Create Static Host Build Source: https://docs.xano.com/xano-cli/command-reference Creates a new static host build by uploading a zip file. Requires a file and a name, with an optional description. ```bash xano static_host build create my-site -f ./build.zip -n "v1.0.0" ``` ```bash xano static_host build create my-site -f ./dist.zip -n "production" -d "Production build" ``` -------------------------------- ### API Endpoint: Get All Users Source: https://docs.xano.com/xanoscript/key-concepts This example demonstrates a simple GET API endpoint that queries the 'user' table and returns a list of all users. It includes input, stack logic, response definition, and history settings. ```APIDOC ## GET /all_users ### Description This endpoint retrieves a list of all records from the user table. ### Method GET ### Endpoint /all_users ### Parameters #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - **$model** (list) - A list containing all user records from the user table. #### Response Example ```json { "example": "[list of user objects]" } ``` ``` -------------------------------- ### Constructing Full File URL Source: https://docs.xano.com/the-function-stack/functions/file-storage To serve a file download, prepend the file's path with your Xano instance URL. This example shows how to construct the complete URL using the instance URL and the file's path from its metadata. ```text https://my-xano-instance.xano.io/vault/T3q1DKy7/MA_gz1v6HaNQnLEf6xZqVtrOVII/1Rl7QA../form_submission_1741703680742.pdf ``` -------------------------------- ### HubSpot Get Contact Success Response Source: https://docs.xano.com/xano-actions/browse-actions Example of a successful response when retrieving a contact from HubSpot, including contact properties. ```json { "id": "123456", "properties": { "company": "UC", "createdate": "2024-09-23T13:30:40.386Z", "hsobjectid": "60968500829", "lastmodifieddate": "2024-09-23T13:31:43.044Z" }, "createdAt": "2024-09-23T13:30:40.386Z", "updatedAt": "2024-09-23T13:31:43.044Z", "archived": false } ``` -------------------------------- ### List Available Platforms Source: https://docs.xano.com/xano-cli/platforms Lists all available platform versions for tenant deployment. Use the `-o json` flag to get the complete JSON response. ```bash xano platform list ``` -------------------------------- ### Create a New Build Source: https://docs.xano.com/xano-cli/static-hosting Uploads a zip file as a new build for a static host. The build name is required. ```bash xano static_host build create my-site -f ./build.zip -n "v1.0.0" ``` -------------------------------- ### Example API URL Origin and Endpoint Source: https://docs.xano.com/xano-features/instance-settings Illustrates the structure of an API URL Origin and a full API endpoint for a GET USERS request. ```text YOUR API URL ORIGIN (example) https://xd6b-cfde-62f6.dev.xano.io/ YOUR FULL API ENDPOINT URL FOR 'GET USERS' (example) https://xd6b-cfde-62f6.dev.xano.io/api:4qSkfrOl/user ``` -------------------------------- ### Pull from Git and Push to Workspace Source: https://docs.xano.com/xano-cli/push-pull Pulls the 'Hello World' sample from a Git repository into a local directory and then pushes it to your Xano workspace. Ensure you have the Xano CLI installed and configured. ```bash xano workspace git pull -d ./helloworld \ -r https://github.com/xano-inc/xanoscript-examples \ --path helloworld xano workspace push -d ./helloworld ``` -------------------------------- ### XanoScript Example for API Endpoint Source: https://docs.xano.com/api-reference/api-group-api/create-a-new-api-endpoint-using-xanoscript This XanoScript defines a GET endpoint named 'foo' that takes an integer 'score' as input and returns the score incremented by 1. ```yaml openapi: 3.0.0 info: title: Xano Metadata API description: >- The Metadata API provides support to programatically manage your Xano instance and uses Access Tokens to control access. version: 0.0.1 servers: - url: https://your-xano-instance.xano.io/api:meta security: [] paths: /workspace/{workspace_id}/apigroup/{apigroup_id}/api: post: tags: - api group / api summary: Create a new API endpoint using XanoScript description: |- Create a new API endpoint using XanoScript

Authentication: required operationId: >- Xano Metadata API/workspace/{workspace_id}/apigroup/{apigroup_id}/api|POST parameters: - name: workspace_id in: path description: '' required: true schema: type: integer format: int64 - name: apigroup_id in: path description: '' required: true schema: type: integer format: int64 - name: branch in: query description: '' required: false schema: type: string default: '' - name: include_xanoscript in: query description: '' required: false schema: type: boolean default: false requestBody: content: text/x-xanoscript: schema: type: string example: | query foo verb=GET { input { int score } stack { var $x1 { value = $input.score + 1 } } response = $x1 } multipart/form-data: schema: type: object properties: name: type: string description: '' description: type: string description: '' docs: type: string description: '' verb: type: string description: '' enum: - GET - POST - DELETE - PUT - PATCH - HEAD tag: type: array items: type: string description: '' nullable: true include_xanoscript: type: boolean description: '' cache: type: object properties: active: type: boolean description: '' ttl: type: integer format: int64 description: '' default: 3600 input: type: boolean description: '' default: true auth: type: boolean description: '' default: true datasource: type: boolean description: '' default: true ip: type: boolean description: '' headers: type: array items: type: string description: '' env: type: array items: type: string description: '' required: - name - description - verb application/json: schema: type: object properties: name: type: string description: '' description: type: string description: '' docs: type: string description: '' verb: type: string description: '' enum: - GET - POST - DELETE - PUT - PATCH - HEAD tag: type: array items: ``` -------------------------------- ### Get Elements from List Range (Redis Range) Source: https://docs.xano.com/xanoscript/function-reference/data-caching-redis Fetches a range of elements from a list based on start and stop indices. Supports negative indices for counting from the end. ```javascript redis.range { key = "" start = 0 stop = -1 } as x10 ``` ```javascript redis.range { key = "recent_posts" start = 0 stop = 9 } as recent_items ``` -------------------------------- ### Initialize Xano Client Source: https://docs.xano.com/realtime/realtime-in-xano Initialize the Xano client with your instance base URL and realtime canonical. This establishes the connection to Xano. ```javascript const xanoClient = new XanoClient({ instanceBaseUrl: "http://abc1-def2-ghi3.xano.io/", realtimeCanonical: "a1b2c3d4e5f6g7h8i9", }); ``` -------------------------------- ### Get Meta API Documentation Source: https://docs.xano.com/developer-mcp/tools Retrieve documentation for Xano's Meta API using `meta_api_docs`. Specify the topic, detail level (overview, detailed, examples), and whether to include schemas. This API manages workspaces, databases, APIs, functions, and more. ```javascript // Get started meta_api_docs({ topic: "start" }) // Full table management docs meta_api_docs({ topic: "table", detail_level: "detailed" }) // API examples without schemas meta_api_docs({ topic: "api", detail_level: "examples", include_schemas: false }) // Workflow guides meta_api_docs({ topic: "workflows" }) ``` -------------------------------- ### Example Frontend Project Structure Source: https://docs.xano.com/xano-features/static-hosting This is a typical project structure for a frontend application that can be hosted using Xano's Static Hosting. It includes essential files like package.json and source code directories. ```bash my-frontend/ ├─ package.json ├─ src/ │ ├─ index.jsx │ └─ ... ``` -------------------------------- ### Install Codex MCP Source: https://docs.xano.com/developer-mcp/clients/vs-code Install the Codex MCP for Xano. This command installs the necessary package and adds the Xano MCP. ```bash npm install -g @openai/codex codex mcp add xano -- npx -y @xano/developer-mcp ``` -------------------------------- ### Push to Staging, Run Tests, and Set Live Source: https://docs.xano.com/xano-cli/team-workflows Bob reviews the PR, merges changes, pushes them to the staging Xano branch, runs tests, and promotes staging to live. ```bash git checkout main git pull origin main xano workspace push -d ./acme-backend -b staging xano workflow-test run ./acme-backend -b staging xano branch set_live staging ``` -------------------------------- ### Verify Xano CLI Installation Source: https://docs.xano.com/xano-cli/get-started Confirm that the Xano CLI has been installed successfully by checking its version. This command should be run after the initial installation. ```bash xano --version ``` -------------------------------- ### Create a New Static Host Build Source: https://docs.xano.com/xano-cli/command-reference Uploads a zip file as a new build for a specified static host. ```bash xano static_host build create ``` -------------------------------- ### Xano Repository Layout Example Source: https://docs.xano.com/getting-started-code Illustrates the typical directory structure for a Xano project, showing where API endpoints and table definitions are located. ```bash api/ authentication/ api_group.xs 000_auth_signup_post.xs 000_auth_login_post.xs 000_auth_me_get.xs table/ 000_user.xs ``` -------------------------------- ### Install Node.js via Homebrew (macOS) Source: https://docs.xano.com/xano-cli/get-started Install Node.js using Homebrew on macOS. This is an alternative installation method for Node.js and npm. ```bash brew install node ``` -------------------------------- ### XanoScript Signup API Endpoint Example Source: https://docs.xano.com/xanoscript/api This example demonstrates a typical signup API endpoint. It includes input validation, checks for existing users, adds a new user to the database, and generates an authentication token. The `security.create_auth_token` function is used for token generation. ```XanoScript // Signup and retrieve an authentication token query auth/signup verb=POST { input { text name? email email? filters=trim|lower text password? } stack { db.get user { field_name = "email" field_value = $input.email } as $user precondition ($user == null) { error_type = "accessdenied" error = "This account is already in use." } db.add user { data = { created_at: "now" name : $input.name email : $input.email password : $input.password } } as $user security.create_auth_token { table = "user" extras = {} expiration = 86400 id = $user.id } as $authToken } response = {authToken: $authToken} } ``` -------------------------------- ### Hello World API Endpoint Example Source: https://docs.xano.com/vscode-ext A simple 'Hello, World!' API endpoint example written in XanoScript. This demonstrates defining an API endpoint with input, a processing stack, and a response. ```xanoscript query hello_world verb=GET { description = "Returns a personalized hello world message." input { text name filters=trim { description = "Name of the person to greet." } } stack { var $message { value = "Hello, " ~ $input.name ~ "! Welcome to the world of Xano." } } response = { message: $message } history = 100 } ``` -------------------------------- ### Verify Node.js and npm Installation (macOS) Source: https://docs.xano.com/xano-cli/get-started Check if Node.js and npm are installed correctly on macOS after installation. This is a prerequisite for using the Xano CLI. ```bash node --version npm --version ``` -------------------------------- ### Install a Single Xano Skill Source: https://docs.xano.com/developer-mcp/get-started Use this command to install a specific Xano skill into your environment. Ensure you have the necessary CLI tools installed. ```bash npx skills add xano-inc/xano-developer-mcp -s xano-init -a claude-code -g ``` -------------------------------- ### Install OpenAI Codex Source: https://docs.xano.com/developer-mcp/clients/codex Installs the OpenAI Codex globally using npm. Ensure Node.js 18 or later is installed before running this command. ```bash npm install -g @openai/codex ``` -------------------------------- ### Create Tenant Backup Source: https://docs.xano.com/xano-cli/tenants Create a new backup for a specified tenant. ```bash xano tenant backup create TENANT_NAME ``` -------------------------------- ### Create a New Tenant Source: https://docs.xano.com/xano-cli/tenants Creates a new tenant with a specified display name. Optional flags allow for setting description, type, cluster, license, platform, domain, and ingress/task settings. ```bash xano tenant create "My Tenant" ``` -------------------------------- ### Addon Description Example Source: https://docs.xano.com/xanoscript/addons Example of defining a description for an addon. ```xanoscript description = "Gets all comments from a specific user" ``` -------------------------------- ### Create Xano Tenant Backup Source: https://docs.xano.com/xano-cli/cheatsheet Creates a snapshot backup of a tenant, useful before risky changes. ```bash xano tenant backup create my-tenant -d "pre-deploy" ``` -------------------------------- ### Install Node.js via winget (Windows) Source: https://docs.xano.com/xano-cli/get-started Install the LTS version of Node.js using the winget package manager on Windows. This is an alternative installation method for Node.js and npm. ```powershell winget install OpenJS.NodeJS.LTS ``` -------------------------------- ### Basic XanoScript Development Example Source: https://docs.xano.com/xanoscript/vs-code A XanoScript example demonstrating a user authentication endpoint with input validation, password checking, and token creation. ```xanoscript query auth/login verb=POST { description = "User authentication endpoint" input { email email? filters=trim|lower text password? } stack { db.get user { field_name = "email" field_value = $input.email output = ["id", "email", "password"] } as $user precondition ($user != null) { error_type = "accessdenied" error = "Invalid credentials" } security.check_password { text_password = $input.password hash_password = $user.password } as $pass_result precondition ($pass_result) { error_type = "accessdenied" error = "Invalid credentials" } security.create_auth_token { dbtable = "user" id = $user.id extras = {} expiration = 86400 } as $authToken } response { value = {authToken: $authToken} } } ``` -------------------------------- ### Get Single Row from Xano Source: https://docs.xano.com/xano-n8n-node Use the 'Get a Row' node to retrieve a specific record from Xano by its ID. The node executes a GET request to the Xano API. ```javascript const xano = require('xano-node'); // Assuming 'getSingleContent' is a function provided by the xano-node library // This is a conceptual example, actual usage might differ based on library specifics async function getXanoRow(rowId) { try { const response = await xano.getSingleContent(rowId); console.log('Retrieved row:', response); return response; } catch (error) { console.error('Error getting row:', error); throw error; } } ``` -------------------------------- ### Addon Tags Example Source: https://docs.xano.com/xanoscript/addons Example of defining tags for an addon to categorize it. ```xanoscript tags = ["database", "user data"] ```