@rashidazarang/airtable-mcp 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,38 @@
1
+ ---
2
+ name: Bug report
3
+ about: Create a report to help us improve
4
+ title: ''
5
+ labels: ''
6
+ assignees: ''
7
+
8
+ ---
9
+
10
+ **Describe the bug**
11
+ A clear and concise description of what the bug is.
12
+
13
+ **To Reproduce**
14
+ Steps to reproduce the behavior:
15
+ 1. Go to '...'
16
+ 2. Click on '....'
17
+ 3. Scroll down to '....'
18
+ 4. See error
19
+
20
+ **Expected behavior**
21
+ A clear and concise description of what you expected to happen.
22
+
23
+ **Screenshots**
24
+ If applicable, add screenshots to help explain your problem.
25
+
26
+ **Desktop (please complete the following information):**
27
+ - OS: [e.g. iOS]
28
+ - Browser [e.g. chrome, safari]
29
+ - Version [e.g. 22]
30
+
31
+ **Smartphone (please complete the following information):**
32
+ - Device: [e.g. iPhone6]
33
+ - OS: [e.g. iOS8.1]
34
+ - Browser [e.g. stock browser, safari]
35
+ - Version [e.g. 22]
36
+
37
+ **Additional context**
38
+ Add any other context about the problem here.
@@ -0,0 +1,10 @@
1
+ ---
2
+ name: Custom issue template
3
+ about: Describe this issue template's purpose here.
4
+ title: ''
5
+ labels: ''
6
+ assignees: ''
7
+
8
+ ---
9
+
10
+
@@ -0,0 +1,20 @@
1
+ ---
2
+ name: Feature request
3
+ about: Suggest an idea for this project
4
+ title: ''
5
+ labels: ''
6
+ assignees: ''
7
+
8
+ ---
9
+
10
+ **Is your feature request related to a problem? Please describe.**
11
+ A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12
+
13
+ **Describe the solution you'd like**
14
+ A clear and concise description of what you want to happen.
15
+
16
+ **Describe alternatives you've considered**
17
+ A clear and concise description of any alternative solutions or features you've considered.
18
+
19
+ **Additional context**
20
+ Add any other context or screenshots about the feature request here.
@@ -0,0 +1,109 @@
1
+ # Claude/Windsurf Integration Guide
2
+
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
+
5
+ ## Setup for Claude
6
+
7
+ ### Requirements
8
+
9
+ - Node.js v14 or higher
10
+ - An Airtable account with Personal Access Token
11
+ - An Airtable base you want to connect to
12
+
13
+ ### Configuration
14
+
15
+ Claude requires the configuration to be specified in JSON format. Here's how to set up the configuration for Claude:
16
+
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
+ ```
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:
52
+ ```json
53
+ {
54
+ "mcpServers": {
55
+ "AIRTABLE": {
56
+ "command": "npx",
57
+ "args": [
58
+ "-y",
59
+ "@smithery/cli@latest",
60
+ "run",
61
+ "@rashidazarang/airtable-mcp",
62
+ "--token",
63
+ "your_token_here",
64
+ "--base",
65
+ "your_base_id_here"
66
+ ]
67
+ }
68
+ }
69
+ }
70
+ ```
71
+
72
+ 2. In Windsurf settings, configure it to use this file.
73
+
74
+ ## Common Issues
75
+
76
+ ### AbortController Error
77
+
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:
79
+
80
+ 1. **Update Node.js** (recommended) - Install Node.js v15+ which includes AbortController natively.
81
+
82
+ 2. **Use Polyfill** - New versions of our MCP (1.1.0+) automatically add a polyfill for older Node versions.
83
+
84
+ ### Server Disconnected or Timeout Errors
85
+
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
90
+
91
+ ## Using the MCP with Claude
92
+
93
+ Once connected, you can use the following tools:
94
+
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
100
+
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."
103
+
104
+ ## Support
105
+
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,0 +1,81 @@
1
+ # Contributing to Airtable MCP
2
+
3
+ Thank you for your interest in contributing to Airtable MCP! This guide will help you get started with contributing to this project.
4
+
5
+ ## Development Setup
6
+
7
+ 1. **Clone the repository**:
8
+ ```bash
9
+ git clone https://github.com/rashidazarang/airtable-mcp.git
10
+ cd airtable-mcp
11
+ ```
12
+
13
+ 2. **Install dependencies**:
14
+ ```bash
15
+ pip install -r requirements.txt
16
+ ```
17
+
18
+ 3. **Environment setup**:
19
+ Create a `.env` file in the root directory with your Airtable API token:
20
+ ```
21
+ AIRTABLE_PERSONAL_ACCESS_TOKEN=your_token_here
22
+ AIRTABLE_BASE_ID=optional_default_base_id
23
+ ```
24
+
25
+ ## Running the Server
26
+
27
+ You can run the server directly with Python:
28
+
29
+ ```bash
30
+ python3.10 inspector_server.py --token "your_token" --base "your_base_id"
31
+ ```
32
+
33
+ Or through the Node.js wrapper:
34
+
35
+ ```bash
36
+ node index.js --token "your_token" --base "your_base_id"
37
+ ```
38
+
39
+ ## Testing
40
+
41
+ Run the test client to verify your Airtable API access:
42
+
43
+ ```bash
44
+ python3.10 test_client.py
45
+ ```
46
+
47
+ ## Pull Request Process
48
+
49
+ 1. **Fork the Repository** on GitHub.
50
+
51
+ 2. **Create a Branch** for your feature or bugfix.
52
+
53
+ 3. **Make Changes** according to the project style guidelines.
54
+
55
+ 4. **Test Thoroughly** to ensure your changes work as expected.
56
+
57
+ 5. **Document Changes** in the README.md if necessary.
58
+
59
+ 6. **Submit a Pull Request** to the main repository.
60
+
61
+ ## Coding Guidelines
62
+
63
+ - Follow Python PEP 8 style guidelines
64
+ - Write docstrings for all functions, classes, and modules
65
+ - Include type hints for function parameters and return values
66
+ - Write clear commit messages
67
+
68
+ ## Adding New Tools
69
+
70
+ When adding new Airtable API tools:
71
+
72
+ 1. Add the tool function to `inspector_server.py` using the `@app.tool()` decorator
73
+ 2. Define clear parameter and return types
74
+ 3. Provide a descriptive docstring for the tool
75
+ 4. Update the inspector.py file to include the new tool in the JSON schema
76
+ 5. Add error handling for API requests
77
+ 6. Update the README.md to document the new tool
78
+
79
+ ## License
80
+
81
+ By contributing to this project, you agree that your contributions will be licensed under the project's MIT License.
package/Dockerfile ADDED
@@ -0,0 +1,39 @@
1
+ FROM python:3.10-slim
2
+
3
+ WORKDIR /app
4
+
5
+ # Install Node.js for the NPX functionality
6
+ RUN apt-get update && \
7
+ apt-get install -y curl gnupg && \
8
+ curl -fsSL https://deb.nodesource.com/setup_18.x | bash - && \
9
+ apt-get install -y nodejs && \
10
+ apt-get clean && \
11
+ rm -rf /var/lib/apt/lists/*
12
+
13
+ # Copy package files first (for better layer caching)
14
+ COPY package.json /app/
15
+ COPY package-lock.json /app/
16
+
17
+ # Install Node.js dependencies
18
+ RUN npm install
19
+
20
+ # Copy Python requirements and install
21
+ COPY requirements.txt /app/
22
+ RUN pip install --no-cache-dir -r requirements.txt
23
+
24
+ # Copy source code
25
+ COPY index.js /app/
26
+ COPY inspector.py /app/
27
+ COPY inspector_server.py /app/
28
+ COPY airtable_mcp/ /app/airtable_mcp/
29
+
30
+ # Set environment variables
31
+ ENV NODE_ENV=production
32
+ ENV PYTHONUNBUFFERED=1
33
+
34
+ # Expose the port the server might run on
35
+ EXPOSE 3000
36
+
37
+ # Start the server in STDIO mode by default
38
+ # Smithery will override this with their own command
39
+ CMD ["python3", "inspector_server.py"]
@@ -0,0 +1,183 @@
1
+ # Installation
2
+
3
+ Airtable MCP embeds Airtable database connectivity directly into your AI-powered code editor
4
+
5
+ ## Getting Started
6
+
7
+ Built by Rashid Azarang,
8
+
9
+ Airtable MCP gives AI code editors and agents the ability to access and manipulate your Airtable databases for powerful data management capabilities - all in a secure manner with your own API tokens.
10
+
11
+ With this MCP server tool, you can enable AI code editors and agents to have access to:
12
+
13
+ * List and access all your Airtable bases
14
+ * Browse tables, fields, and record data
15
+ * Create, read, update, and delete records
16
+ * Export and manipulate schemas
17
+ * Perform complex queries against your data
18
+ * Create data migration mappings
19
+ * Analyze and transform your Airtable data
20
+
21
+ That way, you can simply tell Cursor or any AI code editor with MCP integrations:
22
+
23
+ "Show me all the tables in my Airtable base"
24
+
25
+ "Find all records from the Customers table where the status is Active and the last purchase was after January 1st"
26
+
27
+ "Create a new record in the Products table with these fields..."
28
+
29
+ "Export the schema of my current Airtable base"
30
+
31
+ "Help me create a mapping between these two tables for data migration"
32
+
33
+ ---
34
+
35
+ ## Requirements
36
+
37
+ * Node.js 14+ installed on your machine
38
+ * Python 3.10+ installed on your machine (automatically detected)
39
+ * Airtable Personal Access Token (API Key)
40
+ * MCP Client Application (Cursor, Claude Desktop, Cline, Zed, etc.)
41
+
42
+ **Note**: Model Context Protocol (MCP) is specific to Anthropic models. When using an editor like Cursor, make sure to enable composer agent with Claude 3.5 Sonnet selected as the model.
43
+
44
+ ---
45
+
46
+ ## Installation
47
+
48
+ ### 1. Install via Smithery (Easiest)
49
+
50
+ The easiest way to install Airtable MCP is through Smithery:
51
+
52
+ 1. Visit [Smithery](https://smithery.ai)
53
+ 2. Search for "@rashidazarang/airtable-mcp"
54
+ 3. Click "Install" and follow the prompts to configure with your Airtable token and base ID
55
+
56
+ ### 2. Install via NPX (Alternative)
57
+
58
+ Another simple way to install and use Airtable MCP is via NPX:
59
+
60
+ ```bash
61
+ # Install globally
62
+ npm install -g airtable-mcp
63
+
64
+ # Or use directly with npx (no installation needed)
65
+ npx airtable-mcp --token YOUR_AIRTABLE_TOKEN --base YOUR_BASE_ID
66
+ ```
67
+
68
+ ### 3. Get Your Airtable API Token
69
+
70
+ 1. Log in to your Airtable account
71
+ 2. Go to your [Account Settings](https://airtable.com/account)
72
+ 3. Navigate to the "API" section
73
+ 4. Create a Personal Access Token with appropriate permissions
74
+ 5. Copy your token to use in the configuration
75
+
76
+ ### 4. Configure Your MCP Client
77
+
78
+ #### For Cursor:
79
+
80
+ 1. Go to Cursor Settings
81
+ 2. Navigate to Features, scroll down to MCP Servers and click "Add new MCP server"
82
+ 3. Give it a unique name (airtable-tools), set type to "command" and set the command to:
83
+
84
+ **For macOS/Linux/Windows:**
85
+ ```bash
86
+ npx airtable-mcp --token YOUR_AIRTABLE_TOKEN --base YOUR_BASE_ID
87
+ ```
88
+
89
+ Replace `YOUR_AIRTABLE_TOKEN` with your Airtable Personal Access Token and `YOUR_BASE_ID` with your default Airtable base ID (optional).
90
+
91
+ #### For Advanced Users via ~/.cursor/mcp.json:
92
+
93
+ Edit your `~/.cursor/mcp.json` file to include:
94
+
95
+ ```json
96
+ {
97
+ "mcpServers": {
98
+ "airtable-tools": {
99
+ "command": "npx",
100
+ "args": [
101
+ "airtable-mcp",
102
+ "--token", "YOUR_AIRTABLE_TOKEN",
103
+ "--base", "YOUR_BASE_ID"
104
+ ]
105
+ }
106
+ }
107
+ }
108
+ ```
109
+
110
+ ### 5. Verify Connection
111
+
112
+ 1. Restart your MCP client (Cursor, etc.)
113
+ 2. Create a new query using the Composer Agent with Claude 3.5 Sonnet model
114
+ 3. Ask something like "List my Airtable bases" or "Show me the tables in my current base"
115
+ 4. You should see a response with your Airtable data
116
+
117
+ ### 6. For Production Use (Optional)
118
+
119
+ For continuous availability, you can set up Airtable MCP using PM2:
120
+
121
+ ```bash
122
+ # Install PM2 if you don't have it
123
+ npm install -g pm2
124
+
125
+ # Create a PM2 config file
126
+ echo 'module.exports = {
127
+ apps: [
128
+ {
129
+ name: "airtable-mcp",
130
+ script: "npx",
131
+ args: [
132
+ "airtable-mcp",
133
+ "--token", "YOUR_AIRTABLE_TOKEN",
134
+ "--base", "YOUR_BASE_ID"
135
+ ],
136
+ env: {
137
+ PATH: process.env.PATH,
138
+ },
139
+ },
140
+ ],
141
+ };' > ecosystem.config.js
142
+
143
+ # Start the process
144
+ pm2 start ecosystem.config.js
145
+
146
+ # Set it to start on boot
147
+ pm2 startup
148
+ pm2 save
149
+ ```
150
+
151
+ ---
152
+
153
+ ## Troubleshooting
154
+
155
+ Here are some common issues and their solutions:
156
+
157
+ ### Error: Unable to connect to Airtable API
158
+
159
+ - Double-check your Airtable API token is correct and has sufficient permissions
160
+ - Verify your internet connection
161
+ - Check if Airtable API is experiencing downtime
162
+
163
+ ### Issue: MCP server not connecting
164
+
165
+ - Make sure Node.js 14+ and Python 3.10+ are installed and in your PATH
166
+ - Try specifying a specific version: `npx airtable-mcp@latest`
167
+ - Check the Cursor logs for any connection errors
168
+
169
+ ### Error: Base not found
170
+
171
+ - Verify your base ID is correct
172
+ - Make sure your API token has access to the specified base
173
+ - Try listing all bases first to confirm access
174
+
175
+ ### Issue: Permission denied errors
176
+
177
+ - Make sure your token has the necessary permissions for the operations you're trying to perform
178
+ - Check if you're attempting operations on tables/bases that your token doesn't have access to
179
+
180
+ ### For more help
181
+
182
+ - Open an issue on the [GitHub repository](https://github.com/rashidazarang/airtable-mcp/issues)
183
+ - Check the Airtable API documentation for any API-specific errors
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Rashid Azarang
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.