|
1 |
| -# Using Airtable MCP with Claude |
| 1 | +# Claude/Windsurf Integration Guide |
2 | 2 |
|
3 |
| -This guide explains how to integrate the Airtable MCP with various Claude MCP clients. |
| 3 | +This guide explains how to set up the Airtable MCP for use with Claude (including Anthropic's tools and in VSCode extensions like Windsurf). |
4 | 4 |
|
5 |
| -## Compatible Claude MCP Clients |
| 5 | +## Setup for Claude |
6 | 6 |
|
7 |
| -This MCP works with any client that supports Anthropic's Model Context Protocol (MCP), including: |
| 7 | +### Requirements |
8 | 8 |
|
9 |
| -- [Claude Desktop](https://claude.ai/desktop) |
10 |
| -- [Cursor](https://cursor.sh/) |
11 |
| -- [Cline](https://github.com/lpw/cline) |
12 |
| -- [Zed](https://zed.dev/) |
13 |
| -- Any other MCP-compatible client |
| 9 | +- Node.js v14 or higher |
| 10 | +- An Airtable account with Personal Access Token |
| 11 | +- An Airtable base you want to connect to |
14 | 12 |
|
15 |
| -## Recommended: Using Smithery (Easiest Method) |
| 13 | +### Configuration |
16 | 14 |
|
17 |
| -The recommended way to use this MCP is through Smithery, which handles all dependencies and configuration automatically: |
| 15 | +Claude requires the configuration to be specified in JSON format. Here's how to set up the configuration for Claude: |
18 | 16 |
|
19 |
| -1. **Configure your MCP client**: |
20 |
| - - Edit your client's MCP configuration file (e.g., `~/.cursor/mcp.json`) |
21 |
| - - Add the following configuration: |
| 17 | +1. In Claude settings, add a new MCP server with these settings: |
| 18 | + - Name: `airtable-mcp` |
| 19 | + - Command: `npx` |
| 20 | + - Arguments: |
| 21 | + ``` |
| 22 | + -y @smithery/cli@latest run @rashidazarang/airtable-mcp --config {"airtable_token":"your_token_here","base_id":"your_base_id_here"} |
| 23 | + ``` |
22 | 24 |
|
| 25 | +2. **IMPORTANT: JSON Format** |
| 26 | + Make sure the JSON in the `--config` parameter is properly formatted: |
| 27 | + - No line breaks |
| 28 | + - No extra backslashes |
| 29 | + - No surrounding quotes |
| 30 | +
|
| 31 | +### Troubleshooting JSON Issues |
| 32 | +
|
| 33 | +If you encounter the error `Unexpected token 'F', "Found & ig"... is not valid JSON`, try these fixes: |
| 34 | +
|
| 35 | +1. **Method 1: Simplify JSON** - Remove any complex characters from your token and try again. |
| 36 | +
|
| 37 | +2. **Method 2: Escape Properly** - Make sure you format the command with proper escaping: |
| 38 | + ``` |
| 39 | + -y @smithery/cli@latest run @rashidazarang/airtable-mcp --config {\"airtable_token\":\"your_token_here\",\"base_id\":\"your_base_id_here\"} |
| 40 | + ``` |
| 41 | +
|
| 42 | +3. **Method 3: Use Separate Parameters** - Instead of using --config, use individual parameters: |
| 43 | + ``` |
| 44 | + -y @smithery/cli@latest run @rashidazarang/airtable-mcp --token your_token_here --base your_base_id_here |
| 45 | + ``` |
| 46 | +
|
| 47 | +## Setup for Windsurf |
| 48 | +
|
| 49 | +Windsurf users should use a dedicated config file to avoid JSON parsing issues: |
| 50 | +
|
| 51 | +1. Create a file called `mcp_config.json` with: |
23 | 52 | ```json
|
24 | 53 | {
|
25 | 54 | "mcpServers": {
|
26 |
| - "airtable-mcp": { |
| 55 | + "AIRTABLE": { |
27 | 56 | "command": "npx",
|
28 | 57 | "args": [
|
29 | 58 | "-y",
|
30 | 59 | "@smithery/cli@latest",
|
31 | 60 | "run",
|
32 | 61 | "@rashidazarang/airtable-mcp",
|
33 |
| - "--config", |
34 |
| - "{\"airtable_token\":\"YOUR_AIRTABLE_TOKEN\\\"\",\"base_id\":\"YOUR_BASE_ID\"}" |
| 62 | + "--token", |
| 63 | + "your_token_here", |
| 64 | + "--base", |
| 65 | + "your_base_id_here" |
35 | 66 | ]
|
36 | 67 | }
|
37 | 68 | }
|
38 | 69 | }
|
39 | 70 | ```
|
40 | 71 |
|
41 |
| -2. **Replace tokens**: |
42 |
| - - Replace `YOUR_AIRTABLE_TOKEN\"` with your Airtable Personal Access Token (maintaining the backslash and quote) |
43 |
| - - Replace `YOUR_BASE_ID` with your Airtable base ID |
| 72 | +2. In Windsurf settings, configure it to use this file. |
44 | 73 |
|
45 |
| -3. **Restart your client** to load the new tools |
| 74 | +## Common Issues |
46 | 75 |
|
47 |
| -## Setting Up with Claude Desktop |
| 76 | +### AbortController Error |
48 | 77 |
|
49 |
| -1. **Install the Airtable MCP**: |
50 |
| - ```bash |
51 |
| - npm install -g airtable-mcp |
52 |
| - ``` |
53 |
| - |
54 |
| -2. **Start the MCP server**: |
55 |
| - ```bash |
56 |
| - airtable-mcp --token "your_airtable_token" --base "your_base_id" |
57 |
| - ``` |
58 |
| - |
59 |
| -3. **Configure Claude Desktop**: |
60 |
| - - Open Claude Desktop |
61 |
| - - Go to Settings > Tools > Add Tool |
62 |
| - - For the tool URL, use: `http://localhost:8010/mcp` (default port) |
63 |
| - - Click "Add Tool" |
64 |
| - - You'll now see the Airtable tools in Claude's tool palette |
65 |
| - |
66 |
| -## Setting Up with Cursor |
67 |
| - |
68 |
| -1. **Edit your Cursor MCP configuration**: |
69 |
| - - Open or create the file: `~/.cursor/mcp.json` |
70 |
| - - Add the Smithery configuration as described in the "Recommended" section above |
71 |
| - |
72 |
| -2. **Restart Cursor** to load the new tools |
73 |
| - |
74 |
| -## Setting Up with Cline |
75 |
| - |
76 |
| -1. **Start the MCP server**: |
77 |
| - ```bash |
78 |
| - npx airtable-mcp --token "your_airtable_token" --base "your_base_id" |
79 |
| - ``` |
80 |
| - |
81 |
| -2. **Run Cline with MCP support**: |
82 |
| - ```bash |
83 |
| - cline --mcp-urls http://localhost:8010/mcp |
84 |
| - ``` |
| 78 | +If you see an error like `ReferenceError: AbortController is not defined`, this is because you're using an older version of Node.js that doesn't include this feature. Options to fix: |
85 | 79 |
|
86 |
| -## Using the MCP in Claude |
| 80 | +1. **Update Node.js** (recommended) - Install Node.js v15+ which includes AbortController natively. |
87 | 81 |
|
88 |
| -Once configured, you can use natural language to work with Airtable data. Here are some examples: |
| 82 | +2. **Use Polyfill** - New versions of our MCP (1.1.0+) automatically add a polyfill for older Node versions. |
89 | 83 |
|
90 |
| -- "Can you list all the tables in our Airtable base?" |
91 |
| -- "Get all records from the Projects table where Status is Complete" |
92 |
| -- "Create a new record in the Contacts table with name John Smith and email [email protected]" |
93 |
| -- "Update the Budget field for the Marketing project to $15,000" |
| 84 | +### Server Disconnected or Timeout Errors |
94 | 85 |
|
95 |
| -## Testing Your Setup |
| 86 | +1. Check that your Airtable token is valid and has the necessary permissions |
| 87 | +2. Ensure you have proper internet connectivity |
| 88 | +3. Try restarting the MCP server |
| 89 | +4. Check the logs for any specific error messages |
96 | 90 |
|
97 |
| -To confirm your MCP setup is working correctly: |
| 91 | +## Using the MCP with Claude |
98 | 92 |
|
99 |
| -1. Restart your MCP client after making configuration changes |
100 |
| -2. Start a conversation with Claude |
101 |
| -3. Ask a simple question like "Can you list all the tables in my Airtable base?" |
102 |
| -4. Claude should respond with a list of tables from your Airtable base |
| 93 | +Once connected, you can use the following tools: |
103 | 94 |
|
104 |
| -If you see tables listed, congratulations! Your Airtable MCP is working correctly. |
| 95 | +- `list_bases` - Show available Airtable bases |
| 96 | +- `list_tables` - List tables in the current base |
| 97 | +- `list_records` - Get records from a specific table |
| 98 | +- `create_records` - Add new records to a table |
| 99 | +- `update_records` - Modify existing records |
105 | 100 |
|
106 |
| -## Troubleshooting |
| 101 | +For example, in Claude, you might ask: |
| 102 | +"Please list all tables in my Airtable base and then show me records from the 'Contacts' table." |
107 | 103 |
|
108 |
| -- **Tool not appearing**: Make sure the MCP server is running and the client is properly configured |
109 |
| -- **Authentication errors**: Verify your Airtable token has the necessary permissions |
110 |
| -- **Connection issues**: Confirm the MCP server is running on the expected port (default is 8010) |
111 |
| -- **JSON escaping issues**: Make sure the backslash characters in the configuration are preserved |
112 |
| -- **Smithery not found**: Try installing the Smithery CLI globally with `npm install -g @smithery/cli` |
| 104 | +## Support |
113 | 105 |
|
114 |
| -For more detailed troubleshooting, check the server logs where you started the Airtable MCP. |
| 106 | +If you continue to experience issues, please report them on GitHub with: |
| 107 | +- Error messages |
| 108 | +- Node.js version (`node -v`) |
| 109 | +- Operating system details |
0 commit comments