Airtable MCP Server

Airtable MCP Server

Lets Claude read, create, update, and search records in an Airtable base using your own API key.

Category
访问服务器

README

Airtable MCP Server

CI License: MIT

A Model Context Protocol server that lets Claude (or any MCP client) read, create, update, and search records in an Airtable base through your own API key.

It exposes five tools over stdio:

Tool What it does
list_records List records from a table, with optional view, page size, max records, and an Airtable filterByFormula.
get_record Fetch a single record by its ID.
create_record Create a record from a fields object.
update_record Update selected fields on an existing record.
search_records Case-insensitive substring search on one field.

Why

Airtable is where a lot of small teams keep their CRM, content calendar, or ops tracker. This server puts that data one instruction away from Claude — "add a lead for Acme Corp", "which deals are still open?" — without exporting anything or writing glue code per question.

Requirements

  • Node.js 18+ (uses the built-in fetch)
  • An Airtable personal access token with data.records:read and data.records:write scopes
  • The base ID of the base you want to expose (from the base URL: airtable.com/appXXXXXXXXXXXXXX/...)

Install & build

git clone https://github.com/medlag/airtable-mcp-server.git
cd airtable-mcp-server
npm install
npm run build

Configuration

The server reads two required environment variables:

Variable Required Description
AIRTABLE_API_KEY yes Airtable personal access token.
AIRTABLE_BASE_ID yes ID of the base to operate on.
AIRTABLE_API_URL no Override the API base URL (defaults to https://api.airtable.com/v0).

Copy .env.example to .env for local runs, or set the variables in your MCP client config (below). The token is only ever read from the environment — it is never logged or written to disk.

Use it with Claude Desktop

Add this to your claude_desktop_config.json:

{
  "mcpServers": {
    "airtable": {
      "command": "node",
      "args": ["/absolute/path/to/airtable-mcp-server/dist/index.js"],
      "env": {
        "AIRTABLE_API_KEY": "patXXXXXXXXXXXXXX.XXXXXXXX",
        "AIRTABLE_BASE_ID": "appXXXXXXXXXXXXXX"
      }
    }
  }
}

Restart Claude Desktop; the five tools appear under the plug icon.

Use it with Claude Code

claude mcp add airtable \
  --env AIRTABLE_API_KEY=patXXXXXXXXXXXXXX.XXXXXXXX \
  --env AIRTABLE_BASE_ID=appXXXXXXXXXXXXXX \
  -- node /absolute/path/to/airtable-mcp-server/dist/index.js

Example prompts

Once connected, you can ask things like:

  • "List 10 rows from the Leads table."
  • "Create a record in Tasks with Name 'Ship v1' and Status 'In progress'."
  • "Find every record in Contacts whose Company contains 'acme'."
  • "Mark record recABC123 in Tasks as Done."

list_records and search_records return a single Airtable page — up to 100 records. Narrow with filterByFormula, a view, or maxRecords rather than expecting the full table.

Design notes

  • Typed REST wrapper — each Airtable endpoint maps to one method in src/airtable-client.ts; API errors surface as a structured AirtableError with the HTTP status and Airtable's own message.
  • stdout is sacred — MCP speaks JSON-RPC over stdout, so all logs go to stderr (src/logger.ts).
  • Fail fast on config — missing env vars throw a clear message at startup instead of a confusing 401 later (src/config.ts).
  • Input validation — every tool argument is validated with zod before a request is made.

Development

npm run dev        # tsc --watch (build config)
npm run typecheck  # type-check src + tests, no emit
npm test           # unit tests (Node's built-in runner via tsx)

Testing

The suite runs on Node's built-in test runner — no test framework dependency — and covers the logic that must not regress:

  • config — missing/blank env vars fail fast; values are trimmed; the API URL override is honoured.
  • formulasearch_records escapes backslashes and double quotes, and the field name is validated at the tool boundary, so a crafted value or field can't break out of the Airtable formula (injection guard).
  • airtable-client — GET/POST/PATCH shapes, bearer auth, query-string building, and both error paths (non-2xx → AirtableError with the API's message and status; transport failure → status 0). The fetch implementation is injected, so these run offline.

CI runs typecheck → build → test on Node 18, 20, and 22.

License

MIT — see LICENSE.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选