Skip to main content
Glama

Airtable MCP Server

by jjwjr94
PROJECT_SUMMARY.md6.95 kB
# 🎯 Airtable MCP Server - Project Summary ## ✨ What We Built A **Model Context Protocol (MCP) server for Airtable** that follows the same architectural pattern as your existing MCP servers (`asana-mcp` and `google-drive-mcp`). This server provides a standardized interface for AI-powered applications and n8n workflows to interact with Airtable. ## 🏗️ Architecture ### Core Components - **`AirtableClientWrapper`** - Handles all Airtable API interactions - **`tool_handler`** - Maps MCP tool calls to Airtable operations - **HTTP Server** - Provides RESTful endpoints for MCP operations - **TypeScript** - Full type safety and modern JavaScript features ### Design Pattern Following your established MCP server pattern: - **HTTP-based MCP protocol** instead of direct MCP SDK - **Header-based authentication** (x-airtable-api-key, x-airtable-base-id) - **Streaming responses** for real-time data - **Render-ready deployment** configuration ## 🛠️ Available Tools (16 Total) ### Base Operations - `get_base_info` - Get Airtable base information - `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, 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 ### 1. Local Development ```bash git clone <your-repo> cd airtable-mcp npm install npm run dev:http ``` ### 2. Test the Server ```bash # Health check curl http://localhost:3000/health # List available tools curl http://localhost:3000/tools ``` ### 3. Deploy to Render 1. Fork the repository 2. Connect to Render 3. Deploy as Web Service 4. Set environment variables ## 🔌 n8n Integration ### HTTP Request Node Configuration - **Method**: POST - **URL**: `https://your-render-app.onrender.com/mcp` - **Headers**: - `Content-Type: application/json` - `x-airtable-api-key: {{ $json.apiKey }}` - `x-airtable-base-id: {{ $json.baseId }}` - **Body**: JSON-RPC 2.0 format ### Example n8n Workflow 1. **Set** node - Configure Airtable credentials 2. **HTTP Request** node - Call MCP tools 3. **Switch** node - Handle different responses 4. **Process** node - Format data for your needs ## 📁 Project Structure ``` airtable-mcp/ ├── src/ │ ├── airtable-client-wrapper.ts # Airtable API client │ ├── tool-handler.ts # MCP tool definitions │ └── version.ts # Version information ├── index.ts # Simple info server ├── index-http.ts # Main HTTP server ├── test-http-server.js # Test suite ├── render.yaml # Render deployment config ├── package.json # Dependencies and scripts ├── README.md # Comprehensive documentation ├── QUICK_START.md # 5-minute setup guide └── DEPLOYMENT.md # Deployment instructions ``` ## 🔑 Key Features ### Authentication - **Header-based**: Pass credentials via HTTP headers - **Per-request**: Fresh client creation for each request - **Secure**: No credential storage on server ### Response Format - **Streaming**: Real-time data delivery - **Structured**: Consistent JSON response format - **Error Handling**: Comprehensive error messages ### Deployment - **Render Ready**: Pre-configured for Render deployment - **Docker Support**: Containerized deployment option - **Environment Variables**: Flexible configuration ## 🧪 Testing ### Built-in Test Suite ```bash npm test # Runs comprehensive HTTP tests ``` ### Manual Testing ```bash # Test individual endpoints 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 '{"method":"tools/list","params":{}}' ``` ## 🚀 Deployment Options ### 1. Render (Recommended) - Free tier available - Automatic GitHub integration - Pre-configured build commands ### 2. Docker - Containerized deployment - Easy scaling - Platform agnostic ### 3. Other Platforms - Railway, Heroku, DigitalOcean - Custom VPS deployment - Kubernetes orchestration ## 🔒 Security Features - **CORS Configuration** - Restricted to trusted domains - **Helmet Security** - Security headers enabled - **Input Validation** - All inputs validated - **Error Handling** - Secure error messages - **No Credential Storage** - Credentials passed per request ## 📊 Performance - **Lightweight** - Minimal dependencies - **Fast** - Optimized TypeScript compilation - **Scalable** - Stateless design - **Efficient** - Connection pooling ready ## 🎯 Use Cases ### AI Applications - **Claude Desktop** - Direct MCP integration - **Custom AI Tools** - Standardized Airtable access - **Chatbots** - Data retrieval and manipulation ### Automation - **n8n Workflows** - HTTP-based integration - **Zapier** - Webhook integration - **Custom Scripts** - RESTful API access ### Data Operations - **Bulk Operations** - Batch record management - **Data Migration** - Automated data transfer - **Reporting** - Automated data collection ## 🔄 Next Steps ### Immediate 1. **Test locally** with your Airtable credentials 2. **Deploy to Render** for production use 3. **Integrate with n8n** workflows ### Future Enhancements 1. **Add more tools** (webhooks, automation) 2. **Implement caching** for performance 3. **Add monitoring** and logging 4. **Create UI dashboard** for management ## 🤝 Contributing This project follows the same contribution pattern as your other MCP servers: 1. Fork the repository 2. Create feature branch 3. Make changes 4. Submit pull request ## 📞 Support - **Documentation**: Comprehensive guides included - **Examples**: Working code examples - **Testing**: Built-in test suite - **Deployment**: Step-by-step guides --- ## 🎉 Success! Your Airtable MCP server is now ready and follows the exact same pattern as your existing MCP servers. It provides: ✅ **16 powerful tools** for Airtable operations ✅ **HTTP-based MCP protocol** for n8n integration ✅ **TypeScript implementation** with full type safety ✅ **Render deployment** ready to go ✅ **Comprehensive documentation** and examples ✅ **Built-in testing** and validation **Ready to deploy and integrate with n8n!** 🚀

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/jjwjr94/airtable-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server