mcp-server-appwrite 0.1.2__py3-none-any.whl → 0.1.3__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- mcp_server_appwrite/server.py +50 -8
- {mcp_server_appwrite-0.1.2.dist-info → mcp_server_appwrite-0.1.3.dist-info}/METADATA +18 -6
- {mcp_server_appwrite-0.1.2.dist-info → mcp_server_appwrite-0.1.3.dist-info}/RECORD +6 -6
- {mcp_server_appwrite-0.1.2.dist-info → mcp_server_appwrite-0.1.3.dist-info}/WHEEL +0 -0
- {mcp_server_appwrite-0.1.2.dist-info → mcp_server_appwrite-0.1.3.dist-info}/entry_points.txt +0 -0
- {mcp_server_appwrite-0.1.2.dist-info → mcp_server_appwrite-0.1.3.dist-info}/licenses/LICENSE +0 -0
mcp_server_appwrite/server.py
CHANGED
@@ -1,5 +1,8 @@
|
|
1
|
+
from __future__ import annotations
|
2
|
+
from typing import List
|
1
3
|
import asyncio
|
2
4
|
import os
|
5
|
+
import argparse
|
3
6
|
import mcp.server.stdio
|
4
7
|
import mcp.types as types
|
5
8
|
from mcp.server import NotificationOptions, Server
|
@@ -19,6 +22,19 @@ from appwrite.exception import AppwriteException
|
|
19
22
|
from .tool_manager import ToolManager
|
20
23
|
from .service import Service
|
21
24
|
|
25
|
+
def parse_args():
|
26
|
+
parser = argparse.ArgumentParser(description='Appwrite MCP Server')
|
27
|
+
parser.add_argument('--databases', action='store_true', help='Enable Databases service')
|
28
|
+
parser.add_argument('--users', action='store_true', help='Enable Users service')
|
29
|
+
parser.add_argument('--teams', action='store_true', help='Enable Teams service')
|
30
|
+
parser.add_argument('--storage', action='store_true', help='Enable Storage service')
|
31
|
+
parser.add_argument('--functions', action='store_true', help='Enable Functions service')
|
32
|
+
parser.add_argument('--messaging', action='store_true', help='Enable Messaging service')
|
33
|
+
parser.add_argument('--locale', action='store_true', help='Enable Locale service')
|
34
|
+
parser.add_argument('--avatars', action='store_true', help='Enable Avatars service')
|
35
|
+
parser.add_argument('--all', action='store_true', help='Enable all services')
|
36
|
+
return parser.parse_args()
|
37
|
+
|
22
38
|
# Load environment variables from .env file
|
23
39
|
load_dotenv()
|
24
40
|
|
@@ -36,14 +52,37 @@ client.set_endpoint(endpoint)
|
|
36
52
|
client.set_project(project_id)
|
37
53
|
client.set_key(api_key)
|
38
54
|
|
39
|
-
# Initialize tools manager
|
55
|
+
# Initialize tools manager
|
40
56
|
tools_manager = ToolManager()
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
57
|
+
|
58
|
+
def register_services(args):
|
59
|
+
# If --all is specified, enable all services
|
60
|
+
if args.all:
|
61
|
+
args.databases = args.users = args.teams = args.storage = True
|
62
|
+
args.functions = args.messaging = args.locale = args.avatars = True
|
63
|
+
|
64
|
+
# Register services based on CLI arguments
|
65
|
+
if args.databases:
|
66
|
+
tools_manager.register_service(Service(Databases(client), "databases"))
|
67
|
+
if args.users:
|
68
|
+
tools_manager.register_service(Service(Users(client), "users"))
|
69
|
+
if args.teams:
|
70
|
+
tools_manager.register_service(Service(Teams(client), "teams"))
|
71
|
+
if args.storage:
|
72
|
+
tools_manager.register_service(Service(Storage(client), "storage"))
|
73
|
+
if args.functions:
|
74
|
+
tools_manager.register_service(Service(Functions(client), "functions"))
|
75
|
+
if args.messaging:
|
76
|
+
tools_manager.register_service(Service(Messaging(client), "messaging"))
|
77
|
+
if args.locale:
|
78
|
+
tools_manager.register_service(Service(Locale(client), "locale"))
|
79
|
+
if args.avatars:
|
80
|
+
tools_manager.register_service(Service(Avatars(client), "avatars"))
|
81
|
+
|
82
|
+
# If no services were specified, enable databases by default
|
83
|
+
if not any([args.databases, args.users, args.teams, args.storage,
|
84
|
+
args.functions, args.messaging, args.locale, args.avatars]):
|
85
|
+
tools_manager.register_service(Service(Databases(client), "databases"))
|
47
86
|
|
48
87
|
async def serve() -> Server:
|
49
88
|
server = Server("Appwrite MCP Server")
|
@@ -76,6 +115,9 @@ async def serve() -> Server:
|
|
76
115
|
return server
|
77
116
|
|
78
117
|
async def _run():
|
118
|
+
args = parse_args()
|
119
|
+
register_services(args)
|
120
|
+
|
79
121
|
async with mcp.server.stdio.stdio_server() as (read_stream, write_stream):
|
80
122
|
server = await serve()
|
81
123
|
await server.run(
|
@@ -83,7 +125,7 @@ async def _run():
|
|
83
125
|
write_stream,
|
84
126
|
InitializationOptions(
|
85
127
|
server_name="appwrite",
|
86
|
-
server_version="0.1.
|
128
|
+
server_version="0.1.3",
|
87
129
|
capabilities=server.get_capabilities(
|
88
130
|
notification_options=NotificationOptions(),
|
89
131
|
experimental_capabilities={},
|
@@ -1,20 +1,32 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: mcp-server-appwrite
|
3
|
-
Version: 0.1.
|
3
|
+
Version: 0.1.3
|
4
4
|
Summary: MCP (Model Context Protocol) server for Appwrite
|
5
5
|
License-File: LICENSE
|
6
6
|
Requires-Python: >=3.12
|
7
|
-
Requires-Dist: appwrite>=
|
7
|
+
Requires-Dist: appwrite>=9.0.2
|
8
8
|
Requires-Dist: mcp[cli]>=1.3.0
|
9
9
|
Description-Content-Type: text/markdown
|
10
10
|
|
11
11
|
# Appwrite MCP server
|
12
12
|
|
13
|
+
<!-- Cover image will go here once available -->
|
14
|
+
|
13
15
|
## Overview
|
14
16
|
|
15
17
|
A Model Context Protocol server for interacting with Appwrite's API. This server provides tools to manage databases, users, functions, teams, and more within your Appwrite project.
|
16
18
|
|
17
|
-
|
19
|
+
## Quick Links
|
20
|
+
- [Configuration](#configuration)
|
21
|
+
- [Installation](#installation)
|
22
|
+
- IDE Integration:
|
23
|
+
- [Claude Desktop](#usage-with-claude-desktop)
|
24
|
+
- [Zed](#usage-with-zed)
|
25
|
+
- [Cursor](#usage-with-cursor)
|
26
|
+
- [Local Development](#local-development)
|
27
|
+
- [Debugging](#debugging)
|
28
|
+
|
29
|
+
Currently, the server supports the following tools:
|
18
30
|
|
19
31
|
- [x] Databases
|
20
32
|
- [x] Users
|
@@ -23,7 +35,7 @@ Currently the server supports the following tools:
|
|
23
35
|
|
24
36
|
## Configuration
|
25
37
|
|
26
|
-
Create a `.env` file in the directory you're
|
38
|
+
Create a `.env` file in the directory you're running the server from:
|
27
39
|
|
28
40
|
```env
|
29
41
|
APPWRITE_API_KEY=your-api-key
|
@@ -36,7 +48,7 @@ APPWRITE_ENDPOINT=your-endpoint # Optional, defaults to https://cloud.appwrite.
|
|
36
48
|
|
37
49
|
### Using uv (recommended)
|
38
50
|
When using [`uv`](https://docs.astral.sh/uv/) no specific installation is needed. We will
|
39
|
-
use [`uvx`](https://docs.astral.sh/uv/guides/tools/) to directly run *mcp-server-
|
51
|
+
use [`uvx`](https://docs.astral.sh/uv/guides/tools/) to directly run *mcp-server-appwrite*.
|
40
52
|
|
41
53
|
```bash
|
42
54
|
uvx run mcp-server-appwrite
|
@@ -158,4 +170,4 @@ This MCP server is licensed under the MIT License. This means you are free to us
|
|
158
170
|
- https://github.com/punkpeye/awesome-mcp-servers
|
159
171
|
- https://portkey.ai/mcp-servers
|
160
172
|
- https://www.claudemcp.com/servers
|
161
|
-
- Add support for SSE server
|
173
|
+
- Add support for SSE server
|
@@ -1,10 +1,10 @@
|
|
1
1
|
mcp_server_appwrite/__init__.py,sha256=Od9oaUg_ckgJ4jIGa2HijocyauWDPjIC7cBRiV0P4s8,214
|
2
2
|
mcp_server_appwrite/__main__.py,sha256=bdaX6xMmFugzSR2QMdXJqanRx_Jh25jACJDqjE9cKEc,75
|
3
|
-
mcp_server_appwrite/server.py,sha256=
|
3
|
+
mcp_server_appwrite/server.py,sha256=J_Ze0DiYYmL1wbHi4Z4LK7UTYhVemBij6O_j6zPvMCg,5498
|
4
4
|
mcp_server_appwrite/service.py,sha256=WwKoh9o7W7ZOmhY0yg6k4R2cghQRe-yMTNbFtB6TFT8,2895
|
5
5
|
mcp_server_appwrite/tool_manager.py,sha256=AfRjLyMpplYjF2VJna7frXDiDUZKRN8WQu9R8j3dxPc,718
|
6
|
-
mcp_server_appwrite-0.1.
|
7
|
-
mcp_server_appwrite-0.1.
|
8
|
-
mcp_server_appwrite-0.1.
|
9
|
-
mcp_server_appwrite-0.1.
|
10
|
-
mcp_server_appwrite-0.1.
|
6
|
+
mcp_server_appwrite-0.1.3.dist-info/METADATA,sha256=CPQt1rKcgsA_0h-l-rUl6O34HvkU1HZuKqYGVPJfCzc,4297
|
7
|
+
mcp_server_appwrite-0.1.3.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
8
|
+
mcp_server_appwrite-0.1.3.dist-info/entry_points.txt,sha256=-FBKUOp-Qmo9FldmiT3JUyF7djSeo8lLhxljOosuHkQ,74
|
9
|
+
mcp_server_appwrite-0.1.3.dist-info/licenses/LICENSE,sha256=PXzk1HbuQMAkLdHzwnBLTBIHFmgDZM0Ez2lw2gX2UQs,1096
|
10
|
+
mcp_server_appwrite-0.1.3.dist-info/RECORD,,
|
File without changes
|
{mcp_server_appwrite-0.1.2.dist-info → mcp_server_appwrite-0.1.3.dist-info}/entry_points.txt
RENAMED
File without changes
|
{mcp_server_appwrite-0.1.2.dist-info → mcp_server_appwrite-0.1.3.dist-info}/licenses/LICENSE
RENAMED
File without changes
|