Sponsored by Deepsite.site

Airtable MCP Server

Created By
feloresa year ago
An MCP server for interacting with Airtable - create, list, and search records, bases, and tables.
Content

Airtable MCP Server

An MCP (Model Context Protocol) server that enables AI models to interact with Airtable databases. This server provides a bridge between Large Language Models (LLMs) and Airtable, allowing for operations like creating records, listing tables, and searching data.

Features

  • 🔍 Base & Table Management

    • List accessible bases
    • Browse tables within bases
    • View table schemas
  • 📝 Record Operations

    • Create new records
    • List existing records
    • Search records using Airtable formulas
    • Filter and paginate results
  • 🔐 Security

    • Secure API key management
    • Rate limiting protection
    • Input validation
    • Error handling
  • 🛠 Developer Features

    • TypeScript support
    • Comprehensive testing suite
    • Detailed logging
    • Easy configuration

Prerequisites

  • Node.js (v16 or higher)
  • npm or yarn
  • Airtable account and API key

Installation

  1. Clone the repository
git clone https://github.com/your-username/airtable-mcp-server.git
cd airtable-mcp-server
  1. Install dependencies
npm install
  1. Configure environment variables
cp .env.example .env

Edit .env with your Airtable API key and other configuration options.

  1. Build the server
npm run build

Configuration

Environment Variables

VariableDescriptionRequiredDefault
AIRTABLE_API_KEYYour Airtable API keyYes-
DEBUGEnable debug loggingNofalse
MAX_RECORDS_PER_REQUESTMaximum records per requestNo100
REQUEST_TIMEOUTAPI request timeout (ms)No30000
RATE_LIMITRequests per minuteNo5

Airtable API Key Setup

  1. Log in to your Airtable account
  2. Go to your account page
  3. Under the API section:
    • Generate a new API key or use an existing one
    • Copy the API key
  4. Add the key to your .env file

Usage

Starting the Server

npm start

Integration with Claude Desktop

  1. Open your Claude Desktop configuration:

    • Windows: %APPDATA%\Claude\claude_desktop_config.json
    • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  2. Add the server configuration:

{
  "mcpServers": {
    "airtable": {
      "command": "node",
      "args": ["/path/to/airtable-mcp-server/dist/index.js"],
      "env": {
        "AIRTABLE_API_KEY": "your_api_key_here"
      }
    }
  }
}
  1. Restart Claude Desktop

Available Tools

create-record

Creates a new record in an Airtable table.

{
  baseId: string;    // Airtable base ID
  tableId: string;   // Table ID or name
  fields: object;    // Record fields
}

list-records

Lists records from a table.

{
  baseId: string;     // Airtable base ID
  tableId: string;    // Table ID or name
  maxRecords?: number; // Maximum records to return
  view?: string;      // Optional view name
}

search-records

Searches records using Airtable formula.

{
  baseId: string;      // Airtable base ID
  tableId: string;     // Table ID or name
  filterFormula: string; // Search formula
}

Available Resources

  • airtable://bases - List accessible bases
  • airtable://bases/{baseId}/tables - List tables in a base
  • airtable://bases/{baseId}/tables/{tableId}/schema - Get table schema

Development

Project Structure

airtable-mcp-server/
├── src/
│   ├── index.ts           # Entry point
│   ├── server.ts          # MCP server implementation
│   ├── airtable/
│   │   ├── client.ts      # Airtable client wrapper
│   │   └── types.ts       # TypeScript types
│   └── utils/
│       ├── error-handler.ts
│       └── validators.ts
├── test/
│   ├── integration.test.ts
│   ├── server.test.ts
│   └── airtable.test.ts
└── dist/                  # Compiled JavaScript

Running Tests

# Run all tests
npm test

# Run with coverage
npm test -- --coverage

# Run integration tests
npm test -- integration.test.ts

Building

# Build once
npm run build

# Build in watch mode
npm run dev

Error Handling

The server implements comprehensive error handling:

  • Input validation errors
  • API rate limiting
  • Network timeouts
  • Authentication failures
  • Resource not found errors

Security Considerations

  1. API Key Protection
    • Never commit API keys to version control
    • Use environment variables
    • Rotate keys regularly
  2. Rate Limiting
    • Configurable rate limits
    • Protection against abuse
  3. Input Validation
    • All inputs are validated
    • Protection against injection

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Commit your changes
  4. Push to the branch
  5. Create a Pull Request

Testing

Unit Tests

npm test

Integration Tests

# Setup test environment
cp .env.example .env.test
# Edit .env.test with test credentials
npm test -- integration.test.ts

Troubleshooting

Common Issues

  1. Connection Errors

    • Check API key validity
    • Verify network connection
    • Check rate limiting
  2. Permission Errors

    • Verify base access permissions
    • Check API key scopes
  3. Rate Limiting

    • Adjust RATE_LIMIT in .env
    • Implement request queuing
    • Add delay between requests

License

MIT

Support

For issues and feature requests, please open an issue.

Acknowledgments

  • Model Context Protocol (MCP) team
  • Airtable API team
  • Contributors and maintainers
Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
Amap Maps高德地图官方 MCP Server
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
DeepChatYour AI Partner on Desktop
Playwright McpPlaywright MCP server
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
RedisA Model Context Protocol server that provides access to Redis databases. This server enables LLMs to interact with Redis key-value stores through a set of standardized tools.
Tavily Mcp
Y GuiA web-based graphical interface for AI chat interactions with support for multiple AI models and MCP (Model Context Protocol) servers.
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
ChatWiseThe second fastest AI chatbot™
WindsurfThe new purpose-built IDE to harness magic
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
CursorThe AI Code Editor
Serper MCP ServerA Serper MCP Server
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.