---
layout: article
title: Codex
description: Learn how to use Codex with Appwrite through the Appwrite plugin, quick start prompts, and MCP servers for AI-assisted development.
---

{% section #install-plugin step=1 title="Install the Appwrite plugin" %}

The fastest way to get started with Appwrite in Codex is to install the **Appwrite plugin** from the Appwrite marketplace. The plugin includes agent skills for the Appwrite CLI and all major SDKs and registers the Appwrite Docs MCP server, giving Codex access to the Appwrite documentation so that it follows the latest and suggested code patterns.

Add the Appwrite marketplace to Codex by running the following command in your terminal:

```bash
codex plugin marketplace add appwrite/codex-plugin
```

Then run `codex` and open the plugins menu to install the Appwrite plugin:

- Run `/plugins` in Codex.
- Select the **Appwrite** plugin from the marketplace listing.
- Confirm the install.

Once installed, the language and deployment skills load automatically based on your task, and the `appwrite-docs` MCP server is registered for documentation lookups.

The Appwrite API MCP server isn't bundled in the plugin: it needs your endpoint, project ID, and API key, and Codex plugins don't currently expose a way to prompt for per-install configuration in the CLI. Add it manually in [Step 3](#step-3).

{% info title="Prefer manual setup?" %}

If you'd rather configure MCP servers individually, skip to [Step 3](#step-3).

{% /info %}

{% /section %}

{% section #quick-start-prompts step=2 title="Quick start prompts" %}

Get started quickly with these pre-built prompts for common Appwrite integrations:

{% cards %}
{% cards_item href="/docs/tooling/ai/quickstart-prompts/nextjs" title="Next.js" icon="icon-nextjs" %}
{% /cards_item %}
{% cards_item href="/docs/tooling/ai/quickstart-prompts/tanstack-start" title="TanStack Start" icon="web-icon-tanstack" %}
{% /cards_item %}
{% /cards %}

{% arrow_link href="/docs/tooling/ai/quickstart-prompts" %}
Browse all quick start prompts
{% /arrow_link %}

{% /section %}

{% section #step-3 step=3 title="Add MCP servers manually" %}

If you installed the Appwrite plugin in [Step 1](#install-plugin), the docs MCP server is already configured and you can skip to [Step 4](#step-4).

Connect Appwrite MCP servers to Codex for deeper integration with the Appwrite API and documentation.

Before you begin, ensure you have the following **pre-requisites** installed on your system:

{% tabs %}
{% tabsitem #api-server-prerequisites title="API server" %}

[uv](https://docs.astral.sh/uv/getting-started/installation/) must be installed on your system.

{% /tabsitem %}

{% tabsitem #docs-server-prerequisites title="Docs server" %}

No additional prerequisites. The docs server runs as a remote HTTP endpoint.

{% /tabsitem %}
{% /tabs %}

Run the following commands in your terminal to add the MCP servers:

{% tabs %}
{% tabsitem #api-only title="API server" %}

```bash
codex mcp add appwrite-api \
  --env APPWRITE_PROJECT_ID=your-project-id \
  --env APPWRITE_API_KEY=your-api-key \
  --env APPWRITE_ENDPOINT=https://<REGION>.cloud.appwrite.io/v1 \
  -- uvx mcp-server-appwrite
```

**Configuration:**

- Replace `your-project-id` with your actual Appwrite project ID
- Replace `your-api-key` with your Appwrite API key
- Replace `<REGION>` with your Appwrite Cloud region (e.g., `nyc`, `fra`)

{% /tabsitem %}

{% tabsitem #docs-only title="Docs server" %}

```bash
codex mcp add appwrite-docs --url https://mcp-for-docs.appwrite.io
```

{% /tabsitem %}
{% /tabs %}

{% /section %}

{% section #step-4 step=4 title="Test the integration" %}

Try out the following example prompts based on the MCP server you have configured:

{% tabs %}
{% tabsitem #test-api title="API server" %}

**Example prompts:**

- `Create a new user in my Appwrite project`
- `List all databases in my project`
- `Show me the collections in my database`
- `Create a new document in my collection`
- `Delete a specific user by ID`

{% /tabsitem %}

{% tabsitem #test-docs title="Docs server" %}

**Example prompts:**

- `How do I set up real-time subscriptions in Appwrite?`
- `Show me how to authenticate users with OAuth`
- `What are the best practices for database queries?`
- `How do I implement file uploads with Appwrite Storage?`
- `Show me an example of using Appwrite Functions`

{% /tabsitem %}

{% /tabs %}

![Codex listing users via the Appwrite API MCP](/images/docs/mcp/codex/test-integration.avif)

{% /section %}
