René's URL Explorer Experiment


Title: MCP: list every connected browser tab and route client tool calls per tab · Issue #394 · devframes/devframe · GitHub

Open Graph Title: MCP: list every connected browser tab and route client tool calls per tab · Issue #394 · devframes/devframe

X Title: MCP: list every connected browser tab and route client tool calls per tab · Issue #394 · devframes/devframe

Description: Problem With several browser tabs of the same app open (same port), the MCP surface acts as if there were one client: devframe_connect_list-instances lists node instances keyed per (port, basePath) (packages/devframe/src/node/instance-re...

Open Graph Description: Problem With several browser tabs of the same app open (same port), the MCP surface acts as if there were one client: devframe_connect_list-instances lists node instances keyed per (port, basePath)...

X Description: Problem With several browser tabs of the same app open (same port), the MCP surface acts as if there were one client: devframe_connect_list-instances lists node instances keyed per (port, basePath)...

Opengraph URL: https://github.com/devframes/devframe/issues/394

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"MCP: list every connected browser tab and route client tool calls per tab","articleBody":"## Problem\n\nWith several browser tabs of the same app open (same port), the MCP surface acts as if there were one client:\n\n- `devframe_connect_list-instances` lists node instances keyed per `(port, basePath)` (`packages/devframe/src/node/instance-registry.ts`), so tabs are invisible by construction — N tabs share one dev-server process.\n- The client-tool bridge from #376 (`devframe:agent:sync-client-tools` → `node/client-agent.ts`) tracks one session entry per tab, but tool ids collide across tabs and the provider loop lets the **last-synced session silently own every tool**. medula currently ships this as an uncommitted vendored patch and documents it as \"the tab you focused last\" — there is no actual focus tracking.\n\nA coding agent cannot see which tabs are connected, nor act on a specific one.\n\n## Proposal\n\nMake connected RPC clients (browser tabs) first-class on the MCP surface: list them per instance, and let a tool call target one.\n\n### 1. Stable tab identity (devframe core, browser side)\n\n- Each tab mints a sessionStorage-backed tab id (same pattern as the hub's frame-nav `tabId`, `packages/hub/src/client/frame-nav.ts`), so it survives reloads and reconnects. Caveat to handle: browser tab duplication copies sessionStorage — follow the frame-nav dedupe approach.\n- The RPC client reports tab metadata to the node: tab id, URL, title, visibility/focus state, plus the client tool manifest it already syncs.\n- Freshness: metadata is (re)sent on connect, on `focus`/`visibilitychange`, and with every client-tool re-sync. No history-API patching; URL may lag briefly after an SPA navigation until the next event.\n\n### 2. Per-tab session registry (devframe core, node side)\n\n- Extend the #376 session tracking (`node/client-agent.ts`) to keep, per RPC session: tab id, metadata, tool manifests, `connectedAt`, last-focused timestamp.\n- Cleaned up on session disconnect (existing `_emitSessionDisconnected` hook).\n\n### 3. Listing (agentic)\n\n- New built-in agent tool `devframe:agent:list-clients` on each instance's own MCP endpoint: returns the connected tabs with id, URL, title, visibility, connectedAt, and available client tool names.\n- `devframe_connect_list-instances` (`packages/agentic/src/connect/index.ts`) calls it per live instance and nests a `clients` array in each instance entry — no new gateway tool.\n\n### 4. Per-tab tool routing (agentic + core)\n\n- `tools/list` stays deduped: one entry per tool id regardless of tab count (no per-tab suffixing, no list churn).\n- Client-forwarded tools accept an optional reserved `client_id` argument, injected into their published inputSchema and stripped before forwarding. Works with any MCP client; `devframe_connect_call-tool` passes it through unchanged.\n- `client_id` given → route to that tab's session. Unknown/gone id → fail fast with an error that includes the current live client ids so the agent can re-target in one step.\n- `client_id` omitted → focus-aware default: the most-recently-focused visible tab wins, falling back to last-synced. This upstreams medula's vendored patch and makes its \"tab you focused last\" behavior actually true; stray headless tabs stop competing (a known medula pain point).\n\n## Dependencies / sequencing\n\n- Builds directly on #376 (`eager-client-script`), which is still draft and based on v0.9.18 — it predates the 0.10 move of MCP into `@devframes/agentic` and needs a rebase. Landing strategy (rebase #376 first vs. fold into one effort) intentionally left open here.\n- medula can drop its vendored `client-agent.ts` patch once this lands.\n\n## Out of scope\n\n- Forwarding WebMCP (`document.modelContext`) surfaces — untouched; this is about the #376 RPC bridge.\n- Hub-specific UI; the hub aggregate MCP benefits automatically since it sits on the same context.\n\n---\nThis issue was created with the help of an agent.\n","author":{"url":"https://github.com/antfubot","@type":"Person","name":"antfubot"},"datePublished":"2026-09-15T23:11:12Z","url":"https://github.com/devframes/devframe/issues/394"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:cc4d47d3-40b4-f00b-eda0-129527356de6
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idA924:C876F:13323EC:1A63778:6AFB7381
html-safe-nonce3e8ec09f27c14add07edd97886fb645eaf0b23e708786dac31818648253d5321
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBOTI0OkM4NzZGOjEzMzIzRUM6MUE2Mzc3ODo2QUZCNzM4MSIsInZpc2l0b3JfaWQiOiIyNjUzNjYyNjk4NzAxNzUxMDUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac6ba6f94d7b947410bf53f3ad0dd6bb75929cd19ee85fdbd1d987fc1b80c39856
hovercard-subject-tagissue:5468309582
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/devframes/devframe/394/issue_layout
twitter:imagehttps://opengraph.githubassets.com/30a0fbe8761a455557972b6ba543a4e958fd86cf45b50a7905ca44870828c7f9/devframes/devframe/issues/394
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/30a0fbe8761a455557972b6ba543a4e958fd86cf45b50a7905ca44870828c7f9/devframes/devframe/issues/394
og:image:altProblem With several browser tabs of the same app open (same port), the MCP surface acts as if there were one client: devframe_connect_list-instances lists node instances keyed per (port, basePath)...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameantfubot
hostnamegithub.com
expected-hostnamegithub.com
None0e29e7974fdda2feeaf5c891efd4b23b0734b23480232b62c7bdef13f40b5b48
turbo-cache-controlno-preview
go-importgithub.com/devframes/devframe git https://github.com/devframes/devframe.git
octolytics-dimension-user_id279879373
octolytics-dimension-user_logindevframes
octolytics-dimension-repository_id1231722386
octolytics-dimension-repository_nwodevframes/devframe
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id1231722386
octolytics-dimension-repository_network_root_nwodevframes/devframe
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release2e8872b770cc4d5d0cc1f2026afab747a268e2ce
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/devframes/devframe/issues/394#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fdevframes%2Fdevframe%2Fissues%2F394
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fdevframes%2Fdevframe%2Fissues%2F394
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=devframes%2Fdevframe
Reloadhttps://github.com/devframes/devframe/issues/394
Reloadhttps://github.com/devframes/devframe/issues/394
Reloadhttps://github.com/devframes/devframe/issues/394
devframeshttps://github.com/devframes
devframehttps://github.com/devframes/devframe
Codehttps://github.com/devframes/devframe
Issues12 (12)https://github.com/devframes/devframe/issues
Pull requests13 (13)https://github.com/devframes/devframe/pulls
Actionshttps://github.com/devframes/devframe/actions
Security and qualityhttps://github.com/devframes/devframe/security
Insightshttps://github.com/devframes/devframe/pulse
https://github.com/devframes/devframe
New issuehttps://github.com/login?return_to=https://github.com/devframes/devframe/issues/394
New issuehttps://github.com/login?return_to=https://github.com/devframes/devframe/issues/394
#413https://github.com/devframes/devframe/pull/413
MCP: list every connected browser tab and route client tool calls per tabhttps://github.com/devframes/devframe/issues/394#top
#413https://github.com/devframes/devframe/pull/413
https://github.com/antfubot
antfubothttps://github.com/antfubot
on Sep 15, 2026https://github.com/devframes/devframe/issues/394#issue-5468309582
feat: eagerly expose in-page tools to browser agents #376https://github.com/devframes/devframe/pull/376
feat: eagerly expose in-page tools to browser agents #376https://github.com/devframes/devframe/pull/376
feat: eagerly expose in-page tools to browser agents #376https://github.com/devframes/devframe/pull/376
feat: eagerly expose in-page tools to browser agents #376https://github.com/devframes/devframe/pull/376
feat: eagerly expose in-page tools to browser agents #376https://github.com/devframes/devframe/pull/376
antfubothttps://github.com/antfubot
on Sep 16, 2026https://github.com/devframes/devframe/issues/394#event-31214745259
feat: give each browser client a stable id reported to nodehttps://github.com/devframes/devframe/commit/08122d8b91c5ee4b20b793a7862caffa78762edd
08122d8https://github.com/devframes/devframe/commit/08122d8b91c5ee4b20b793a7862caffa78762edd
antfubothttps://github.com/antfubot
on Oct 2, 2026https://github.com/devframes/devframe/issues/394#event-32301779447
feat(agent): list connected browser tabs and route client tool calls …https://github.com/devframes/devframe/commit/ff554f0cb2108e9ded4a0fa086571fedd44d1ddb
https://docs.github.com/articles/closing-issues-via-commit-messages
ff554f0https://github.com/devframes/devframe/commit/ff554f0cb2108e9ded4a0fa086571fedd44d1ddb
antfubothttps://github.com/antfubot
on Oct 21, 2026https://github.com/devframes/devframe/issues/394#event-33802661746
feat(agent): list connected browser tabs and route client tool calls …https://github.com/devframes/devframe/commit/0077dd9a2b93aec9cac65f010e5b15e869a98f92
https://docs.github.com/articles/closing-issues-via-commit-messages
0077dd9https://github.com/devframes/devframe/commit/0077dd9a2b93aec9cac65f010e5b15e869a98f92
antfuhttps://github.com/antfu
completedhttps://github.com/devframes/devframe/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
#413https://github.com/devframes/devframe/pull/413
on Oct 30, 2026https://github.com/devframes/devframe/issues/394#event-34734552428
Sign up for freehttps://github.com/signup?return_to=https://github.com/devframes/devframe/issues/394
Sign in to commenthttps://github.com/login?return_to=https://github.com/devframes/devframe/issues/394
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.