Airtable MCP Server

Airtable MCP Server

Enables complete interaction with Airtable databases through 16 CRUD operations including batch processing, schema management, and record manipulation. Designed for AI applications and n8n workflows with HTTP streaming support.

Category
访问服务器

README

Airtable MCP Server

A Model Context Protocol (MCP) server for Airtable, designed to integrate with AI-powered applications and n8n workflows. This server provides a standardized interface for interacting with Airtable bases, tables, and records.

🚀 Features

  • 16 Core Tools: Complete CRUD operations for Airtable
  • Batch Operations: Create, update, and delete multiple records at once
  • Schema Management: Access table, field, and view information
  • HTTP Streamable: Compatible with n8n and other HTTP-based MCP clients
  • TypeScript: Full type safety and modern JavaScript features
  • Render Ready: Pre-configured for deployment on Render

🛠️ Available Tools

Base Operations

  • get_base_info - Get information about the Airtable base
  • list_tables - List all tables in the base

Table Operations

  • get_table_info - Get detailed table information
  • list_fields - List all fields in a table
  • get_field_info - Get detailed field information

Record Operations

  • list_records - List records with filtering, sorting, and pagination
  • get_record - Get a specific record by ID
  • create_record - Create a new record
  • update_record - Update an existing record
  • delete_record - Delete a record

Batch Operations

  • create_records - Create multiple records (up to 10)
  • update_records - Update multiple records (up to 10)
  • delete_records - Delete multiple records (up to 10)

View Operations

  • list_views - List all views for a table
  • get_view_info - Get detailed view information

🚀 Quick Start

Prerequisites

  • Node.js 20+
  • Airtable API key
  • Airtable base ID

Installation

  1. Clone the repository

    git clone https://github.com/jjwjr94/airtable-mcp.git
    cd airtable-mcp
    
  2. Install dependencies

    npm install
    
  3. Set up environment variables

    cp env.example .env
    # Edit .env with your Airtable credentials
    
  4. Start the development server

    npm run dev:http
    

Environment Variables

# Server Configuration
NODE_ENV=development
PORT=3000

# Airtable Configuration
AIRTABLE_API_KEY=your_airtable_api_key_here
AIRTABLE_BASE_ID=your_base_id_here

🔧 Usage

HTTP Server (Recommended for n8n)

The HTTP server runs on port 3000 by default and provides these endpoints:

  • Health Check: GET /health
  • MCP Endpoint: POST /mcp
  • Set Credentials: POST /set-credentials

Headers Required

For all MCP requests, include these headers:

x-airtable-api-key: YOUR_API_KEY
x-airtable-base-id: YOUR_BASE_ID

Example MCP Request

curl -X POST http://localhost:3000/mcp \
  -H "Content-Type: application/json" \
  -H "x-airtable-api-key: YOUR_API_KEY" \
  -H "x-airtable-base-id: YOUR_BASE_ID" \
  -d '{
    "jsonrpc": "2.0",
    "method": "tools/call",
    "params": {
      "name": "list_tables",
      "arguments": {}
    },
    "id": "1"
  }'

🚀 Deployment

Render (Recommended)

  1. Fork this repository
  2. Connect to Render
  3. Deploy as a Web Service
  4. Set environment variables in Render dashboard

The render.yaml file is pre-configured for easy deployment.

Environment Variables for Production

NODE_ENV=production
PORT=10000

🧪 Testing

Run Tests

# Start the server first
npm run dev:http

# In another terminal, run tests
npm test

Test Individual Endpoints

# Health check
curl http://localhost:3000/health

# List tools
curl -X POST http://localhost:3000/mcp \
  -H "Content-Type: application/json" \
  -H "x-airtable-api-key: YOUR_API_KEY" \
  -H "x-airtable-base-id: YOUR_BASE_ID" \
  -d '{"jsonrpc":"2.0","method":"tools/list","params":{},"id":"1"}'

🔌 n8n Integration

HTTP Request Node Configuration

  1. Method: POST
  2. URL: https://your-render-app.onrender.com/mcp
  3. Headers:
    • Content-Type: application/json
    • x-airtable-api-key: {{ $json.apiKey }}
    • x-airtable-base-id: {{ $json.baseId }}
  4. Body:
    {
      "jsonrpc": "2.0",
      "method": "tools/call",
      "params": {
        "name": "list_tables",
        "arguments": {}
      },
      "id": "{{ $json.requestId }}"
    }
    

Example n8n Workflow

  1. Set node to configure Airtable credentials
  2. HTTP Request node to call MCP tools
  3. Switch node to handle different tool responses
  4. Process node to format data for your needs

📚 API Reference

Tool: list_records

List records from a table with optional filtering and pagination.

Parameters:

  • tableId (required): The ID of the table
  • pageSize (optional): Number of records to return (max 100)
  • filterByFormula (optional): Airtable formula to filter records
  • sort (optional): Sorting configuration
  • fields (optional): Specific fields to return
  • view (optional): View ID to use

Example:

{
  "name": "list_records",
  "arguments": {
    "tableId": "tblXXXXXXXXXXXXXX",
    "pageSize": 50,
    "filterByFormula": "{Status} = 'Active'",
    "sort": [{"field": "Name", "direction": "asc"}],
    "fields": ["Name", "Status", "Created"]
  }
}

Tool: create_record

Create a new record in a table.

Parameters:

  • tableId (required): The ID of the table
  • fields (required): The field values for the new record

Example:

{
  "name": "create_record",
  "arguments": {
    "tableId": "tblXXXXXXXXXXXXXX",
    "fields": {
      "Name": "New Project",
      "Status": "Active",
      "Priority": "High"
    }
  }
}

🔒 Security

  • CORS: Configured for Render and n8n domains
  • Helmet: Security headers enabled
  • Input Validation: All inputs are validated
  • Error Handling: Secure error messages

🚀 Development

Scripts

npm run build          # Build TypeScript
npm run start          # Start production server
npm run start:http     # Start HTTP server
npm run dev            # Development mode
npm run dev:http       # HTTP development mode
npm run watch          # Watch mode for TypeScript
npm test               # Run tests
npm run inspector      # MCP inspector

Project Structure

airtable-mcp/
├── src/
│   ├── airtable-client-wrapper.ts  # Airtable API client
│   ├── tool-handler.ts             # MCP tool definitions
│   └── version.ts                  # Version information
├── index.ts                        # Standard MCP server
├── index-http.ts                   # HTTP server
├── test-http-server.js             # Test suite
├── render.yaml                     # Render deployment config
└── package.json                    # Dependencies and scripts

🤝 Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests if applicable
  5. Submit a pull request

📄 License

MIT License - see LICENSE file for details.

🙏 Acknowledgments

  • Built for the Model Context Protocol
  • Powered by Airtable API
  • Compatible with Claude Desktop and other MCP clients
  • Designed for n8n integration

📞 Support


Version: 1.0.0 | Status: 🚀 Production Ready | MCP Protocol: 2025-06-18 | Type Safety: Full TypeScript | Last Updated: January 2025

推荐服务器

Baidu Map

Baidu Map

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

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

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

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

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

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

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

官方
精选
本地
TypeScript
VeyraX

VeyraX

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

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

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

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

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

官方
精选
Python
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 模型以安全和受控的方式获取实时的网络信息。

官方
精选