Airtable Model Context Protocol Server

1.13.0 · active · verified Tue Apr 21

The `airtable-mcp-server` package provides a Model Context Protocol (MCP) server designed to enable Large Language Models (LLMs) with read and write access to Airtable databases. It exposes a set of tools allowing LLMs to inspect Airtable schemas, then read and write records. The current stable version is 1.13.0, indicating a pre-1.x release cadence focusing on feature additions and minor fixes, with frequent patch and minor updates. Key differentiators include its adherence to the Model Context Protocol, providing structured access to Airtable via LLMs, and its ease of deployment via `npx` or integration with platforms like Claude Desktop, Cursor, and Cline. It handles schema inspection, record manipulation, and attachment uploads, abstracting Airtable's API for AI agents.

Common errors

Warnings

Install

Imports

Quickstart

This quickstart demonstrates how to programmatically start the Airtable MCP server using its `startServer` function, configuring it with an Airtable API key and an optional base ID, and setting up a basic shutdown handler.

import { startServer } from 'airtable-mcp-server';

const PORT = process.env.PORT ? parseInt(process.env.PORT, 10) : 3000;
const AIRTABLE_API_KEY = process.env.AIRTABLE_API_KEY ?? '';
const AIRTABLE_BASE_ID = process.env.AIRTABLE_BASE_ID ?? '';

async function main() {
  if (!AIRTABLE_API_KEY) {
    console.error('AIRTABLE_API_KEY environment variable is required.');
    process.exit(1);
  }

  console.log(`Starting Airtable MCP server on port ${PORT}...`);
  try {
    const server = await startServer({
      port: PORT,
      airtableApiKey: AIRTABLE_API_KEY,
      airtableBaseIds: AIRTABLE_BASE_ID ? [AIRTABLE_BASE_ID] : [], // Optional: specify base IDs
      // Additional configuration options can be added here
    });
    console.log(`Airtable MCP server listening at http://localhost:${PORT}`);

    // Optional: Graceful shutdown
    process.on('SIGTERM', () => {
      console.log('SIGTERM signal received: closing HTTP server');
      server.close(() => {
        console.log('HTTP server closed');
      });
    });
  } catch (error) {
    console.error('Failed to start server:', error);
    process.exit(1);
  }
}

main();

view raw JSON →