OpenCode is an open-source AI coding agent. It helps you write code from your terminal, IDE, or desktop, works with models from more than 75 providers, and reads its settings, including MCP servers, from an opencode.json file.
How does the integration work?
The Appwrite MCP server connects OpenCode to your Appwrite project through the Model Context Protocol. It is a hosted server at https://mcp.appwrite.io/ that uses the HTTP transport and signs you in with OAuth, so there is nothing to install and no API key to create.
Once connected, OpenCode can look up your projects, read and change resources such as users, databases, and tables, and search the Appwrite documentation while it codes. Changes go through a separate write tool that requires confirmation, and each change carries a short reason that appears in your project's Activity tab.
The hosted MCP server authenticates against Appwrite Cloud. If you self-host Appwrite, use the local MCP server instead. It runs on your machine over stdio and connects to your instance with an API key.
How to implement
To connect OpenCode to Appwrite, there are several steps you must complete:
Step 1: Set up your Appwrite project
First, create an account on Appwrite Cloud if you haven't already, and create a project. You don't need an API key: OpenCode asks you to sign in to Appwrite the first time it connects to the server.
Step 2: Add the Appwrite MCP server to OpenCode
Add the Appwrite server to your opencode.json file:
{ "$schema": "https://opencode.ai/config.json", "mcp": { "appwrite": { "type": "remote", "enabled": true, "url": "https://mcp.appwrite.io/" } }}When OpenCode first connects, complete the sign-in flow in your browser to sign in to your Appwrite account and authorize access.
Step 3: Test the integration
Start OpenCode and try prompts like:
Create a new user in my Appwrite projectList all databases in my projectShow me the tables in my databaseHow do I set up real-time subscriptions in Appwrite?
Read more about OpenCode and the Appwrite MCP server
If you would like to learn more about OpenCode and the Appwrite MCP server, we have some resources that you should visit:
