Airtable MCP 服务器
一种提供对 Airtable 数据库读写访问的模型上下文协议服务器。此服务器使大型语言模型能够检查数据库模式,然后读取和写入记录。
MCP 服务配置
复制以下 JSON 到 OPClaw 或其他 MCP 客户端的配置文件中即可使用
{
"mcpServers": {
"airtable": {
"args": [
"-y",
"airtable-mcp-server"
],
"command": "npx",
"env": {
"AIRTABLE_API_KEY": "pat123.abc123"
}
}
}
}
服务介绍
airtable-mcp-server
这是一个提供对Airtable数据库读写访问的模型上下文协议服务器。该服务器使LLMs能够检查数据库模式,然后读写记录。
https://github.com/user-attachments/assets/c8285e76-d0ed-4018-94c7-20535db6c944
使用方法
要将此服务器与Claude Desktop应用程序一起使用,请在您的claude_desktop_config.json文件的"mcpServers"部分添加以下配置:
{
"mcpServers": {
"airtable": {
"command": "npx",
"args": [
"-y",
"airtable-mcp-server"
],
"env": {
"AIRTABLE_API_KEY": "pat123.abc123"
}
}
}
}
将pat123.abc123替换为您的Airtable个人访问令牌。您的令牌应至少具有schema.bases:read和data.records:read权限,还可以选择性地拥有相应的写入权限。
组件
工具
-
list_records
- Lists records from a specified Airtable table
- Input parameters:
baseId(string, required): The ID of the Airtable basetableId(string, required): The ID of the table to querymaxRecords(number, optional): Maximum number of records to return. Defaults to 100.filterByFormula(string, optional): Airtable formula to filter records
-
search_records
- Search for records containing specific text
- Input parameters:
baseId(string, required): The ID of the Airtable basetableId(string, required): The ID of the table to querysearchTerm(string, required): Text to search for in recordsfieldIds(array, optional): Specific field IDs to search in. If not provided, searches all text-based fields.maxRecords(number, optional): Maximum number of records to return. Defaults to 100.
-
list_bases
- Lists all accessible Airtable bases
- No input parameters required
- Returns base ID, name, and permission level
-
list_tables
- Lists all tables in a specific base
- Input parameters:
baseId(string, required): The ID of the Airtable basedetailLevel(string, optional): The amount of detail to get about the tables (tableIdentifiersOnly,identifiersOnly, orfull)
- Returns table ID, name, description, fields, and views (to the given
detailLevel)
-
describe_table
- Gets detailed information about a specific table
- Input parameters:
baseId(string, required): The ID of the Airtable basetableId(string, required): The ID of the table to describedetailLevel(string, optional): The amount of detail to get about the table (tableIdentifiersOnly,identifiersOnly, orfull)
- Returns the same format as list_tables but for a single table
- Useful for getting details about a specific table without fetching information about all tables in the base
-
get_record
- Gets a specific record by ID
- Input parameters:
baseId(string, required): The ID of the Airtable basetableId(string, required): The ID of the tablerecordId(string, required): The ID of the record to retrieve
-
create_record
- Creates a new record in a table
- Input parameters:
baseId(string, required): The ID of the Airtable basetableId(string, required): The ID of the tablefields(object, required): The fields and values for the new record
-
update_records
- Updates one or more records in a table
- Input parameters:
baseId(string, required): The ID of the Airtable basetableId(string, required): The ID of the tablerecords(array, required): Array of objects containing record ID and fields to update
-
delete_records
- Deletes one or more records from a table
- Input parameters:
baseId(string, required): The ID of the Airtable basetableId(string, required): The ID of the tablerecordIds(array, required): Array of record IDs to delete
-
create_table
- Creates a new table in a base
- Input parameters:
baseId(string, required): The ID of the Airtable basename(string, required): Name of the new tabledescription(string, optional): Description of the tablefields(array, required): Array of field definitions (name, type, description, options)
-
update_table
- Updates a table's name or description
- Input parameters:
baseId(string, required): The ID of the Airtable basetableId(string, required): The ID of the tablename(string, optional): New name for the tabledescription(string, optional): New description for the table
-
create_field
- Creates a new field in a table
- Input parameters:
baseId(string, required): The ID of the Airtable basetableId(string, required): The ID of the tablename(string, required): Name of the new fieldtype(string, required): Type of the fielddescription(string, optional): Description of the fieldoptions(object, optional): Field-specific options
-
update_field
- Updates a field's name or description
- Input parameters:
baseId(string, required): The ID of the Airtable basetableId(string, required): The ID of the tablefieldId(string, required): The ID of the fieldname(string, optional): New name for the fielddescription(string, optional): New description for the field
资源
服务器为 Airtable 基础和表格提供模式信息:
- 表格模式 (
airtable://<baseId>/<tableId>/schema)- 每个表格的 JSON 模式信息
- 包括:
- 基础 ID 和表格 ID
- 表格名称和描述
- 主字段 ID
- 字段定义(ID、名称、类型、描述、选项)
- 视图定义(ID、名称、类型)
- 通过 Airtable 的元数据 API 自动发现
贡献
欢迎在 GitHub 上提交拉取请求!要开始贡献,请按以下步骤操作:
- 安装 Git 和 Node.js
- 克隆仓库
- 使用
npm install安装依赖 - 运行
npm run test执行测试 - 使用
npm run build构建项目
- 您可以使用
npm run build:watch在编辑src/index.ts后自动构建。这意味着您可以保存文件,重新加载 Claude Desktop(使用 Ctrl/Cmd+R),然后更改就会生效。
发布
版本遵循 语义化版本规范。
要发布新版本:
- 使用
npm version <major | minor | patch>来更新版本号 - 运行
git push --follow-tags推送带有标签的代码 - 等待 GitHub Actions 将其发布到 NPM 注册表。