Xano MCP Server

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

Integrations

  • Uses environment variables for configuration management, allowing secure storage of API keys and other sensitive data needed for Xano API interactions.

  • Provides repository management for the MCP server codebase, with instructions for cloning and contributing to the project.

  • Manages dependencies and provides scripts for building, developing, and running the MCP server.

Xano MCP 服务器

用于与 Xano API 交互的模型上下文协议 (MCP) 服务器实现。该服务器提供通过 MCP 接口管理 Xano 数据库操作的工具和资源。

特征

  • 使用 Xano API 进行安全身份验证
  • 使用 TypeScript 进行类型安全的 API 交互
  • 基于环境的配置
  • MCP 兼容接口
  • 工作区管理工具
  • 表内容操作(创建、读取、更新)
  • 使用详细信息改进错误处理

安装

# Clone the repository git clone [your-repo-url] cd xano_mcp # Install dependencies npm install

配置

  1. 复制示例环境文件:
cp .env.example .env
  1. 使用您的 Xano 凭证更新.env文件:
XANO_API_KEY=your_api_key_here XANO_API_URL=your_xano_api_url NODE_ENV=development API_TIMEOUT=10000

发展

# Build the project npm run build # Run in development mode npm run dev # Start the server npm start

项目结构

xano_mcp/ ├── src/ │ ├── api/ │ │ └── xano/ │ │ ├── client/ # API client implementation │ │ ├── models/ # Data models and types │ │ ├── services/ # API service implementations │ │ └── utils/ # Utility functions │ ├── mcp/ │ │ ├── server/ # MCP server implementation │ │ ├── tools/ # MCP tool implementations │ │ └── types/ # Tool-specific types │ ├── config.ts # Configuration management │ └── index.ts # Main entry point ├── .env # Environment variables (not in git) ├── .env.example # Example environment variables └── tsconfig.json # TypeScript configuration

可用的 MCP 工具

工作区工具

  • get_workspaces :列出所有可用的工作区

表格工具

  • create_table :在工作区中创建新表
  • get_table_content :从支持分页的表中获取内容
  • add_table_content :向表中添加新内容
  • update_table_content :更新表中现有内容
  • get_all_tables :列出工作区中的所有表及其详细信息

使用示例

使用工作区

// List available workspaces const result = await mcp.use_tool("get_workspaces", {}); console.log('Workspaces:', result);

管理表

// 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" } }); // List all tables in a workspace const tables = await mcp.use_tool("get_all_tables", { workspaceId: 123 }); console.log('Tables:', tables); // Returns an array of tables with their details: // [ // { // id: number, // name: string, // description: string, // created_at: string, // updated_at: string, // guid: string, // auth: boolean, // tag: string[], // workspaceId: number // }, // ... // ]

环境变量

多变的描述必需的默认
XANO_API_密钥您的 Xano API 身份验证密钥是的-
XANO_API_URLXano API 端点 URL是的-
NODE_ENV环境(开发/生产)发展
API 超时API 请求超时(以毫秒为单位)10000

错误处理

服务器提供以下详细的错误消息:

  • 参数无效
  • 身份验证失败
  • API 请求失败
  • 内容验证错误
  • 未知工具请求

安全

  • 环境变量用于敏感配置
  • 包含 TruffleHog 配置以防止秘密泄露
  • API 密钥和敏感数据永远不会提交到存储库

贡献

  1. 创建功能分支
  2. 进行更改
  3. 提交拉取请求

执照

国际学习中心

You must be authenticated.

A
security – no known vulnerabilities
F
license - not found
A
quality - confirmed to work

通过模型上下文协议 (MCP) 接口实现与 Xano API 的交互,为 Xano 数据库操作提供安全且类型安全的管理。

  1. Features
    1. Installation
      1. Configuration
        1. Development
          1. Project Structure
            1. Available MCP Tools
              1. Workspace Tools
              2. Table Tools
            2. Usage Examples
              1. Working with Workspaces
              2. Managing Tables
            3. Environment Variables
              1. Error Handling
                1. Security
                  1. Contributing
                    1. License

                      Appeared in Searches

                      ID: fygsnfzjkv