From 39fba49cfeb9a207dcf5a556655de9aa12ce84d8 Mon Sep 17 00:00:00 2001 From: Chris Coutinho Date: Sat, 22 Nov 2025 18:28:05 +0100 Subject: [PATCH] fix(smithery): Add JSON Schema metadata to mcp-config endpoint MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add proper JSON Schema metadata fields per Smithery documentation: - $schema: JSON Schema draft-07 - $id: Schema identifier URL - title: Human-readable title - description: Schema description - x-query-style: "flat" (no nested objects in our schema) - additionalProperties: false 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- nextcloud_mcp_server/app.py | 7 +++++++ pyproject.toml | 1 - uv.lock | 37 ------------------------------------- 3 files changed, 7 insertions(+), 38 deletions(-) diff --git a/nextcloud_mcp_server/app.py b/nextcloud_mcp_server/app.py index 5191c51..dd3357a 100644 --- a/nextcloud_mcp_server/app.py +++ b/nextcloud_mcp_server/app.py @@ -281,7 +281,13 @@ class SmitheryAppContext: # ADR-016: Smithery config schema for container runtime # This schema is served at /.well-known/mcp-config for Smithery discovery +# See: https://smithery.ai/docs/build/session-config SMITHERY_CONFIG_SCHEMA = { + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "https://server.smithery.ai/nextcloud-mcp-server/.well-known/mcp-config", + "title": "Nextcloud MCP Server Configuration", + "description": "Configuration for connecting to your Nextcloud instance via app password authentication", + "x-query-style": "flat", # Our schema has no nested objects, so flat style works "type": "object", "required": ["nextcloud_url", "username", "app_password"], "properties": { @@ -304,6 +310,7 @@ SMITHERY_CONFIG_SCHEMA = { "minLength": 1, }, }, + "additionalProperties": False, } diff --git a/pyproject.toml b/pyproject.toml index e46f367..7a06c01 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -39,7 +39,6 @@ dependencies = [ "pymupdf>=1.26.6", "pymupdf4llm>=0.2.2", "pymupdf-layout>=1.26.6", - "smithery>=0.4.4", ] classifiers = [ "Development Status :: 4 - Beta", diff --git a/uv.lock b/uv.lock index 3561db3..75307d2 100644 --- a/uv.lock +++ b/uv.lock @@ -195,15 +195,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/74/f5/9373290775639cb67a2fce7f629a1c240dce9f12fe927bc32b2736e16dfc/argcomplete-3.6.3-py3-none-any.whl", hash = "sha256:f5007b3a600ccac5d25bbce33089211dfd49eab4a7718da3f10e3082525a92ce", size = 43846, upload-time = "2025-10-20T03:33:33.021Z" }, ] -[[package]] -name = "art" -version = "6.5" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/d4/7d/7d80509bbd19fb747edef94ba487dbadd2747944774ccc0528ad0d005a36/art-6.5.tar.gz", hash = "sha256:a98d77b42c278697ec6cf4b5bdcdfd997f6b2425332da078d4e31e31377d1844", size = 672902, upload-time = "2025-04-12T17:02:20.279Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/67/29/57b06fdb3abdf52c621d3ca3caea735e2db4c8d48288ebd26af448e8e247/art-6.5-py3-none-any.whl", hash = "sha256:70706408144c45c666caab690627d5c74aea7b6c7ce8cc968408ddeef8d84afd", size = 610382, upload-time = "2025-04-12T17:02:21.97Z" }, -] - [[package]] name = "asgiref" version = "3.10.0" @@ -1976,7 +1967,6 @@ dependencies = [ { name = "python-json-logger" }, { name = "pythonvcard4" }, { name = "qdrant-client" }, - { name = "smithery" }, ] [package.dev-dependencies] @@ -2025,7 +2015,6 @@ requires-dist = [ { name = "python-json-logger", specifier = ">=3.2.0" }, { name = "pythonvcard4", specifier = ">=0.2.0" }, { name = "qdrant-client", specifier = ">=1.7.0" }, - { name = "smithery", specifier = ">=0.4.4" }, ] [package.metadata.requires-dev] @@ -3565,23 +3554,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/b7/ce/149a00dd41f10bc29e5921b496af8b574d8413afcd5e30dfa0ed46c2cc5e/six-1.17.0-py2.py3-none-any.whl", hash = "sha256:4721f391ed90541fddacab5acf947aa0d3dc7d27b2e1e8eda2be8970586c3274", size = 11050, upload-time = "2024-12-04T17:35:26.475Z" }, ] -[[package]] -name = "smithery" -version = "0.4.4" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "art" }, - { name = "pydantic" }, - { name = "starlette" }, - { name = "toml" }, - { name = "typer" }, - { name = "uvicorn" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/1e/75/d0b0fc1a5c10a20f3e01cefd98276ccbe7b44d74eeb6551bd2f42d8b4768/smithery-0.4.4.tar.gz", hash = "sha256:18ae19af8405e6476ca4984036d4460822ec1647ad2262addb4909d03387d671", size = 17396, upload-time = "2025-10-24T15:47:44.543Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/30/54/a088fa621c9c76a72a70079fac42b822137a1609ec08525168bd8e9f415d/smithery-0.4.4-py3-none-any.whl", hash = "sha256:883d060b3ecc73a2972019760e342f5a04b62edf18e3bc03594a41851319808a", size = 25372, upload-time = "2025-10-24T15:47:43.045Z" }, -] - [[package]] name = "sniffio" version = "1.3.1" @@ -3703,15 +3675,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/b3/46/e33a8c93907b631a99377ef4c5f817ab453d0b34f93529421f42ff559671/tokenizers-0.22.1-cp39-abi3-win_amd64.whl", hash = "sha256:65fd6e3fb11ca1e78a6a93602490f134d1fdeb13bcef99389d5102ea318ed138", size = 2674684, upload-time = "2025-09-19T09:49:24.953Z" }, ] -[[package]] -name = "toml" -version = "0.10.2" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/be/ba/1f744cdc819428fc6b5084ec34d9b30660f6f9daaf70eead706e3203ec3c/toml-0.10.2.tar.gz", hash = "sha256:b3bda1d108d5dd99f4a20d24d9c348e91c4db7ab1b749200bded2f839ccbe68f", size = 22253, upload-time = "2020-11-01T01:40:22.204Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/44/6f/7120676b6d73228c96e17f1f794d8ab046fc910d781c8d151120c3f1569e/toml-0.10.2-py2.py3-none-any.whl", hash = "sha256:806143ae5bfb6a3c6e736a764057db0e6a0e05e338b5630894a5f779cabb4f9b", size = 16588, upload-time = "2020-11-01T01:40:20.672Z" }, -] - [[package]] name = "tomli" version = "2.3.0"