Back to MCP directory
publicPublicdnsLocal runtime

Airtable

一个提供Airtable数据库读写访问的MCP服务器,支持LLM查看数据库模式并操作记录

article

README

🚀 Airtable MCP 服务器

Airtable MCP 服务器是一个基于模型上下文协议(MCP)的服务器,它能提供对 Airtable 数据库的读写访问。该服务器可自动发现和生成 Airtable 基础数据(base)和表格的模式信息,还配备了丰富的工具集,便于操作 Airtable 的数据和结构。

🚀 快速开始

要使用 Airtable MCP 服务器,需按以下步骤进行安装和配置:

  1. 安装 Git 和 Node.js
  2. 克隆仓库
    git clone https://github.com/your-repository.git
    
  3. 安装依赖项
    npm install
    
  4. 设置环境变量
    • 配置 Airtable 的 API 令牌和基础 ID(Base ID)。
    • 示例配置文件 config.json
      {
        "airtable": {
          "apiKey": "your_airtable_api_key",
          "baseId": "your_airtable_base_id"
        }
      }
      

✨ 主要特性

Airtable MCP 服务器具备以下核心功能:

  • 数据访问:支持对 Airtable 数据库的读写操作。
  • 模式发现:自动发现和生成 Airtable 基础数据(base)和表格的模式信息。
  • 结构管理:支持创建、更新和删除表格、字段等数据库对象。

📦 安装指南

安装与配置

  1. 安装 Git 和 Node.js
  2. 克隆仓库
    git clone https://github.com/your-repository.git
    
  3. 安装依赖项
    npm install
    
  4. 设置环境变量
    • 配置 Airtable 的 API 令牌和基础 ID(Base ID)。
    • 示例配置文件 config.json
      {
        "airtable": {
          "apiKey": "your_airtable_api_key",
          "baseId": "your_airtable_base_id"
        }
      }
      

💻 使用示例

基础用法

数据操作工具

  1. 查询数据
    mcp query "SELECT * FROM airtable://your-base-id/your-table-id"
    
  2. 插入数据
    mcp insert --table your-table-id --data '{"field1": "value1", "field2": 123}'
    
  3. 更新数据
    mcp update --record-id rec0123456789 --data '{"field1": "newValue"}'
    

数据库对象管理工具

  1. 创建表格
    mcp create-table --baseId your-base-id --name "New Table" --description "This is a new table"
    
  2. 更新表格
    mcp update-table --baseId your-base-id --tableId your-table-id --newName "Updated Table"
    
  3. 删除表格
    mcp delete-table --baseId your-base-id --tableId your-table-id
    

字段管理工具

  1. 创建字段
    mcp create-field --baseId your-base-id --tableId your-table-id --name "New Field" --type "text"
    
  2. 更新字段
    mcp update-field --baseId your-base-id --tableId your-table-id --fieldId field123456789 --newName "Updated Field"
    
  3. 删除字段
    mcp delete-field --baseId your-base-id --tableId your-table-id --fieldId field123456789
    

高级用法

贡献代码

欢迎通过 GitHub 提交拉取请求!要开始贡献,请按照以下步骤操作:

  1. 安装 Git 和 Node.js
  2. 克隆仓库
    git clone https://github.com/your-repository.git
    
  3. 安装依赖项
    npm install
    
  4. 运行测试
    npm run test
    
  5. 构建项目
    • 使用命令 npm run build 进行一次性构建。
    • 或者使用 npm run build:watch 实现实时构建(编辑后自动重建)。

📚 详细文档

资源信息

表格模式

Airtable MCP 服务器提供了以下表格模式资源信息:

  • URL 格式
    airtable://<baseId>/<tableId>/schema
    
  • 包含内容
    • 基础 ID 和表格 ID
    • 表格名称和描述
    • 主键字段 ID
    • 字段定义(ID、名称、类型、描述、选项)
    • 视图定义(ID、名称、类型)

📄 许可证

该项目遵循 MIT 许可证。

📞 联系方式

如有任何问题或建议,请联系:

  • 邮箱:support@your-domain.com
  • GitHub:https://github.com/your-repository.git

📌 版本信息

当前版本:v1.0.0

help

Runtime guide

cloud

Hosted runtime

Hosted servers run from a provider-managed environment. You usually connect the MCP client to the hosted endpoint or follow the provider's authorization flow, without keeping a local process alive

  1. Open provider connection page
  2. Authorize or copy endpoint
  3. Connect from your MCP client
terminal

Local runtime / other methods

Local servers run on your own machine or infrastructure. You normally copy the server_config into your MCP client, install the required package, and provide env variables from env_schema when needed

  1. Copy server_config
  2. Install required package
  3. Fill env variables and restart client