diff --git a/README.md b/README.md
index 5a4b9e2..b5dea96 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,19 @@
-# Appwrite MCP Server
+# ๐ Appwrite MCP Server
-A comprehensive Model Context Protocol (MCP) server that transforms Claude Code into an intelligent Appwrite management assistant.
+
+
+
+
+
+
+**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
@@ -29,233 +42,468 @@ A comprehensive Model Context Protocol (MCP) server that transforms Claude Code
- **Bulk document operations** (create, update, delete multiple documents)
- **Efficient batch processing** with detailed success/error reporting
-## Installation
+## ๐ฆ Quick Start
+
+### 1๏ธโฃ Installation
-1. Clone this repository:
```bash
+# Clone the repository
git clone
cd appwrite-mcp-server
-```
-2. Install dependencies:
-```bash
+# Install dependencies
npm install
-```
-3. Build the TypeScript code:
-```bash
+# Build the TypeScript code
npm run build
```
-4. Configure your Appwrite credentials by creating a `.env` file in your **current working directory** (where you run Claude Code from):
+### 2๏ธโฃ Configuration
+
+Create a `.env` file in your **current working directory** (where you run Claude Code from):
```bash
# Copy the example file to your current working directory
cp /path/to/app-write-mcp/.env.example ./.env
```
-5. Edit the `.env` file in your current directory with your Appwrite project details:
-```bash
-APPWRITE_PROJECT_ID=your-project-id
+Edit your `.env` file with your Appwrite credentials:
+
+```env
+APPWRITE_PROJECT_ID=your-project-id-here
APPWRITE_API_ENDPOINT=https://cloud.appwrite.io/v1
-APPWRITE_API_KEY=your-api-key
+APPWRITE_API_KEY=your-api-key-here
```
-**Important:** The MCP server looks for `.env` in the directory where Claude Code is currently running, not in the repository directory. This allows you to use different configurations for different projects without modifying the repository.
+> ๐ก **Tip:** The MCP server looks for `.env` in the directory where Claude Code is running, allowing different configurations for different projects.
-## Adding to Claude Code
+### 3๏ธโฃ Integration Options
+
+#### Option A: Claude Code (CLI) Integration
-1. Add the MCP server to Claude Code:
```bash
+# Add the MCP server to Claude Code
claude mcp add appwrite-mcp-server "C:\path\to\your\app-write-mcp\dist\index.js"
-```
-Replace the path with your actual project location. For example:
-```bash
+# Example with actual path
claude mcp add appwrite-mcp-server "C:\Users\moh12\app-write-mcp\dist\index.js"
```
-3. Restart Claude Code if needed.
+#### Option B: Cursor IDE Integration
-## Available Tools
+1. **Open Cursor Settings** (Ctrl/Cmd + ,)
-### ๐๏ธ Database Operations
+2. **Search for "MCP"** in the settings search bar
-- **create_database**: Create a new database
-- **list_databases**: List all databases in your project
-- **delete_database**: Delete a database
+3. **Add MCP Server Configuration:**
+ ```json
+ {
+ "mcp.servers": {
+ "appwrite-mcp-server": {
+ "command": "node",
+ "args": ["C:\\path\\to\\your\\app-write-mcp\\dist\\index.js"],
+ "env": {
+ "NODE_ENV": "production"
+ }
+ }
+ }
+ }
+ ```
-### ๐ Collection Operations
+4. **Alternative: Use Cursor's settings.json file:**
+ - Open Command Palette (`Ctrl/Cmd + Shift + P`)
+ - Type "Preferences: Open Settings (JSON)"
+ - Add the MCP configuration above
-- **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
+5. **Restart Cursor** to load the MCP server
-### ๐ท๏ธ Attribute Management
+#### Option C: Continue.dev Integration
-- **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
+1. **Open your Continue configuration file** (`~/.continue/config.json`)
-### ๐ Index Management
+2. **Add the MCP server to your configuration:**
+ ```json
+ {
+ "mcpServers": [
+ {
+ "name": "appwrite-mcp-server",
+ "command": "node",
+ "args": ["C:\\path\\to\\your\\app-write-mcp\\dist\\index.js"]
+ }
+ ]
+ }
+ ```
-- **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
+3. **Restart your IDE** to apply the changes
-### ๐ Document Operations
+### 4๏ธโฃ Verification
-- **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
+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"
-### ๐ฅ User Management
+## ๐ ๏ธ Available Tools (88 Total)
-- **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
+
+๐๏ธ Database Operations (3 tools)
-### ๐๏ธ Storage Operations
+| Tool | Description |
+|------|-------------|
+| `create_database` | Create a new database |
+| `list_databases` | List all databases in your project |
+| `delete_database` | Delete a database |
-- **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
+
+๐ Collection Operations (3 tools)
-- **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
+| 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 |
-### ๐จโ๐ฉโ๐งโ๐ฆ 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
+
+๐ท๏ธ Attribute Management (7 tools)
-### ๐ง Smart Schema Operations
+| 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 |
-- **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
+
+
+๐ Index Management (3 tools)
-### ๐ Data Analysis & Insights
+| 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 |
-- **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
+
+๐ Document Operations (5 tools)
-### Getting Appwrite Credentials
+| 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 |
-1. **Project ID**: Found in your Appwrite console under Settings > General
-2. **API Endpoint**:
- - For Appwrite Cloud: `https://cloud.appwrite.io/v1`
- - For self-hosted: `https://your-domain.com/v1`
-3. **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
+
+๐ฅ User Management (7 tools)
-The `appwrite-config.json` file should be in the root directory of this project:
+| 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 |
-```json
-{
- "projectId": "your-project-id-here",
- "apiEndpoint": "https://cloud.appwrite.io/v1",
- "apiKey": "your-api-key-here"
-}
+
+
+
+๐๏ธ 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
+
+1. **๐ Project ID**: Found in your Appwrite console under **Settings > General**
+2. **๐ API Endpoint**:
+ - **Appwrite Cloud**: `https://cloud.appwrite.io/v1`
+ - **Self-hosted**: `https://your-domain.com/v1`
+3. **๐ 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"
```
-## Usage Examples
+
-Once added to Claude Code, you can use natural language to interact with Appwrite:
+
+๐ท๏ธ Schema & Attributes
-**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"
+```
+โจ "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'"
+```
-**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"
+
+๐ Document Operations
-**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"
+```
+โจ "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"
+```
-**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"
+
+๐ฅ User & Authentication
-**Team Management:**
-- "Create a new team called 'Developers'"
-- "List all teams"
-- "Add user john@example.com to the Developers team"
+```
+โจ "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"
+```
-**๐ง 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"
+
+
+โก Advanced Features (Exclusive)
-**๐ 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"
+```
+๐ "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"
+```
-## Development
+
-- `npm run build`: Build TypeScript to JavaScript
-- `npm run dev`: Watch mode for development
-- `npm start`: Run the built server
+### ๐ฌ **Real-World Scenarios**
-## Troubleshooting
+**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"
+```
-1. **Configuration not found**: Make sure `appwrite-config.json` exists in the project root
-2. **API Key issues**: Ensure your API key has the correct permissions for database operations
-3. **Connection issues**: Verify your API endpoint is correct (especially for self-hosted instances)
+**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"
+```
-## License
+---
-MIT
\ No newline at end of file
+## ๐ง Development
+
+```bash
+# 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
+
+1. Fork the repository
+2. Create a feature branch: `git checkout -b feature/amazing-feature`
+3. Commit your changes: `git commit -m 'Add amazing feature'`
+4. Push to the branch: `git push origin feature/amazing-feature`
+5. Open a Pull Request
+
+## ๐ License
+
+MIT License - see [LICENSE](LICENSE) file for details
+
+---
+
+
+
+**โญ Star this repo if it helped you!**
+
+Built with โค๏ธ for the Appwrite and Claude communities
+
+[Report Bug](https://github.com/your-repo/issues) โข [Request Feature](https://github.com/your-repo/issues) โข [Documentation](https://github.com/your-repo/wiki)
+
+
\ No newline at end of file