-
Notifications
You must be signed in to change notification settings - Fork 326
Expand file tree
/
Copy path+page.markdoc
More file actions
133 lines (94 loc) · 3.28 KB
/
+page.markdoc
File metadata and controls
133 lines (94 loc) · 3.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
---
layout: article
title: OpenCode
description: Learn how you can add the Appwrite MCP servers to OpenCode to interact with both the Appwrite API and documentation.
---
{% section #quick-start-prompts step=1 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-2 step=2 title="Add MCP servers" %}
Connect Appwrite MCP servers to OpenCode 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" %}
[Node.js](https://nodejs.org/en/download) and npm must be installed on your system.
{% /tabsitem %}
{% /tabs %}
Use the following configuration in your `opencode.json` file to use the Appwrite MCP servers.
{% tabs %}
{% tabsitem #api-only title="API server" %}
```json
{
"$schema": "<https://opencode.ai/config.json>",
"mcp": {
"appwrite": {
"type": "local",
"command": [
"uvx",
"mcp-server-appwrite"
],
"enabled": true,
"environment": {
"APPWRITE_PROJECT_ID": "your-project-id",
"APPWRITE_API_KEY": "your-api-key",
"APPWRITE_ENDPOINT": "https://<REGION>.cloud.appwrite.io/v1"
}
}
}
}
```
**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" %}
```json
{
"$schema": "<https://opencode.ai/config.json>",
"mcp": {
"appwrite-docs": {
"type": "remote",
"enabled": true,
"url": "<https://mcp-for-docs.appwrite.io>"
}
}
}
```
{% /tabsitem %}
{% /tabs %}
{% /section %}
{% section #step-3 step=3 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 %}

{% /section %}