Skip to content

feat(mcp): add live askable://current resource and list_context_sources tool - #353

Merged
vamgan merged 1 commit into
mainfrom
claude/mcp-live-resource
Jun 29, 2026
Merged

vamgan merged 1 commit into
mainfrom
claude/mcp-live-resource

Conversation

@vamgan

@vamgan vamgan commented Jun 29, 2026

Copy link
Copy Markdown
Collaborator

Summary

Closes a server-vs-bridge asymmetry: the page bridge exposes read_current_resource at askable://current, but createAskableMcpServer registered only the static context://schema resource — so MCP clients that use the resources/read model could not read the current packet, only the get_current_context tool could.

What's added

  • Live askable://current resource on the server, returning the current WebContextPacket as JSON — symmetric with the page bridge. Gated by requireRedacted (throws on unredacted packets when enabled).
  • list_context_sources tool — surfaces packet.surrounding.sources (label / role / metadata) so an agent can discover which app-owned sources exist before requesting them. Also requireRedacted-gated.
  • Updated the MCP guide's tools/resources table, which previously listed a non-existent read_current_resource server tool (that's a page-bridge message type) and omitted the real tools.

Both additions reuse the existing provider and the already-present @modelcontextprotocol/sdk — no new dependencies.

Test plan

  • mcp 50/50 tests (5 new: resource serve + redaction gate; list_context_sources populated / empty / blocked)
  • full workspace tsc build clean
  • docs build clean
  • CI typecheck-and-build + static/quality green

🤖 Generated with Claude Code


Generated by Claude Code

…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).
@vercel

vercel Bot commented Jun 29, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
askable Ready Ready Preview, Comment Jun 29, 2026 4:28am

@pkg-pr-new

pkg-pr-new Bot commented Jun 29, 2026

Copy link
Copy Markdown

Open in StackBlitz

@askable-ui/angular

npm i https://pkg.pr.new/@askable-ui/angular@353

@askable-ui/context

npm i https://pkg.pr.new/@askable-ui/context@353

@askable-ui/core

npm i https://pkg.pr.new/@askable-ui/core@353

@askable-ui/create-app

npm i https://pkg.pr.new/@askable-ui/create-app@353

@askable-ui/mcp

npm i https://pkg.pr.new/@askable-ui/mcp@353

@askable-ui/qwik

npm i https://pkg.pr.new/@askable-ui/qwik@353

@askable-ui/react

npm i https://pkg.pr.new/@askable-ui/react@353

@askable-ui/react-native

npm i https://pkg.pr.new/@askable-ui/react-native@353

@askable-ui/solid

npm i https://pkg.pr.new/@askable-ui/solid@353

@askable-ui/svelte

npm i https://pkg.pr.new/@askable-ui/svelte@353

@askable-ui/vue

npm i https://pkg.pr.new/@askable-ui/vue@353

@askable-ui/web-component

npm i https://pkg.pr.new/@askable-ui/web-component@353

commit: 8529a7a

@vamgan
vamgan merged commit 7f2e53c into main Jun 29, 2026
9 checks passed
@vamgan
vamgan deleted the claude/mcp-live-resource branch June 29, 2026 04:33

This branch was successfully deployed

1 active deployment
Preview — 8529a7ad Deployed Jun 29, 2026 by vercel[bot]
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.

2 participants