Commit Graph
2191 Commits
Author SHA1 Message Date
DylanandGitHub 06a8262e0e Merge pull request #1 from dylanlangston/copilot/fix-issue-708
Fix Nutrition model to accept numeric values from Cookbook API
2026-04-15 01:05:16 -04:00
480504f8b5 raise ValueError for bool inputs instead of returning as-is
Agent-Logs-Url: https://github.com/dylanlangston/nextcloud-mcp-server/sessions/0360ab28-8913-450e-8c61-697e71ba9742

Co-authored-by: dylanlangston <16236219+dylanlangston@users.noreply.github.com>
2026-04-14 23:04:18 +00:00
6ae30acc6f address review: exclude bool from coercion, parameterize tests over all fields
Agent-Logs-Url: https://github.com/dylanlangston/nextcloud-mcp-server/sessions/0360ab28-8913-450e-8c61-697e71ba9742

Co-authored-by: dylanlangston <16236219+dylanlangston@users.noreply.github.com>
2026-04-14 23:02:56 +00:00
cb88d2b062 fix: coerce numeric nutrition values to strings in Cookbook model (fixes #708)
Agent-Logs-Url: https://github.com/dylanlangston/nextcloud-mcp-server/sessions/d7163bb6-ad5d-4406-8d11-145c5317ec19

Co-authored-by: dylanlangston <16236219+dylanlangston@users.noreply.github.com>
2026-04-14 22:49:34 +00:00
github-actions[bot] fea84dd646 bump: version 0.72.1 → 0.72.2 2026-04-14 19:52:21 +00:00
Chris CoutinhoandGitHub 80822e00e7 Merge pull request #707 from cbcoutinho/fix/uvx-pypi-deployment
fix: enable uvx/PyPI deployments without Docker assumptions
2026-04-14 21:51:58 +02:00
Chris CoutinhoandClaude Opus 4.6 512de1f6b0 test: address PR #707 reviewer feedback on config path helpers
- _resolve_settings_files() now raises FileNotFoundError when
  NEXTCLOUD_MCP_SETTINGS_FILE points to a missing file, instead of
  silently falling back to defaults (footgun on typos).
- .secrets.toml is now looked for alongside the explicit settings file
  when NEXTCLOUD_MCP_SETTINGS_FILE is set, matching user expectation for
  /etc-style deployments. Unset behaviour (cwd lookup) is unchanged.
- get_token_db_path() drops the redundant os.environ.get() short-circuit;
  TOKEN_STORAGE_DB is already bound through dynaconf because the key is
  declared in _DEFAULTS.
- is_ephemeral_token_db() docstring documents the "must call
  get_token_db_path() first" precondition.
- alembic.ini comment clarifies the ./tokens.db placeholder is cwd-relative
  by design and points readers at the -x database_url escape hatch.
- New tests/unit/test_config_paths.py (12 tests) covering the ephemeral
  tempfile lifecycle, the TOKEN_STORAGE_DB override path, and all six
  _resolve_settings_files() cases including the two new behaviours.

Full unit suite now at 476 passed (464 + 12 new). Ruff + ty clean.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-14 21:14:42 +02:00
Chris CoutinhoandClaude Opus 4.6 146b622ebf fix: enable uvx/PyPI deployments without Docker assumptions
Two bugs made `uvx --from . nextcloud-mcp-server run` (and any pip install)
unusable outside Docker:

1. Dynaconf was configured with ignore_unknown_envvars=True and relied on
   settings.toml to declare the key schema. With no settings.toml in a wheel
   install, every env var (NEXTCLOUD_HOST, MCP_DEPLOYMENT_MODE, ...) was
   silently dropped. Moved the schema into a Python _DEFAULTS dict passed
   directly to Dynaconf, kept settings.toml as an optional external override
   (renamed to settings.toml.example, gitignored), and pointed docker-compose
   at the example file.

2. Token SQLite DB defaulted to /app/data/tokens.db in multiple places
   (auth/storage.py, migrations.py, alembic/env.py, cli.py db subcommands),
   which blew up at uvicorn startup with FileNotFoundError on non-Docker
   hosts. Replaced with a new config.get_token_db_path() helper that
   resolves TOKEN_STORAGE_DB if explicitly set, otherwise allocates a
   per-process tempfile cleaned up at interpreter exit via atexit — mirroring
   the "ephemeral by default" pattern used for QDRANT_LOCATION=:memory:.

Containers are unaffected: docker-compose services now explicitly set
TOKEN_STORAGE_DB=/app/data/tokens.db (the fourth service that was missing
this pin has been brought in line with the other three).

Verified end-to-end in an isolated /tmp venv: env-var-only startup, Alembic
migrations run against the tempfile, Application startup complete, /health/live
returns 200, tempfile deleted on SIGTERM. Unit tests (464) + ruff + ty pass.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-14 20:11:23 +02:00
Chris Coutinho fd1846de03 ci: Bump astrolabe 2026-04-11 20:16:32 +02:00
Chris CoutinhoandGitHub edb6c8d820 Merge pull request #643 from cbcoutinho/renovate/uv_build-0.x
chore(deps): update dependency uv_build to >=0.11.5,<0.12.0
2026-04-09 18:12:03 +02:00
renovate-bot-cbcoutinho[bot]andGitHub e72a751fdb chore(deps): update dependency uv_build to >=0.11.5,<0.12.0 2026-04-08 22:17:06 +00:00
Chris CoutinhoandGitHub 26e632c1e2 Merge pull request #644 from cbcoutinho/renovate/ghcr.io-astral-sh-uv-0.x
chore(deps): update ghcr.io/astral-sh/uv docker tag to v0.11.4
2026-04-08 15:12:59 +02:00
Chris CoutinhoandGitHub 6b6a5eb639 Merge pull request #698 from cbcoutinho/renovate/anthropics-claude-code-action-1.x
chore(deps): update anthropics/claude-code-action action to v1.0.90
2026-04-08 14:06:51 +02:00
renovate-bot-cbcoutinho[bot]andGitHub 4fbdd471ad chore(deps): update anthropics/claude-code-action action to v1.0.90 2026-04-08 10:19:11 +00:00
renovate-bot-cbcoutinho[bot]andGitHub 9c37f4d61d chore(deps): update ghcr.io/astral-sh/uv docker tag to v0.11.4 2026-04-08 04:15:10 +00:00
github-actions[bot] 214fead311 bump: version 0.72.0 → 0.72.1 2026-04-07 23:28:00 +00:00
Chris CoutinhoandGitHub 94226bdcfa Merge pull request #697 from cbcoutinho/fix/strip-resource-scope-prefix
fix: strip resource server prefix from JWT scopes
2026-04-08 01:27:39 +02:00
Chris CoutinhoandClaude Opus 4.6 2c0b764aae fix: strip resource server prefix from JWT scopes for tool filtering
External IdPs like AWS Cognito return scopes prefixed with the resource
server identifier (e.g. https://mcp.example.com/notes.read). MCP tools
use bare scope names (notes.read) in @require_scopes decorators. Without
stripping the prefix, scope matching fails and only identity-only tools
(openid/profile/email) are visible — resulting in 4/125 tools shown.

Strip the OIDC_RESOURCE_SERVER_ID prefix in both get_access_token_scopes()
(used by list_tools filtering) and the require_scopes decorator (used at
tool execution time).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-08 01:27:06 +02:00
github-actions[bot] 107fe7911f bump: version 0.71.0 → 0.72.0 2026-04-07 22:26:11 +00:00
Chris CoutinhoandClaude Opus 4.6 33d679e174 feat: add --version option to CLI
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-08 00:24:50 +02:00
github-actions[bot] 4922fb3ac5 bump: version 0.70.4 → 0.71.0 2026-04-07 22:10:12 +00:00
Chris CoutinhoandGitHub 21e4174df3 Merge pull request #689 from cbcoutinho/feat/stdio-transport
feat: add stdio transport support for local MCP usage
2026-04-08 00:09:49 +02:00
github-actions[bot] 98a0ba3745 bump: version 0.70.3 → 0.70.4 2026-04-07 22:03:06 +00:00
Chris CoutinhoandGitHub e76e3e1306 Merge pull request #690 from cbcoutinho/fix/cognito-offline-access-scope
fix: conditionally include offline_access based on IdP discovery
2026-04-08 00:02:35 +02:00
Chris CoutinhoandClaude Opus 4.6 f340380898 fix: address third round of review feedback
Add BasicAuthLifespanContext Protocol to make the contract between
StdioContext and get_client() explicit and type-safe. Document why
mcp.get_context() is required for non-template resources. Add News
and Collectives to README Supported Apps table, fix transport default.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-07 23:59:39 +02:00
Chris CoutinhoandClaude Opus 4.6 7730f926cb fix: conditionally include offline_access based on IdP discovery
AWS Cognito provides refresh tokens automatically with the authorization
code flow but does not list offline_access as a supported scope. Check
the IdP's scopes_supported discovery field before including it in
requests, and always accept refresh tokens from responses regardless.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-07 23:48:49 +02:00
Chris CoutinhoandClaude Opus 4.6 1af85bc05e fix: address second round of review feedback
- Remove dead monkeypatch in test_stdio_calls_get_stdio_mcp
- Add _reload_config() teardown to single_user_env fixture
- Tighten AVAILABLE_APPS type to Callable[[FastMCP], None]

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-07 23:26:46 +02:00
Chris CoutinhoandClaude Opus 4.6 e9c46a04a0 fix: address PR review feedback and fix CI test failures
- Revert default transport to streamable-http (not a breaking change)
- Extract AVAILABLE_APPS constant to server/__init__.py (DRY)
- Wrap get_stdio_mcp ValueError in click.ClickException for clean errors
- Fix test_stdio.py: call _reload_config() so dynaconf sees env changes
- Use lazy %-style logging in stdio.py
- Add private API comments in test assertions
- Derive --enable-app CLI choices from AVAILABLE_APPS
- README: show explicit --transport stdio in uvx examples

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-07 23:03:12 +02:00
Chris CoutinhoandClaude Opus 4.6 09006fcea9 feat: add stdio transport support for local MCP usage
Add a lightweight stdio transport path so users can run the server
locally with MCP clients like Claude Code using `uvx nextcloud-mcp-server run`.

- New `nextcloud_mcp_server/stdio.py` with minimal FastMCP setup for
  single-user BasicAuth (no OAuth, semantic search, or background sync)
- Default transport changed from streamable-http to stdio
- Dockerfile updated to explicitly use streamable-http for containers
- CLI `--enable-app` now includes news, collectives, and sharing
- README Quick Start section with uvx and MCP client config examples

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-07 22:48:14 +02:00
github-actions[bot] 776e2ce693 bump: version 0.70.2 → 0.70.3 2026-04-07 20:23:42 +00:00
Chris CoutinhoandGitHub 23995ce64d Merge pull request #675 from cbcoutinho/renovate/mcp-1.x
fix(deps): update dependency mcp to >=1.27,<1.28
2026-04-07 22:23:22 +02:00
Chris CoutinhoandGitHub 9934a78970 Merge pull request #688 from cbcoutinho/ci/remove-pat-from-release-workflows
ci: remove PAT from release workflows
2026-04-07 22:11:37 +02:00
Chris CoutinhoandClaude Opus 4.6 1e380caade ci: remove PAT from release workflows, use workflow_call instead
Tags pushed with GITHUB_TOKEN don't trigger other workflows (GitHub's
anti-recursion protection), which is why a PAT was needed. Instead,
chain release and docker workflows directly via workflow_call from
bump-version, eliminating the need for a personal access token.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-07 22:10:25 +02:00
github-actions[bot] 3af670ace5 bump: version 0.70.1 → 0.70.2 2026-04-07 18:32:27 +00:00
Chris CoutinhoandClaude Opus 4.6 f8fb34d113 fix: conditionally include offline_access in Flow 2 scope request
Flow 2 hardcoded offline_access in the scope string, but providers
like AWS Cognito don't support this scope (they handle refresh tokens
via client config). This caused invalid_scope errors on the Astrolabe
semantic search enablement flow.

