Docs
Skip to content

Self-hosting

MCP server_

Connect LLMs and code-generation tools to your self-hosted Appwrite instance with the local MCP server.

3 min read

Raw

The hosted Appwrite MCP server authenticates against Appwrite Cloud. If you are running a self-hosted Appwrite instance, use the local MCP server instead. It runs on your machine over the stdio transport and connects to your instance with an API key, allowing LLMs and code-generation tools to perform various operations on your Appwrite resources, such as creating users, managing databases, and more, using natural language commands.

Here are some of the key benefits of using the local MCP server:

  • Direct API interaction: Enables LLMs to perform actions directly on your Appwrite project
  • Real-time data access: Allows LLMs to fetch and manipulate live data from your Appwrite instance
  • Simplified workflows: Facilitates complex operations through simple natural language prompts
  • Customizable tools: Offers a range of tools for different Appwrite services, which can be enabled as needed

Pre-requisites

Appwrite API key

Before launching the MCP server, create an API key with the necessary scopes enabled in your Appwrite project.

Appwrite API key
Appwrite API key

Ensure you save the API key along with the project ID and endpoint URL from the Settings page of your project as you'll need them later.

Install uv

Install uv on your system with:

You can verify the installation by running the following command in your terminal:

Bash
uv

Installation

Add the local MCP server to your AI tool's MCP configuration:

JSON
{
"mcpServers": {
"appwrite": {
"command": "uvx",
"args": [
"mcp-server-appwrite"
],
"env": {
"APPWRITE_PROJECT_ID": "your-project-id",
"APPWRITE_API_KEY": "your-api-key",
"APPWRITE_ENDPOINT": "https://your-appwrite-domain/v1"
}
}
}
}

Replace your-project-id and your-api-key with the values from your project, and point APPWRITE_ENDPOINT to your instance's API endpoint.

Command-line arguments

Database tools are enabled by default. In addition you can pass arguments to uvx mcp-server-appwrite [args] to enable other MCP tools for various Appwrite APIs.

ArgumentDescription
--tablesdbEnables the TablesDB API
--usersEnables the Users API
--teamsEnables the Teams API
--storageEnables the Storage API
--functionsEnables the Functions API
--messagingEnables the Messaging API
--localeEnables the Locale API
--avatarsEnables the Avatars API
--databasesEnables the legacy Databases API
--allEnables all Appwrite APIs

Usage

Once configured, your AI assistant will have access to your Appwrite project. You can ask questions like:

Example 1: List users

Run the following prompt in your preferred code editor/LLM after enabling the MCP server:

Plain text
List users in my Appwrite project

Example 2: Search a site

Run the following prompt in your preferred code editor/LLM after enabling the MCP server:

Plain text
Get the details of my portfolio site from Appwrite

Example 3: Create a user

Run the following prompt in your preferred code editor/LLM after enabling the MCP server:

Plain text
Add a user john.doe@example.com to the Appwrite project

Was this page helpful?

Share what worked or what we should fix. Once approved, our agents automatically apply suggested updates to the docs.