Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Appwrite MCP server

mcp-name: io.github.appwrite/mcp
[![MCP Registry Version](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fregistry.modelcontextprotocol.io%2Fv0.1%2Fservers%2Fio.github.appwrite%252Fmcp%2Fversions%2Flatest&query=%24.server.version&label=MCP%20Registry&logo=modelcontextprotocol)](https://registry.modelcontextprotocol.io/?q=io.github.appwrite%2Fmcp)

A [Model Context Protocol](https://modelcontextprotocol.io) server for Appwrite.
It exposes Appwrite's API — databases, users, functions, teams, storage, and more
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ dependencies = [
"anyio>=4.0.0",
"appwrite>=21.0.0,<22",
"docstring-parser>=0.16",
"mcp[cli]>=1.12.0",
"mcp[cli]>=1.12.0,<2",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Minimum version may not support website_url/icons on the low-level Server

The lock file resolves to mcp 1.28.0, but the lower bound stays at >=1.12.0. The icons/website_url documentation first appears in the mcp 1.19.0 release. Any fresh install that resolves to exactly 1.12.0 through ~1.18.x could fail with TypeError: unexpected keyword argument when build_mcp_server tries to construct Server(..., website_url=..., icons=...). The lower bound should be bumped to the earliest version that added these parameters to the low-level Server class (likely >=1.19.0 based on available evidence).

Prompt To Fix With AI
This is a comment left during a code review.
Path: pyproject.toml
Line: 11

Comment:
**Minimum version may not support `website_url`/`icons` on the low-level `Server`**

The lock file resolves to mcp 1.28.0, but the lower bound stays at `>=1.12.0`. The icons/website_url documentation first appears in the mcp 1.19.0 release. Any fresh install that resolves to exactly 1.12.0 through ~1.18.x could fail with `TypeError: unexpected keyword argument` when `build_mcp_server` tries to construct `Server(..., website_url=..., icons=...)`. The lower bound should be bumped to the earliest version that added these parameters to the low-level `Server` class (likely `>=1.19.0` based on available evidence).

How can I resolve this? If you propose a fix, please make it concise.

Fix in Claude Code Fix in Codex

"python-dotenv>=1.0.1",
"starlette>=0.40.0",
"uvicorn[standard]>=0.30.0",
Expand Down
2 changes: 2 additions & 0 deletions src/mcp_server_appwrite/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ def _resolve_server_version() -> str:


SERVER_VERSION = _resolve_server_version()
SERVER_WEBSITE_URL = "https://github.com/appwrite/mcp"
SERVER_ICON_URL = "https://mcp.appwrite.io/favicon.svg"

DEFAULT_ENDPOINT = "https://cloud.appwrite.io/v1"
# Region reported by single-region deployments; carries no region subdomain.
Expand Down
10 changes: 9 additions & 1 deletion src/mcp_server_appwrite/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@
HOSTED_PATH_GUIDANCE,
MAX_FETCH_BYTES,
MAX_INLINE_BYTES,
SERVER_ICON_URL,
SERVER_VERSION,
SERVER_WEBSITE_URL,
TRANSPORTS,
VALIDATION_SERVICE_ORDER,
)
Expand Down Expand Up @@ -966,7 +968,13 @@ def build_mcp_server(operator: Operator, *, transport: str = "http") -> Server:
_configure_uploads(transport)
instructions = build_instructions(transport)

server = Server("Appwrite MCP Server", instructions=instructions)
server = Server(
"Appwrite MCP Server",
version=SERVER_VERSION,
instructions=instructions,
website_url=SERVER_WEBSITE_URL,
icons=[types.Icon(src=SERVER_ICON_URL, mimeType="image/svg+xml")],
)

@server.list_tools()
async def handle_list_tools() -> list[types.Tool]:
Expand Down
20 changes: 20 additions & 0 deletions tests/unit/test_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
build_client_for_request,
build_instructions,
build_introspection_client,
build_mcp_server,
build_operator,
execute_registered_tool,
parse_args,
Expand Down Expand Up @@ -116,6 +117,25 @@ def test_build_instructions_are_transport_specific(self):
self.assertIn("Large results are stored as resources", stdio)
self.assertIn("returns tool results inline", http)

def test_build_mcp_server_reports_appwrite_metadata(self):
server = build_mcp_server(Mock(), transport="stdio")
options = server.create_initialization_options()

self.assertEqual(server.version, server_module.SERVER_VERSION)
self.assertEqual(options.website_url, server_module.SERVER_WEBSITE_URL)
self.assertEqual(
[
icon.model_dump(by_alias=True, exclude_none=True)
for icon in options.icons
],
[
{
"src": server_module.SERVER_ICON_URL,
"mimeType": "image/svg+xml",
}
],
)

def test_http_tool_execution_does_not_block_event_loop(self):
class BlockingOperator:
def execute_public_tool(self, name, arguments):
Expand Down
2 changes: 1 addition & 1 deletion uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading