Claude Code is at its best when it is building working software, not prototypes. You describe a feature, it edits files, runs commands, and iterates until the app actually behaves the way you asked for. That loop holds up well for the frontend. It falls apart the moment your app needs to remember anything: a user, a session, a saved note, an uploaded file.
That is the gap a backend fills, and it is the part most Claude Code tutorials skip. It is also the part that matters most for security. LLMs are now capable of probing and exploiting software on their own, which means a hand-rolled backend written once and forgotten is a liability. Your app needs a backend that is actively maintained, with auth, permissions, and data access handled by a product that gets patched as new classes of attack emerge, rather than by custom code that no one is paid to keep current.
This guide walks through that setup end to end with Appwrite: creating a project, issuing an API key for the MCP server, installing the Appwrite plugin for Claude Code, and then letting your agent wire up authentication, databases, and storage on top of a backend that is built and maintained for production.
A reliable backend for your apps
Appwrite is an open-source, all-in-one development platform that gives your app its backend infrastructure and web hosting from a single place. One project ties together Auth, Databases, Storage, Functions, Realtime, Messaging, and Hosting, so you stop wiring separate services into every new app. It runs on Appwrite Cloud or self-hosted, works with any framework, and fits cleanly into a Claude Code workflow where the agent handles the glue.
What you will set up
By the end of this guide, your Claude Code session will be connected to:
- An Appwrite project that holds your users, data, and files.
- The Appwrite API MCP server, which lets Claude Code create and manage resources in that project directly from a prompt.
- The Appwrite Docs MCP server, which gives the agent live access to Appwrite's current documentation instead of whatever it was trained on.
- Eleven agent skills covering the Appwrite CLI and every major SDK, loaded on demand when Claude Code is writing backend code.
The Claude Code plugin bundles all of the above into a single install. The detailed install reference lives in the Claude Code plugin docs; this post is the end-to-end walkthrough.
Prerequisites
- An Appwrite Cloud account or a self-hosted Appwrite instance.
- Claude Code installed and working in your terminal.
- A project you want to give a backend to. It does not need to be an Appwrite project yet.
Step 1: Create an Appwrite project
Head to the Appwrite Console and create a new project. Give it a name that matches the app you are building, pick the region closest to your users, and open the project.
From the project's overview page, grab two values you will need in a moment:
- Project ID: visible in the URL and on the overview page.
- API endpoint: shown as API endpoint on the overview page. For Cloud, it looks like
https://<region>.cloud.appwrite.io/v1.
Keep that tab open. The next step happens in the same project.
Step 2: Create an API key for the MCP server
The Appwrite API MCP server authenticates to your project with a server-side API key. This is the credential that lets Claude Code read, write, and manage resources on your behalf, so it is worth setting up carefully.
In the Console, go to Overview → Integrations → API keys and click Create API key.
Fill in the dialog:
| Field | Value |
Name | Any name you can recognise later. Claude Code MCP is a reasonable default. |
Expiration date | Set a short expiration date. Avoid Never; a key that cannot expire is a key that eventually leaks and stays dangerous. Pick the shortest window that gets you through your current work and rotate the key when it ends. |
Scopes | Grant only the scopes Claude Code actually needs for the task in front of you. If you are setting up authentication, that is the relevant scopes under Auth. If you are building a database schema, that is the relevant scopes under Database. Start minimal and add more later when a specific task requires it. Do not select all scopes. |
Click Create. On the key's page, reveal the API secret and copy it. Treat the secret like any other production credential: do not paste it into a chat, a public repo, or a screenshot.
You now have the three values the MCP server needs: endpoint, project ID, and API key.
Build fast, scale faster
Backend infrastructure and web hosting built for developers who ship.
Start for free
Open source
Support for over 13 SDKs
Managed cloud solution
Step 3: Install the Appwrite plugin for Claude Code
The plugin ships the Appwrite API MCP server, the Appwrite Docs MCP server, and the agent skills as one install. Run these two commands in your terminal:
claude plugins marketplace add appwrite/claude-plugin
claude plugins install appwrite@appwrite
Then start Claude Code and configure the plugin from inside the session:
- Run
/plugins. - Open the Installed tab.
- Select Appwrite.
- Choose Configure options.
- Enter the endpoint, project ID, and API key you collected in the previous step.
- Run
/reload-pluginsto apply the configuration to the current session.
After the reload, run /mcp to confirm that appwrite-api and appwrite-docs are both listed. If either is missing, the plugin docs cover the manual MCP setup as a fallback.
What your agent can build now
With the MCP servers and skills loaded, Claude Code has enough context to set up the common backend building blocks for you. The rest of this post walks through the ones most apps need.
Set up authentication
Authentication is usually the first thing an app built with Claude Code needs once it has a backend. Appwrite's Auth service handles sign-up, sign-in, sessions, OAuth, magic URLs, and password recovery.
A prompt like this is usually enough to get started:
Add email and password authentication to this app using Appwrite.
Use the TypeScript SDK on the client. Create a sign-up page, a sign-in
page, and a protected /dashboard route that redirects to sign-in when
there is no active session.
Claude Code will pull the relevant skill (TypeScript in this case), use the Docs MCP server to check the latest SDK patterns, and write the wiring directly into your project. If you also want OAuth, name the provider in the prompt like Add Google OAuth sign-in and the agent will walk through the provider setup in the Console for you.
For admin-side operations (listing users, creating users from a seed script, disabling accounts), the API MCP server lets the agent call the Users API directly without your writing a single cURL command. A prompt like Create a test user with email test@demo.test will create the user in your project in place.
Create and query databases
The TablesDB service is where the rest of the app's state lives. You describe the shape of the data you want, and Claude Code can use the API MCP server to create the database, tables, and columns in your project without you touching the Console.
A prompt like:
Create a notes database in my Appwrite project. Add a `notes` table
with columns: title (text, required), content (text, required),
color (text, optional), and userId (text, required). Enable row
security so each note is scoped to its owner.
Results in the agent calling the API MCP server to:
- Create the database.
- Create the
notestable. - Add each column with the correct type.
- Turn on row-level security on the table.
Once the schema exists, you can keep going in the same session: Write a function on the dashboard page that lists the current user's notes and lets them create a new one. The agent will pick the right SDK skill, use the Docs MCP server to confirm the current query syntax, and add the client code.
Upload and serve files
For attachments and any user-generated media, the Storage service gives you buckets with their own permissions and file-level rules. The agent can create a bucket and wire up uploads in one pass:
Create a storage bucket called `avatars` in my project with a 2MB file
size limit and permissions that let users upload their own avatar.
Then update the profile page to upload the selected file to that
bucket and display it.
The API MCP server handles the bucket creation; the TypeScript skill handles the client-side upload code.
Run serverless functions
When a task needs to run on a trusted server (webhooks, scheduled jobs, anything that should not run in the browser), Appwrite Functions gives you a serverless runtime with the same identity and permissions model as the rest of the project.
Claude Code can scaffold a function from a prompt, deploy it with the Appwrite CLI skill, and hook it up to the event you care about:
Create an Appwrite Function in Node.js that runs every time a new user
signs up and sends them a welcome email via Resend. Use an environment
variable for the Resend API key.
The CLI skill knows the current appwrite.json layout and the appwrite push functions flow, so the deploy step works the first time more often than not.
A workflow that holds up
The pattern that works best once the setup is done is to stop thinking about the backend as a separate project. You describe behavior like users can save notes, admins can impersonate users, or uploads are scoped to the owner, and the agent makes the changes in both places: Appwrite for the data and auth, your codebase for the UI and glue.
The MCP servers keep the two in sync. The skills keep the SDK code current. The API key keeps the agent scoped to exactly the project you pointed it at.






