Skip to content

feat(mcp): Act as the task's user and always confirm write tools - #1

Merged
ddespinoza merged 3 commits into
mainfrom
feat/92-mcp-user-and-write-confirmation
Nov 10, 2026
Merged

ddespinoza merged 3 commits into
mainfrom
feat/92-mcp-user-and-write-confirmation

Conversation

@ddespinoza

Copy link
Copy Markdown

Closes APS-Conecta/gestion-aio#92. MCP servers on this Nextcloud (the AppAPI proxy) get each call signed for the task's user with the AppAPI headers of docs/context-agent.md in APS-Conecta/nextcloud-mcp-connector; other servers get no headers. A tool annotated as not read-only is confirmed on every call, even when it is on the always-allow list. Tests: tests/test_mcp_tools.py.

Before (main), live FastMCP probe at NEXTCLOUD_URL, always-allow *: alice: server sees '<no user>'; always-allowed ['mcp_create_note', 'mcp_whoami'] (bob the same).
After: alice: server sees 'alice'; always-allowed ['mcp_whoami'] and bob: server sees 'bob'; always-allowed ['mcp_whoami'].

Commit 080e247 is the upstream offer for nextcloud/context_agent. Commit 342fbf3 is for the fork only: it pushes ghcr.io/<owner>/context_agent:<tag without v> when a release is published, and builds without pushing on PRs that change the workflow or the Dockerfile.
Local gate: pytest -v tests gave 365 passed, and reuse lint is compliant. The integration test runs in CI only. The docs site needs no change.

🤖 Generated with Claude Code

Agent and others added 3 commits November 10, 2026 16:48
MCP servers on this Nextcloud (for example an ExApp behind the AppAPI
proxy) now get each call signed for the user of the task, with the
same AppAPI headers the agent sends to Nextcloud itself, so they run
the call as that user. Servers elsewhere get no headers, so the app
secret never leaves this Nextcloud.

A tool whose MCP annotations do not mark it read-only is confirmed on
every call, even when it is on the always-allow list. Tools without
annotations are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A published release builds the multi-arch image and pushes it to
ghcr.io/<owner>/context_agent under the release tag without its "v",
and reports the pushed digest in the run summary. A pull request that
changes the workflow or the Dockerfile builds the image without
pushing it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The fork has no runner for Nextcloud's ubuntu-latest-low label, so the
check queued forever. Fork only, like 342fbf3: not part of the upstream offer.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ddespinoza
ddespinoza marked this pull request as ready for review November 10, 2026 19:59
@ddespinoza
ddespinoza merged commit 38d39b2 into main Nov 10, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The Context Agent passes the asking user to MCP servers

1 participant