d0db180121374ecacd1ac5c8048da896d9830488
- Comprehensive Appwrite integration with 50+ tools - Smart schema operations (auto-detect, validate, migrate) - Data analysis and insights capabilities - Full CRUD operations for databases, collections, documents - User management, storage, functions, and teams support - Removed problematic natural language query features - Clean TypeScript implementation with proper error handling 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Appwrite MCP Server
A comprehensive Model Context Protocol (MCP) server that transforms Claude Code into an intelligent Appwrite management assistant.
🚀 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
Installation
- Clone this repository:
git clone <repository-url>
cd appwrite-mcp-server
- Install dependencies:
npm install
- Build the TypeScript code:
npm run build
- Configure your Appwrite credentials:
cp appwrite-config.json.template appwrite-config.json
- Edit
appwrite-config.jsonwith your Appwrite project details:
{
"projectId": "your-project-id",
"apiEndpoint": "https://cloud.appwrite.io/v1",
"apiKey": "your-api-key"
}
Adding to Claude Code
- Add the MCP server to Claude Code:
claude mcp add appwrite-mcp-server
- When prompted, provide the absolute path to the built server:
/absolute/path/to/your/app-write-mcp/dist/index.js
- Restart Claude Code if needed.
Available Tools
🗄️ Database Operations
- create_database: Create a new database
- list_databases: List all databases in your project
- delete_database: Delete a database
📁 Collection Operations
- 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
- 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
- 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
- create_document: Create a new document in a collection
- 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
- 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
- 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
- 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
- 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
🧠 Smart Schema Operations
- 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
- 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
Configuration
Getting Appwrite Credentials
- Project ID: Found in your Appwrite console under Settings > General
- API Endpoint:
- For Appwrite Cloud:
https://cloud.appwrite.io/v1 - For self-hosted:
https://your-domain.com/v1
- For Appwrite Cloud:
- API Key: Create a new API key in your Appwrite console under Settings > API Keys
- Make sure to give it appropriate permissions for databases and collections
Configuration File
The appwrite-config.json file should be in the root directory of this project:
{
"projectId": "your-project-id-here",
"apiEndpoint": "https://cloud.appwrite.io/v1",
"apiKey": "your-api-key-here"
}
Usage Examples
Once added to Claude Code, you can use natural language to interact with Appwrite:
Database & Collection Management:
- "Create a new database called 'blog'"
- "List all my databases"
- "Create a collection called 'posts' in the blog database"
- "Show me all collections in the blog database"
Attribute & Schema Management:
- "Add a string attribute called 'title' to the posts collection with max size 255"
- "Create a boolean attribute 'published' in the posts collection"
- "List all attributes in the posts collection"
- "Create a unique index on the 'slug' attribute"
Document Operations:
- "Create a new document in the posts collection with title 'Hello World'"
- "List all documents in the posts collection"
- "Update document xyz123 in the posts collection"
- "Get document abc456 from the posts collection"
User Management:
- "Create a new user with email john@example.com"
- "List all users in the project"
- "Update user xyz123's name to 'John Doe'"
- "Delete user abc456"
Storage Management:
- "Create a storage bucket called 'images'"
- "List all storage buckets"
- "Show me all files in the images bucket"
Function Management:
- "Create a new function called 'sendEmail' with Node.js runtime"
- "List all functions"
- "Update function abc123's timeout to 300 seconds"
Team Management:
- "Create a new team called 'Developers'"
- "List all teams"
- "Add user john@example.com to the Developers team"
🧠 Smart Schema Operations:
- "Analyze this sample data and create a collection for me"
- "Suggest optimal indexes for my users collection"
- "Validate this document before I create it"
- "Migrate my collection to add these new fields safely"
📊 Data Analysis & Insights:
- "Analyze the health and patterns in my users collection"
- "Find duplicate records in my products collection"
- "Check the data quality of my orders collection"
- "Show me usage statistics for my database"
Development
npm run build: Build TypeScript to JavaScriptnpm run dev: Watch mode for developmentnpm start: Run the built server
Troubleshooting
- Configuration not found: Make sure
appwrite-config.jsonexists in the project root - API Key issues: Ensure your API key has the correct permissions for database operations
- Connection issues: Verify your API endpoint is correct (especially for self-hosted instances)
License
MIT
Description
Languages
JavaScript
96.9%
TypeScript
3.1%