Skip to content

Commit 0da7e3f

Browse files
authored
Merge pull request #33 from appwrite/add-tablesdb-support
2 parents cd595fd + ab9d052 commit 0da7e3f

File tree

5 files changed

+24
-19
lines changed

5 files changed

+24
-19
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ Both the `uv` and `pip` setup processes require certain arguments to enable MCP
8888
8989
| Argument | Description |
9090
| --- | --- |
91-
| `--databases` | Enables the Databases API |
91+
| `--tables-db` | Enables the TablesDB API |
9292
| `--users` | Enables the Users API |
9393
| `--teams` | Enables the Teams API |
9494
| `--storage` | Enables the Storage API |
@@ -98,6 +98,7 @@ Both the `uv` and `pip` setup processes require certain arguments to enable MCP
9898
| `--avatars` | Enables the Avatars API |
9999
| `--sites` | Enables the Sites API |
100100
| `--all` | Enables all Appwrite APIs |
101+
| `--databases` | Enables the Legacy Databases API |
101102

102103
## Usage with Claude Desktop
103104

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
[project]
22
name = "mcp-server-appwrite"
3-
version = "0.2.7"
3+
version = "0.2.8"
44
description = "MCP (Model Context Protocol) server for Appwrite"
55
readme = "README.md"
66
requires-python = ">=3.12"
77
dependencies = [
8-
"appwrite>=11.1.0",
8+
"appwrite>=13.4.1",
99
"docstring-parser>=0.16",
1010
"mcp[cli]>=1.3.0",
1111
]

server.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-09-16/server.schema.json",
33
"name": "io.github.appwrite/mcp-for-api",
44
"description": "MCP (Model Context Protocol) server for Appwrite",
5-
"version": "0.2.7",
5+
"version": "0.2.8",
66
"repository": {
77
"url": "https://github.com/appwrite/mcp-for-api",
88
"source": "github"
99
},
1010
"packages": [
1111
{
12-
"version": "0.2.7",
12+
"version": "0.2.8",
1313
"registryType": "pypi",
1414
"identifier": "mcp-server-appwrite",
1515
"transport": {

src/mcp_server_appwrite/server.py

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
from dotenv import load_dotenv
1111
from appwrite.client import Client
1212
from appwrite.services.databases import Databases
13+
from appwrite.services.tables_db import TablesDB
1314
from appwrite.services.users import Users
1415
from appwrite.services.teams import Teams
1516
from appwrite.services.storage import Storage
@@ -24,7 +25,7 @@
2425

2526
def parse_args():
2627
parser = argparse.ArgumentParser(description='Appwrite MCP Server')
27-
parser.add_argument('--databases', action='store_true', help='Enable Databases service')
28+
parser.add_argument('--tables-db', action='store_true', help='Enable TablesDB service')
2829
parser.add_argument('--users', action='store_true', help='Enable Users service')
2930
parser.add_argument('--teams', action='store_true', help='Enable Teams service')
3031
parser.add_argument('--storage', action='store_true', help='Enable Storage service')
@@ -33,6 +34,7 @@ def parse_args():
3334
parser.add_argument('--locale', action='store_true', help='Enable Locale service')
3435
parser.add_argument('--avatars', action='store_true', help='Enable Avatars service')
3536
parser.add_argument('--sites', action='store_true', help='Enable Sites service')
37+
parser.add_argument('--databases', action='store_true', help='Enable Legacy Databases service')
3638
parser.add_argument('--all', action='store_true', help='Enable all services')
3739
return parser.parse_args()
3840

@@ -60,13 +62,13 @@ def parse_args():
6062
def register_services(args):
6163
# If --all is specified, enable all services
6264
if args.all:
63-
args.databases = args.users = args.teams = args.storage = True
65+
args.tables_db = args.users = args.teams = args.storage = True
6466
args.functions = args.messaging = args.locale = args.avatars = True
6567
args.sites = True
6668

6769
# Register services based on CLI arguments
68-
if args.databases:
69-
tools_manager.register_service(Service(Databases(client), "databases"))
70+
if args.tables_db:
71+
tools_manager.register_service(Service(TablesDB(client), "tables_db"))
7072
if args.users:
7173
tools_manager.register_service(Service(Users(client), "users"))
7274
if args.teams:
@@ -83,12 +85,14 @@ def register_services(args):
8385
tools_manager.register_service(Service(Avatars(client), "avatars"))
8486
if args.sites:
8587
tools_manager.register_service(Service(Sites(client), "sites"))
86-
87-
# If no services were specified, enable databases by default
88-
if not any([args.databases, args.users, args.teams, args.storage,
89-
args.functions, args.messaging, args.locale, args.avatars]):
88+
if args.databases:
9089
tools_manager.register_service(Service(Databases(client), "databases"))
9190

91+
# If no services were specified, enable tables_db by default
92+
if not any([args.databases, args.tables_db, args.users, args.teams, args.storage,
93+
args.functions, args.messaging, args.locale, args.avatars, args.sites]):
94+
tools_manager.register_service(Service(TablesDB(client), "tables_db"))
95+
9296
async def serve() -> Server:
9397
server = Server("Appwrite MCP Server")
9498

@@ -130,7 +134,7 @@ async def _run():
130134
write_stream,
131135
InitializationOptions(
132136
server_name="appwrite",
133-
server_version="0.2.0",
137+
server_version="0.2.8",
134138
capabilities=server.get_capabilities(
135139
notification_options=NotificationOptions(),
136140
experimental_capabilities={},

uv.lock

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)