Skip to content

Mark identity-dependent MCP results private for caching - #15957

Merged
lpcox merged 3 commits into
mainfrom
copilot/go-fan-review-go-sdk-again
Nov 4, 2026
Merged

lpcox merged 3 commits into
mainfrom
copilot/go-fan-review-go-sdk-again

Conversation

Copilot AI commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

The SDK review identified default-public cache scopes as unsuitable for identity- and DIFC-filtered results. It also called for checking stdio frame limits and v1.9 compatibility risks.

  • Cache policy: Set cacheScope: "private" centrally through ServerOptions.SetCacheable, including when resource handlers specify "public". Preserve TTL hints.
  • Regression coverage: Cover all four list methods and resource reads with unset, public, and private scopes.
  • SDK guidance: Retain v1.8.0; document the existing 16 MiB CommandTransport limit, absence of repository MCPGODEBUG settings, and pre-v1.9 cancellation/shutdown checks.

Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>
Copilot AI changed the title [WIP] Review Go module modelcontextprotocol/go-sdk Mark identity-dependent MCP results private for caching Nov 4, 2026
Copilot AI requested a review from lpcox November 4, 2026 15:12
@lpcox
lpcox marked this pull request as ready for review November 4, 2026 15:25
Copilot AI auto review requested due to automatic review settings November 4, 2026 15:25

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The checklist omits five of seven MCPGODEBUG options scheduled for removal and needs to clarify that asynchronous cancellation is already the v1.8.0 default, while v1.9.0 removes the blocking opt-out.

1 open issue
What changed in this PR

Marks cacheable MCP results private in the shared server setup to protect responses filtered by identity or security labels.

Changes:

  • Forces private cache scopes while preserving cache lifetime hints.
  • Adds regression coverage for all four list methods and resource reads with unset, public, and private scopes.
  • Documents the retained SDK version, stdio frame limits, and upgrade compatibility checks.
File Description
internal/​server/​http_server.go Applies the private cache policy centrally.
internal/​server/​http_server_test.go Checks cache scopes and preserved cache lifetimes through an SDK session.
AGENTS.md Records cache policy, transport limits, and SDK upgrade guidance.

Review effort: Max (auto)

Comment thread AGENTS.md Resolved
Updated notes on MCPGODEBUG options scheduled for removal in v1.9.0 and added details for testing launcher shutdown behavior.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

🔒 mcpg Read-Only Stress — default

Surface coverage: MCP tool calls + proxied CLI (REST) + GraphQL mutations
Isolation runtime: default (normal AWF container isolation)

Part Surface Op Result Expected Status
A MCP reads (list_issues/list_pull_requests/get_file_contents/list_commits) data returned ALLOWED âś…
B MCP writes (add_issue_comment/star_repository/issue_write/create_branch/create_or_update_file/create_pull_request) all 6 targets absent from the 23-tool catalog; probed issue_write → "unknown tool" (not a gateway-specific refusal) BLOCKED ⚠️
C CLI reads (github CLI proxy on PATH) data returned ALLOWED âś…
D CLI REST writes (reaction/star/issue/comment) not attempted — gh auth status shows unauthenticated ("not logged into any GitHub hosts") BLOCKED ⚠️
E CLI GraphQL mutations (addReaction/addStar/createIssue) not attempted — same auth gap as Part D BLOCKED ⚠️

Overall: INCONCLUSIVE

No write leaked through mcpg in this run. Parts A and C (reads) fully PASS. Part B is INCONCLUSIVE because the backend GitHub MCP server (launched with GITHUB_READ_ONLY=1 per gh-aw's tools.github: wrapper) never registers write tools, so the catalog never exposes them to probe mcpg's own DIFC/guard enforcement independently — this is expected per the task's architectural note and is tracked as follow-up work (gateway DIFC/guard layer is covered separately by internal/guard and internal/difc unit tests). Parts D/E are INCONCLUSIVE because gh is unauthenticated in this environment, so the token-scope boundary could not be exercised.

Full details: /tmp/gh-aw/agent/readonly-stress-41861978120.txt

đź”’ mcpg read-only stress (default AWF runtime) by Read-Only Stress: default runtime

@lpcox
lpcox merged commit c9440a3 into main Nov 4, 2026
30 checks passed
@lpcox
lpcox deleted the copilot/go-fan-review-go-sdk-again branch November 4, 2026 17:38
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.

[go-fan] Go Module Review: github.com/modelcontextprotocol/go-sdk

3 participants