From 8983f25eaf5947e6fb47a93b35714f3bc64bb29d Mon Sep 17 00:00:00 2001 From: Chris Coutinho Date: Tue, 4 Nov 2025 10:22:50 +0100 Subject: [PATCH] fix: add missing await for get_nextcloud_client in capabilities resource MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix nc_get_capabilities resource handler that was missing await when calling get_nextcloud_client(ctx), causing error: 'coroutine' object has no attribute 'capabilities' Root cause: - get_nextcloud_client() is an async function (context.py:9) - Returns a coroutine that must be awaited - app.py:737 called it without await Solution: - Add await: client = await get_nextcloud_client(ctx) - The handler is already async, so can await the call Test fixed: - test_mcp_resources_access now passes 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- nextcloud_mcp_server/app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nextcloud_mcp_server/app.py b/nextcloud_mcp_server/app.py index 01bba3e..62a8fe6 100644 --- a/nextcloud_mcp_server/app.py +++ b/nextcloud_mcp_server/app.py @@ -734,7 +734,7 @@ def get_app(transport: str = "sse", enabled_apps: list[str] | None = None): async def nc_get_capabilities(): """Get the Nextcloud Host capabilities""" ctx: Context = mcp.get_context() - client = get_nextcloud_client(ctx) + client = await get_nextcloud_client(ctx) return await client.capabilities() # Define available apps and their configuration functions