Airtable MCP

by mufonix
Verified

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

  • Provides comprehensive tools for interacting with Airtable databases, including base management, table operations, schema manipulation, and record management (query, create, update, delete).

  • Supports production deployment using PM2 for managing the Airtable MCP server process, with configuration examples provided for stable operation.

Airtable MCP

将您的 AI 工具直接连接到 Airtable。使用自然语言查询、创建、更新和删除记录。功能包括基础管理、表操作、模式操作、记录筛选和数据迁移——所有这些都通过与 Cursor、Claude Code、Cline、Zed 和其他 Claude 支持的编辑器兼容的标准化 MCP 界面实现。

该应用程序是一个强大的 Airtable 集成工具,它允许 AI 驱动的应用程序通过 Anthropic 的模型上下文协议 (MCP) 直接从您的 IDE 访问和操作 Airtable 数据。

特征

  • 基地管理:列出并选择 Airtable 基地
  • 表操作:浏览表、字段和记录
  • 数据访问:读取、创建、更新和删除记录
  • 模式管理:导出、比较和更新模式
  • 命令行配置:通过命令行参数直接使用 API 令牌
  • NPX 兼容:使用单个命令轻松安装
  • Smithery 集成:通过 Smithery 一键安装

建筑学

有两个核心组件用于访问和操作 Airtable 数据:

  1. Airtable MCP 服务器:一个 Python 服务器,为 AI 客户端与 Airtable 交互提供标准化工具。
  2. MCP 客户端:任何支持模型上下文协议的客户端(Cursor、Claude Desktop、Cline、Zed 等)。
┌─────────────┐ ┌──────────────┐ ┌───────────────┐ │ MCP Client │ ──► │ Airtable │ ──► │ Airtable │ │ (e.g. │ ◄── │ MCP Server │ ◄── │ API │ │ Cursor) │ │ │ │ │ └─────────────┘ └──────────────┘ └───────────────┘

模型上下文协议 (MCP) 是 Anthropic AI 模型支持的一项功能,允许您为任何兼容的客户端创建自定义工具。MCP 客户端(例如 Claude Desktop、Cursor、Cline 或 Zed)可以运行 MCP 服务器,该服务器会“教导”这些客户端使用新工具。

安装

先决条件

  • Node.js 14+
  • Python 3.10+(自动检测)
  • Airtable API 令牌
  • 兼容的 MCP 客户端(Cursor、Claude Desktop 等)

Smithery 安装(推荐)

最简单的安装方法:

  1. 参观史密瑟里
  2. 搜索“@rashidazarang/airtable-mcp”
  3. 点击“安装”并按照提示操作

使用 NPX 快速设置(替代方案)

另一种快速入门的方法:

# Install globally npm install -g airtable-mcp # Or run directly with npx npx airtable-mcp --token "your_airtable_token" --base "your_base_id"

配置您的 MCP 客户端

对于 Cursor,更新您的~/.cursor/mcp.json文件:

{ "mcpServers": { "airtable-tools": { "command": "npx", "args": [ "airtable-mcp", "--token", "your_airtable_token", "--base", "your_base_id" ] } } }

重新启动您的 MCP 客户端以加载新工具。

手动安装(高级)

如果您希望克隆存储库并手动安装:

  1. 克隆此存储库:
    git clone https://github.com/rashidazarang/airtable-mcp.git cd airtable-mcp
  2. 安装依赖项:
    pip install -r requirements.txt
  3. 运行服务器:
    python airtable_mcp/src/server.py --token "your_airtable_token" --base "your_base_id"

用法

安装和配置完成后,您可以使用自然语言与您的 Airtable 数据进行交互:

  • “向我展示所有我可以访问的基地”
  • “列出我当前数据库中的表”
  • “显示客户表的结构”
  • “从订单表中获取前 10 条记录”
  • “在产品表中创建新记录”
  • “更新库存表中的记录 XYZ”
  • “导出我当前基础的架构”

可用工具

工具名称描述
list_bases列出所有可访问的 Airtable 基地
list_tables列出指定或默认库中的所有表
list_records列出表中的记录并进行可选过滤
get_record从表中获取特定记录
create_records通过 JSON 字符串在表中创建记录
update_records从 JSON 字符串更新表中的记录
delete_records根据 ID 从表中删除记录
export_records将表中的记录导出为 JSON 字符串
import_records从 JSON 字符串将记录导入到表中
create_tables从 JSON 架构创建表
update_schema更新现有表以匹配 JSON 模式
set_base_id设置当前 Airtable 基础 ID
inspect_table获取有关表结构和字段的详细信息
export_schema以 JSON 或 CSV 格式导出当前库的架构
compare_schemas将提供的架构与当前基础架构进行比较
generate_field_mapping生成两个表之间的字段映射
migrate_data使用指定的字段映射将数据从一个表迁移到另一个表

PM2 配置

对于生产用途,您可以使用 PM2 来管理 Airtable MCP 服务器:

// ecosystem.config.js module.exports = { apps: [ { name: 'airtable-mcp', script: 'npx', args: [ 'airtable-mcp', '--token', 'your_airtable_token', '--base', 'your_base_id' ], interpreter: '/usr/local/bin/node', env: { PATH: process.env.PATH, }, }, ], };

从以下开始:

pm2 start ecosystem.config.js

兼容性

  • 适用于任何兼容 MCP 的客户端
  • 主要为 Cursor IDE 集成而设计
  • 支持其他 AI 编辑器和 MCP 客户端

详细文档

有关详细的安装说明、故障排除和高级配置,请参阅INSTALLATION.md

执照

麻省理工学院

贡献

欢迎贡献代码!欢迎提交 Pull 请求。

-
security - not tested
A
license - permissive license
-
quality - not tested

使 AI 驱动的应用程序能够直接从您的 IDE 访问和操作 Airtable 数据,支持通过自然语言命令查询、创建、更新和删除记录等操作。

  1. Features
    1. Architecture
      1. Installation
        1. Prerequisites
        2. Smithery Installation (Recommended)
        3. Quick Setup with NPX (Alternative)
        4. Configure Your MCP Client
        5. Manual Installation (Advanced)
      2. Usage
        1. Available Tools
          1. PM2 Configuration
            1. Compatibility
              1. Detailed Documentation
                1. License
                  1. Contributing
                    ID: 4vj8rihnnh