Self-hosted: Database model validation fails on missing policies/archives fields
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 55/100
調査の方向性
appwrite/models/database.py と validate_services -> tables_db.list() の起動プローブから開始し、Database フィールドを説明されている self-hosted のレスポンスと比較します。省略された policies と archives が Cloud のレスポンスを壊すことなく受け入れられることを確認し、その後、self-hosted インスタンスに対して起動時の検証が成功することを確認します。
索引モデルが issue の本文から書いたものです。
説明
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
- 主要言語
- Python
- スター
- 72
- フォーク
- 20
- 平均マージ
- 1日 8時間
- マージ済み PR(30日)
- 18
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
appwrite/mcp のほかの issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 20/100
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
メンテナーはふだん 1 日以内に返信
似ている issue
-
documentation
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
メンテナーはふだん 1 日以内に返信
-
good first issue module-baseline needs triage ux
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
darnitdevorg/darnit#650 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
nyjc-computing/campus#938 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
nf-osi/nf-metadata-dictionary#1027 ·
メンテナーはふだん 1 日以内に返信
-
bug documentation
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
qatrackplus/qatrackplus#913 ·
メンテナーはふだん 3 日以内に返信