Repository navigation
feat(mcp): add live askable://current resource and list_context_sources tool - #353
Merged
Merged
Conversation
…es tool createAskableMcpServer only registered the static context-schema resource, so MCP clients using the resources/read model could not read the current packet — only the get_current_context tool could. Adds: - a live 'askable://current' resource (symmetric with the page bridge), gated by requireRedacted - a list_context_sources tool that surfaces packet.surrounding.sources for source discovery Reuses the existing provider and SDK; no new dependencies. Updates the MCP guide's tools/resources table (which previously listed a non-existent read_current_resource server tool). Tests: 50 pass (5 new).
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
@askable-ui/angular
@askable-ui/context
@askable-ui/core
@askable-ui/create-app
@askable-ui/mcp
@askable-ui/qwik
@askable-ui/react
@askable-ui/react-native
@askable-ui/solid
@askable-ui/svelte
@askable-ui/vue
@askable-ui/web-component
commit: |
2 of 3 tasks
This branch was successfully deployed
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
Closes a server-vs-bridge asymmetry: the page bridge exposes
read_current_resourceataskable://current, butcreateAskableMcpServerregistered only the staticcontext://schemaresource — so MCP clients that use theresources/readmodel could not read the current packet, only theget_current_contexttool could.What's added
askable://currentresource on the server, returning the currentWebContextPacketas JSON — symmetric with the page bridge. Gated byrequireRedacted(throws on unredacted packets when enabled).list_context_sourcestool — surfacespacket.surrounding.sources(label / role / metadata) so an agent can discover which app-owned sources exist before requesting them. AlsorequireRedacted-gated.read_current_resourceserver tool (that's a page-bridge message type) and omitted the real tools.Both additions reuse the existing
providerand the already-present@modelcontextprotocol/sdk— no new dependencies.Test plan
50/50tests (5 new: resource serve + redaction gate;list_context_sourcespopulated / empty / blocked)tscbuild clean🤖 Generated with Claude Code
Generated by Claude Code