airtable-cli
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chineseairtable-mcp
airtable-mcp
Self-discovery
工具自动发现
Tools are fetched from the MCP server at runtime, so the CLI never has a hardcoded command list. Discover what's available:
sh
airtable-mcp tools # human-readable list
airtable-mcp tools --json # machine-parseable list
airtable-mcp <tool> --help # show flags and descriptions for a toolRun before assuming a tool exists. Tool names, arguments, and output shapes can change between server releases without a CLI update.
airtable-mcp tools工具会在运行时从MCP服务器获取,因此CLI从未内置硬编码的命令列表。可通过以下方式查看可用工具:
sh
airtable-mcp tools # 人类可读格式的列表
airtable-mcp tools --json # 机器可解析格式的列表
airtable-mcp <tool> --help # 查看工具的参数和说明在假设某个工具存在前,请先运行。工具名称、参数和输出格式可能会随服务器版本更新而变化,无需同步更新CLI。
airtable-mcp toolsInstall
安装
sh
npm install -g @airtable/mcp-clish
npm install -g @airtable/mcp-cliAuth
身份验证
The CLI needs an Airtable personal access token (PAT). Two paths:
Environment variable (preferred for scripts/agents):
sh
export AIRTABLE_TOKEN=pat_xxxInteractive configure (stores token in with 0600 permissions):
~/.airtable/cli.jsonsh
airtable-mcp configureCreate tokens at https://airtable.com/create/tokens. Ensure the token has the scopes required by the tools being called.
AIRTABLE_TOKEN--profileCLI需要Airtable个人访问令牌(PAT)。有两种配置方式:
环境变量(脚本/Agent优先选择):
sh
export AIRTABLE_TOKEN=pat_xxx交互式配置(令牌将存储在中,权限为0600):
~/.airtable/cli.jsonsh
airtable-mcp configure可在https://airtable.com/create/tokens创建令牌。确保令牌拥有调用工具所需的权限范围。
当未设置参数时,的优先级高于已保存的配置文件。切勿记录或回显令牌。
--profileAIRTABLE_TOKENQuick reference
快速参考
| Task | Command |
|---|---|
| Set up credentials | |
| Add a named profile | |
| Check auth status | |
| Remove credentials | |
| Remove all profiles | |
| List available tools | |
| Run a tool | |
| Get tool help | |
| Pass args via stdin | |
| Bypass tool cache | |
| Suppress status msgs | |
| Raw text output | |
| Use a specific profile | |
Tool names use hyphens on the CLI () but underscores in MCP (). The CLI translates automatically.
list-recordslist_records| 任务 | 命令 |
|---|---|
| 设置凭证 | |
| 添加命名配置文件 | |
| 检查身份验证状态 | |
| 删除凭证 | |
| 删除所有配置文件 | |
| 列出可用工具 | |
| 运行工具 | |
| 获取工具帮助 | |
| 通过标准输入传递参数 | |
| 绕过工具缓存 | |
| 隐藏状态消息 | |
| 原始文本输出 | |
| 使用指定配置文件 | |
CLI中的工具名称使用连字符(如),但在MCP中使用下划线(如)。CLI会自动进行转换。
list-recordslist_recordsWorkflow
工作流程
- Auth — set or run
AIRTABLE_TOKENairtable-mcp configure - Discover — run to see available tools
airtable-mcp tools - Inspect — run for flags and descriptions
airtable-mcp <tool> --help - Check access — in output, check the
tools --jsonfield:access,read-only, orwrite. Confirm with the user before runningdestructivetools.destructive - Execute — run
airtable-mcp <tool> --flagName value
- 身份验证 — 设置或运行
AIRTABLE_TOKENairtable-mcp configure - 发现工具 — 运行查看可用工具
airtable-mcp tools - 查看详情 — 运行查看参数和说明
airtable-mcp <tool> --help - 检查权限 — 在的输出中,查看
tools --json字段:access(只读)、read-only(可写)或write(破坏性)。运行destructive工具前请先确认用户意愿。destructive - 执行操作 — 运行
airtable-mcp <tool> --flagName value
Output & automation
输出与自动化
- Default output is formatted JSON to stdout. Status messages go to stderr.
- on
--jsongives a JSON array oftools.{name, title, access} - /
-qsuppresses stderr status messages (cache warnings, etc).--quiet - returns the raw server response text instead of parsed JSON.
--output raw - reads tool arguments as a JSON object from stdin, bypassing flag parsing.
--input - - Exit codes: success,
0error (auth, tool failure, not found),1usage error (bad flags, bad input).2
- 默认输出为格式化JSON至标准输出,状态消息输出至标准错误流。
- 在命令后添加
tools会返回包含--json的JSON数组。{name, title, access} - /
-q参数会抑制标准错误流中的状态消息(如缓存警告等)。--quiet - 参数会返回服务器原始响应文本,而非解析后的JSON。
--output raw - 参数会从标准输入读取工具参数(JSON对象),绕过参数解析。
--input - - 退出码:表示成功,
0表示错误(身份验证失败、工具执行失败、工具未找到),1表示使用错误(参数无效、输入错误)。2
Common tasks
常见任务
Find a base and list its tables:
sh
airtable-mcp search-bases --searchQuery "Project Tracker" -q
airtable-mcp list-tables-for-base --baseId appEXAMPLEbase001 -qList records with specific fields:
sh
airtable-mcp list-records-for-table \
--baseId appEXAMPLEbase001 --tableId tblEXAMPLEtable01 \
--fieldIds '["Name","Status"]' --pageSize 10 -qFilter records — filters use structured JSON, not formula strings. Wrap conditions in an array; the top-level defaults to if omitted:
operandsoperatorandsh
airtable-mcp list-records-for-table \
--baseId appEXAMPLEbase001 --tableId tblEXAMPLEtable01 \
--filters '{"operator":"and","operands":[{"operator":"=","operands":["Status","Done"]}]}' -qFor select fields, filter by choice ID (from ), not the display name. The skill covers compound filters, date filters, and operator-by-field-type details.
get-table-schemaairtable-filtersSearch records — use for free-text/fuzzy queries on large tables. Use with when filtering by exact field values:
search-recordslist-records-for-table--filterssh
airtable-mcp search-records \
--baseId appEXAMPLEbase001 --table tblEXAMPLEtable01 \
--query "acme" --fields '["Name","Notes"]' -qPass to search across every indexed field. Date, rating, checkbox, and button fields are not searchable.
--fields ALL_SEARCHABLE_FIELDSUpdate records — complex args are easier via :
--input -sh
echo '{"baseId":"appEXAMPLEbase001","tableId":"tblEXAMPLEtable01","records":[{"id":"recEXAMPLErecord1","fields":{"fldEXAMPLEfield01":"Done"}}]}' \
| airtable-mcp update-records-for-table --input - -qSelect field values are returned as objects () but must be written as plain strings (). Record field keys in create/update currently require field IDs () — use to resolve names to IDs before writing. Note that , , and accept both names and IDs.
{"id":"sel...","name":"Done"}"Done"fldEXAMPLEfield02get-table-schemafieldIdssortfilters查找工作区并列出其表格:
sh
airtable-mcp search-bases --searchQuery "Project Tracker" -q
airtable-mcp list-tables-for-base --baseId appEXAMPLEbase001 -q列出包含指定字段的记录:
sh
airtable-mcp list-records-for-table \
--baseId appEXAMPLEbase001 --tableId tblEXAMPLEtable01 \
--fieldIds '["Name","Status"]' --pageSize 10 -q过滤记录 — 过滤使用结构化JSON,而非公式字符串。将条件包裹在数组中;若省略顶层,默认值为:
operandsoperatorandsh
airtable-mcp list-records-for-table \
--baseId appEXAMPLEbase001 --tableId tblEXAMPLEtable01 \
--filters '{"operator":"and","operands":[{"operator":"=","operands":["Status","Done"]}]}' -q对于单选字段,请通过选项ID(来自)进行过滤,而非显示名称。技能涵盖复合过滤、日期过滤及按字段类型选择操作符的详细说明。
get-table-schemaairtable-filters搜索记录 — 在大型表格中进行自由文本/模糊查询时使用。当需要按字段精确值过滤时,请使用并搭配参数:
search-recordslist-records-for-table--filterssh
airtable-mcp search-records \
--baseId appEXAMPLEbase001 --table tblEXAMPLEtable01 \
--query "acme" --fields '["Name","Notes"]' -q传递可搜索所有已索引字段。日期、评分、复选框和按钮字段不可搜索。
--fields ALL_SEARCHABLE_FIELDS更新记录 — 复杂参数更适合通过传递:
--input -sh
echo '{"baseId":"appEXAMPLEbase001","tableId":"tblEXAMPLEtable01","records":[{"id":"recEXAMPLErecord1","fields":{"fldEXAMPLEfield01":"Done"}}]}' \
| airtable-mcp update-records-for-table --input - -q单选字段的值会以对象形式返回(),但写入时必须以纯字符串形式传递()。目前创建/更新记录时的字段键需要使用字段ID()—— 写入前请使用将字段名称解析为ID。注意、和参数同时接受字段名称和ID。
{"id":"sel...","name":"Done"}"Done"fldEXAMPLEfield02get-table-schemafieldIdssortfiltersGotchas
常见问题
| Problem | Cause | Fix |
|---|---|---|
| Tool name doesn't exist on the server or cache is stale | Run |
| Token expired, revoked, or wrong | Run |
| Token missing required scopes | Add scopes at https://airtable.com/create/tokens |
| Server unreachable (10s timeout) | Check network; CLI falls back to stale cache if available |
| Boolean flags take no value | | Use |
| Array/object args fail | Value isn't valid JSON | Pass as JSON string: |
| Filter rejected at top level | Single condition passed without | Wrap in |
Sort key is | | Use |
| Select filter returns no matches | Filtering by display name instead of choice ID | Run |
| Batch limit is 10 records per request (default; varies by account) | Split into chunks of ≤10 and check |
Permission error on | User has interface-only access to the base | Use |
| Endpoints restricted | CLI only allows HTTPS on | Cannot point at arbitrary servers (security constraint) |
| 问题 | 原因 | 解决方案 |
|---|---|---|
| 工具名称在服务器上不存在,或缓存已过期 | 运行 |
| 令牌已过期、被撤销或不正确 | 运行 |
| 令牌缺少所需的权限范围 | 在https://airtable.com/create/tokens添加权限范围 |
| 无法连接服务器(超时时间为10秒) | 检查网络连接;若有可用的过期缓存,CLI会自动回退使用 |
| 布尔型参数无法接受值 | | 单独使用 |
| 数组/对象参数执行失败 | 值不是有效的JSON | 以JSON字符串形式传递: |
| 顶层过滤条件被拒绝 | 单个条件未包裹在 | 将条件包裹在 |
排序键应为 | | 使用 |
| 单选字段过滤无匹配结果 | 使用显示名称而非选项ID进行过滤 | 先运行 |
批量写入时出现 | 每次请求的批量限制为10条记录(默认值;随账户不同而变化) | 将记录拆分为≤10条的批次,并查看 |
| 用户仅拥有该工作区的界面访问权限 | 改用 |
| 端点受限 | CLI仅允许通过HTTPS访问 | 无法指向任意服务器(安全限制) |