Only include offline_access when enable_offline_access is explicitly
set, matching the behavior of DCR scope registration.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-07 20:31:55 +02:00
renovate-bot-cbcoutinho[bot]andGitHub c84df249a0 fix(deps): update dependency mcp to >=1.27,<1.28 2026-04-07 16:19:01 +00:00
github-actions[bot] c2b19a2983 bump: version 0.70.0 → 0.70.1 2026-04-07 16:08:16 +00:00
Chris CoutinhoandGitHub 0dbd031fe7 Merge pull request #687 from cbcoutinho/fix/cognito-audience-fallback
fix: fall back to client_id when aud claim is absent (Cognito compat)
2026-04-07 18:07:50 +02:00
Chris CoutinhoandClaude Opus 4.6 c3da7acc87 fix: fall back to client_id when aud claim is absent (Cognito compat)
AWS Cognito access tokens do not include an `aud` claim per RFC 7519 —
they use `client_id` instead. This causes `_has_mcp_audience` to reject
all Cognito-issued tokens with "Missing MCP audience. Got []".

When `aud` is empty, fall back to the `client_id` JWT claim for audience
validation. The MCP server's own client_id will be present there since
the AS proxy exchanges the authorization code using its credentials.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-07 18:06:15 +02:00
Chris CoutinhoandGitHub d7653535f0 Merge pull request #658 from cbcoutinho/renovate/nextcloud-31-31.0.14
chore(deps): update nextcloud-31:31.0.14 docker digest to 07ec73c
2026-04-07 17:10:32 +02:00
Chris CoutinhoandGitHub 63c5d5255a Merge pull request #678 from cbcoutinho/renovate/downloads.unstructured.io-unstructured-io-unstructured-api-0.x
chore(deps): update downloads.unstructured.io/unstructured-io/unstructured-api docker tag to v0.1.2
2026-04-07 17:10:17 +02:00
github-actions[bot] 6c7b0a81b3 bump: version 0.69.0 → 0.70.0 2026-04-07 15:01:44 +00:00
Chris CoutinhoandGitHub f624ccbb0f Merge pull request #686 from cbcoutinho/feat/oidc-resource-server-scope-prefix
feat: add OIDC resource server scope prefix for Cognito compatibility
2026-04-07 17:01:14 +02:00
Chris CoutinhoandClaude Opus 4.6 cc6ba65993 fix: address second round of PR review for scope prefix
- Use dynaconf (get_settings()) instead of os.getenv for OIDC_RESOURCE_SERVER_ID
- Re-add Settings field, _field_map entry, and settings.toml default
- Add trailing-slash guard (.rstrip("/")) to prevent double-slash in scopes
- Add double-prefixing guard: skip scopes already carrying the prefix
- Add @pytest.mark.unit to test module
- Add test for already-prefixed scopes
- Document OIDC_RESOURCE_SERVER_ID in docs/configuration.md

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-07 16:58:29 +02:00
Chris CoutinhoandClaude Opus 4.6 f67d4d1116 fix: address PR review for OIDC scope prefix feature
Add offline_access to OIDC standard scopes exclusion list to prevent it
from being incorrectly prefixed, which would break Cognito refresh token
flows. Extract scope transformation into testable _transform_scopes_for_idp()
helper, add debug logging for prefixed scopes, remove unused Settings field
(oauth_routes.py consistently uses os.getenv), and add unit tests.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-07 16:44:08 +02:00
Chris CoutinhoandClaude Opus 4.6 e21ddd91b9 feat: add OIDC resource server scope prefix for Cognito compatibility
When OIDC_RESOURCE_SERVER_ID is set, prefix resource scopes with the
identifier when forwarding to the IdP (e.g., calendar.read becomes
https://example.com/calendar.read). Required for IdPs like AWS Cognito
that mandate {resource_server_id}/{scope} format for custom scopes.
OIDC standard scopes (openid, profile, email) are forwarded as-is.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-07 16:33:47 +02:00
Chris CoutinhoandGitHub 2f146f8408 Merge pull request #685 from cbcoutinho/chore/remove-helm-chart
chore: remove helm chart (migrated to cbcoutinho/helm-charts)
2026-04-07 16:33:31 +02:00
Chris Coutinho f9f637b1ce Merge remote-tracking branch 'origin/master' into chore/remove-helm-chart 2026-04-07 16:32:53 +02:00
Chris CoutinhoandClaude Opus 4.6 c4b74e7e20 chore: remove helm chart (migrated to cbcoutinho/helm-charts)
The helm chart has been migrated to a dedicated repository at
https://github.com/cbcoutinho/helm-charts. This removes the chart
source, release workflow, bump script, and updates all documentation
to point to the new repository.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-07 16:31:35 +02:00
github-actions[bot] 1b64b9ffd2 bump: version 0.58.31 → 0.58.32 2026-04-07 13:50:09 +00:00