Description
The mcp-server-appwrite package (v0.8.1) depends on the appwrite Python SDK 21.0.0+, whose Database Pydantic model requires policies (List[BackupPolicy]) and archives (List[BackupArchive]) as mandatory fields. Self-hosted Appwrite instances (including the latest stable v1.9.5) do not return these Cloud-only fields in the database list response (GET /tablesdb).
Impact
The MCP server's startup validation (validate_services -> tables_db.list()) fails immediately with:
RuntimeError: Appwrite startup validation failed during the minimal startup probe.
- tables_db: Unable to parse response into DatabaseList: 6 validation errors for DatabaseList
databases.0.policies
Field required
databases.0.archives
Field required
This makes the MCP server completely unusable on self-hosted Appwrite instances.
Steps to Reproduce
- Run a self-hosted Appwrite instance (tested on v1.9.0 and v1.9.5 stable)
- Set up the MCP server with self-hosted config per
docs/self-hosted.md
- Start the MCP server -> validation fails on
tables_db
Workaround
Making policies and archives fields Optional in the Database model resolves the issue. We are currently using a wrapper script that monkey-patches the model at import time.
Suggested Fix
Make the policies and archives fields in appwrite/models/database.py optional with a default of None:
policies: Optional[List[BackupPolicy]] = Field(default=None, alias='policies')
archives: Optional[List[BackupArchive]] = Field(default=None, alias='archives')
This is backward-compatible since Cloud instances always return these fields, and self-hosted instances simply omit them.
Environment
- Appwrite version: 1.9.5 stable (self-hosted)
- mcp-server-appwrite: 0.8.1
- appwrite Python SDK: 21.0.0
Description
The
mcp-server-appwritepackage (v0.8.1) depends on theappwritePython SDK 21.0.0+, whoseDatabasePydantic model requirespolicies(List[BackupPolicy]) andarchives(List[BackupArchive]) as mandatory fields. Self-hosted Appwrite instances (including the latest stable v1.9.5) do not return these Cloud-only fields in the database list response (GET /tablesdb).Impact
The MCP server's startup validation (
validate_services->tables_db.list()) fails immediately with:This makes the MCP server completely unusable on self-hosted Appwrite instances.
Steps to Reproduce
docs/self-hosted.mdtables_dbWorkaround
Making
policiesandarchivesfieldsOptionalin theDatabasemodel resolves the issue. We are currently using a wrapper script that monkey-patches the model at import time.Suggested Fix
Make the
policiesandarchivesfields inappwrite/models/database.pyoptional with a default ofNone:This is backward-compatible since Cloud instances always return these fields, and self-hosted instances simply omit them.
Environment