Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Self-hosted: Database model validation fails on missing policies/archives fields

オープン
#52 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
55/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
静か
技術スタック
python
領域
backend, databases

調査の方向性

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

  1. Run a self-hosted Appwrite instance (tested on v1.9.0 and v1.9.5 stable)
  2. Set up the MCP server with self-hosted config per docs/self-hosted.md
  3. 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

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

appwrite/mcp のほかの issue

appwrite/mcp の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。