Repository navigation
Conversation
la55u
force-pushed
the
feat/resources
branch
from
November 13, 2026 23:34
9323aec to
d0dc8bd
Compare
la55u
force-pushed
the
feat/resources
branch
from
November 14, 2026 12:25
267adf8 to
1b02f1f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds the
resourcescapability, so a server can expose documents (including MCP Appsui://views) instead of only tools:Behavior
resourcesis advertised only whenoptions.resourcesis set, so existing servers behave exactly as before.listChanged: false; nosubscribe(2026-07-28 replaced it withsubscriptions/listen).resources/list,resources/templates/list,resources/read.listandtemplatesare optional and are served as empty when unset: the spec lets UI-only resources stay unlisted, but the advertised capability still promises the methods._meta,title,sizeandannotationssurvive untouched.readreturningnull→Resource not foundwith the URI inerror.data:-32602on MCP 2026-07-28 (SEP-2164) and-32002on earlier revisions.uri→-32602invalid params (not "not found").-32603; the error is logged, never sent (same policy as tool handlers).ttlMs/cacheScopeonly on the 2026-07-28 path (SEP-2549): the tool-list TTL for the lists,ttlMs: 0+privateforresources/read.Mcp-Nameheader check already coversresources/readin the modern era.user; access control is theirs, the same as for internal functions. Documented in README and DESIGN.Out of scope
resources/subscribe,notifications/resources/*, and prompts. This is the read path only.Testing
src/client/index.test.ts:-32601(404 on 2026-07-28) without itttlMs/cacheScopeand-32602+error.data.uri; legacy-32002uri→-32602-32603without leaking the errornpm test→ 68 pass ·npm run typecheck·npm run lintMCP Apps rides on top of this: the tool's
_meta.ui.resourceUri(convex#7) points at a resource, and the host fetches it withresources/read. Nothing in this PR knows aboutui://; the example lands in the next PR.