🚀 Appwrite MCP Server
Transform Claude into your intelligent Appwrite management assistant
88 powerful tools • Schema validation • Bulk operations • Production-ready
A comprehensive Model Context Protocol (MCP) server that supercharges Claude with native Appwrite integration. Unlike the official implementation, this version includes advanced features like bulk operations, automatic schema validation, data quality checks, and comprehensive error handling.
🚀 Features
Core Appwrite Management:
- Complete database and collection operations
- Document CRUD with full query support
- User management and authentication
- Storage buckets and file operations
- Serverless function management
- Team and permission management
🧠 Intelligent Database Assistant:
- Auto-detect schemas from sample data
- Data quality analysis and recommendations
- Duplicate detection with similarity matching
- Index optimization suggestions
- Schema migrations with safety checks
🔐 Advanced Authentication & Sessions:
- Session management (create, delete, list user sessions)
- Function execution with logging and monitoring
- Health monitoring for all Appwrite services
⚡ Bulk Operations:
- Bulk user management (create, update, delete multiple users)
- Bulk document operations (create, update, delete multiple documents)
- Efficient batch processing with detailed success/error reporting
📦 Quick Start
1️⃣ Installation
# Clone the repository
git clone <repository-url>
cd appwrite-mcp-server
# Install dependencies
npm install
# Build the TypeScript code
npm run build
2️⃣ Configuration
Create a .env file in your current working directory (where you run Claude Code from):
# Copy the example file to your current working directory
cp /path/to/app-write-mcp/.env.example ./.env
Edit your .env file with your Appwrite credentials:
APPWRITE_PROJECT_ID=your-project-id-here
APPWRITE_API_ENDPOINT=https://cloud.appwrite.io/v1
APPWRITE_API_KEY=your-api-key-here
💡 Tip: The MCP server looks for
.envin the directory where Claude Code is running, allowing different configurations for different projects.
3️⃣ Integration Options
Option A: Claude Code (CLI) Integration
# Add the MCP server to Claude Code
claude mcp add appwrite-mcp-server "C:\path\to\your\app-write-mcp\dist\index.js"
# Example with actual path
claude mcp add appwrite-mcp-server "C:\Users\moh12\app-write-mcp\dist\index.js"
Option B: Cursor IDE Integration
-
Open Cursor Settings (Ctrl/Cmd + ,)
-
Search for "MCP" in the settings search bar
-
Add MCP Server Configuration:
{ "mcp.servers": { "appwrite-mcp-server": { "command": "node", "args": ["C:\\path\\to\\your\\app-write-mcp\\dist\\index.js"], "env": { "NODE_ENV": "production" } } } } -
Alternative: Use Cursor's settings.json file:
- Open Command Palette (
Ctrl/Cmd + Shift + P) - Type "Preferences: Open Settings (JSON)"
- Add the MCP configuration above
- Open Command Palette (
-
Restart Cursor to load the MCP server
Option C: Continue.dev Integration
-
Open your Continue configuration file (
~/.continue/config.json) -
Add the MCP server to your configuration:
{ "mcpServers": [ { "name": "appwrite-mcp-server", "command": "node", "args": ["C:\\path\\to\\your\\app-write-mcp\\dist\\index.js"] } ] } -
Restart your IDE to apply the changes
4️⃣ Verification
Once integrated, you should be able to use commands like:
- "List my Appwrite databases"
- "Create a new user with email test@example.com"
- "Show me all collections in my database"
🛠️ Available Tools (88 Total)
🗄️ Database Operations (3 tools)
| Tool | Description |
|---|---|
create_database |
Create a new database |
list_databases |
List all databases in your project |
delete_database |
Delete a database |
📁 Collection Operations (3 tools)
| Tool | Description |
|---|---|
create_collection |
Create a new collection in a database |
list_collections |
List all collections in a database |
delete_collection |
Delete a collection from a database |
🏷️ Attribute Management (7 tools)
| Tool | Description |
|---|---|
create_string_attribute |
Create a string attribute in a collection |
create_integer_attribute |
Create an integer attribute in a collection |
create_boolean_attribute |
Create a boolean attribute in a collection |
create_email_attribute |
Create an email attribute in a collection |
create_datetime_attribute |
Create a datetime attribute in a collection |
list_attributes |
List all attributes in a collection |
delete_attribute |
Delete an attribute from a collection |
📊 Index Management (3 tools)
| Tool | Description |
|---|---|
create_index |
Create an index in a collection (key, fulltext, unique) |
list_indexes |
List all indexes in a collection |
delete_index |
Delete an index from a collection |
📄 Document Operations (5 tools)
| Tool | Description |
|---|---|
create_document |
Create a new document in a collection ✨ with schema validation |
get_document |
Get a document by ID |
list_documents |
List documents in a collection with optional queries |
update_document |
Update a document |
delete_document |
Delete a document |
👥 User Management (7 tools)
| Tool | Description |
|---|---|
create_user |
Create a new user |
list_users |
List all users |
get_user |
Get a user by ID |
update_user_email |
Update user email |
update_user_name |
Update user name |
update_user_password |
Update user password |
delete_user |
Delete a user |
🗂️ Storage Operations (6 tools)
| Tool | Description |
|---|---|
create_bucket |
Create a storage bucket |
list_buckets |
List all storage buckets |
get_bucket |
Get a bucket by ID |
update_bucket |
Update a storage bucket |
delete_bucket |
Delete a storage bucket |
list_files |
List files in a storage bucket |
⚡ Function Management (5 tools)
| Tool | Description |
|---|---|
create_function |
Create a new serverless function |
list_functions |
List all functions |
get_function |
Get a function by ID |
update_function |
Update a function |
delete_function |
Delete a function |
👨👩👧👦 Team Management (5 tools)
| Tool | Description |
|---|---|
create_team |
Create a new team |
list_teams |
List all teams |
get_team |
Get a team by ID |
update_team |
Update a team |
delete_team |
Delete a team |
🌟 Exclusive Advanced Features
🧠 Smart Schema Operations (4 tools)
| Tool | Description |
|---|---|
auto_detect_schema |
✨ Analyze sample data and automatically create collection schema |
suggest_indexes |
✨ Recommend optimal indexes based on collection usage patterns |
validate_document |
✨ Check document data against collection schema before creation |
schema_migration |
✨ Automatically migrate collection schema with data preservation |
📊 Data Analysis & Insights (4 tools)
| Tool | Description |
|---|---|
analyze_collection |
✨ Get comprehensive data insights and patterns from collections |
detect_duplicates |
✨ Find potential duplicate records with similarity scoring |
data_quality_check |
✨ Analyze data quality (completeness, validity, consistency) |
usage_stats |
✨ Get usage statistics and access patterns for collections |
🔐 Authentication & Sessions (3 tools)
| Tool | Description |
|---|---|
create_session |
✨ Create a new user session with email and password |
delete_session |
✨ Delete a user session |
list_sessions |
✨ List all sessions for a user |
⚡ Function Execution (3 tools)
| Tool | Description |
|---|---|
execute_function |
✨ Execute a function with optional data |
list_executions |
✨ List function executions with logs |
get_execution |
✨ Get details of a specific function execution |
🏥 Health Monitoring (3 tools)
| Tool | Description |
|---|---|
get_health |
✨ Get overall health status of Appwrite services |
get_health_db |
✨ Get database health status |
get_health_storage |
✨ Get storage health status |
⚡ Bulk Operations (6 tools)
| Tool | Description |
|---|---|
bulk_create_users |
✨ Create multiple users at once |
bulk_update_users |
✨ Update multiple users at once |
bulk_delete_users |
✨ Delete multiple users at once |
bulk_create_documents |
✨ Create multiple documents at once |
bulk_update_documents |
✨ Update multiple documents at once |
bulk_delete_documents |
✨ Delete multiple documents at once |
✨ Exclusive features not available in the official Appwrite MCP implementation
⚙️ Configuration Guide
🔑 Getting Appwrite Credentials
- 🆔 Project ID: Found in your Appwrite console under Settings > General
- 🌐 API Endpoint:
- Appwrite Cloud:
https://cloud.appwrite.io/v1 - Self-hosted:
https://your-domain.com/v1
- Appwrite Cloud:
- 🔐 API Key: Create a new API key in your Appwrite console under Settings > API Keys
- ✅ Enable all scopes for full functionality
- ⚠️ Required scopes:
databases.read,databases.write,users.read,users.write,functions.read,functions.write,storage.read,storage.write
🎯 VS Official Implementation
| Feature | Our Implementation | Official Appwrite MCP |
|---|---|---|
| Tools Available | 🟢 88 tools | 🟡 ~50 tools |
| Bulk Operations | 🟢 Full support | 🔴 Not available |
| Schema Validation | 🟢 Automatic | 🔴 Manual only |
| Error Handling | 🟢 Comprehensive | 🟡 Basic |
| Language | 🟡 TypeScript/Node.js | 🟢 Python |
| Memory Usage | 🟡 Higher (monolithic) | 🟢 Lower (modular) |
| Deployment | 🟢 Single executable | 🟡 Multiple dependencies |
🎯 Usage Examples
Once integrated, you can use natural language commands with Claude to interact with Appwrite:
🗄️ Database & Collection Management
✨ "Create a new database called 'ecommerce'"
✨ "List all my databases"
✨ "Create a collection called 'products' in the ecommerce database"
✨ "Show me all collections in the ecommerce database"
✨ "Delete the old 'test' database"
🏷️ Schema & Attributes
✨ "Add a string attribute called 'name' to the products collection with max size 255"
✨ "Create a boolean attribute 'in_stock' in the products collection"
✨ "List all attributes in the products collection"
✨ "Create a unique index on the 'sku' attribute"
✨ "Add an email attribute for 'contact_email'"
📄 Document Operations
✨ "Create a new product document with name 'iPhone 15' and price 999"
✨ "List all documents in the products collection"
✨ "Update document xyz123's price to 899"
✨ "Get document abc456 from the products collection"
✨ "Delete all out-of-stock products"
👥 User & Authentication
✨ "Create a new user with email john@example.com and password SecurePass123"
✨ "List all users in the project"
✨ "Update user xyz123's name to 'John Doe'"
✨ "Create a session for user john@example.com"
✨ "Bulk create 10 test users for demo purposes"
⚡ Advanced Features (Exclusive)
🚀 "Analyze this sample data and create a collection schema automatically"
🚀 "Suggest optimal indexes for my users collection based on usage"
🚀 "Validate this document data before creating it"
🚀 "Find duplicate records in my customers collection"
🚀 "Check the data quality of my orders collection"
🚀 "Bulk create 100 user accounts from this CSV data"
🚀 "Execute the 'sendWelcomeEmail' function with user data"
🚀 "Show me the health status of all Appwrite services"
🎬 Real-World Scenarios
E-commerce Setup:
1. "Create an ecommerce database"
2. "Auto-detect schema from this product sample data"
3. "Bulk import 500 products from my inventory"
4. "Set up user authentication for customers"
5. "Create indexes for search optimization"
Content Management:
1. "Create a blog database with posts and comments collections"
2. "Validate my blog post structure before saving"
3. "Find duplicate content across my posts"
4. "Analyze user engagement patterns"
🔧 Development
# Build TypeScript to JavaScript
npm run build
# Watch mode for development
npm run dev
# Run the built server
npm start
🐛 Troubleshooting
Common Issues & Solutions
| Issue | Solution |
|---|---|
| ❌ Configuration not found | Make sure .env file exists in your working directory |
| ❌ API Key issues | Ensure your API key has all required scopes enabled |
| ❌ Connection failed | Verify your API endpoint is correct (check for typos) |
| ❌ Tools not loading | Restart your IDE after adding the MCP server |
| ❌ Permission denied | Check that your API key has databases.write, users.write permissions |
| ❌ Schema validation errors | Use list_attributes to check collection schema before creating documents |
🤝 Contributing
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Commit your changes:
git commit -m 'Add amazing feature' - Push to the branch:
git push origin feature/amazing-feature - Open a Pull Request
📄 License
MIT License - see LICENSE file for details
⭐ Star this repo if it helped you!
Built with ❤️ for the Appwrite and Claude communities