René's URL Explorer Experiment


Title: feat(mcp): add exposeSharedState to the mcp route options by erkamyaman · Pull Request #444 · devframes/devframe · GitHub

Open Graph Title: feat(mcp): add exposeSharedState to the mcp route options by erkamyaman · Pull Request #444 · devframes/devframe

X Title: feat(mcp): add exposeSharedState to the mcp route options by erkamyaman · Pull Request #444 · devframes/devframe

Description: Problem @devframes/hub and the dev server mount the MCP route with exposeSharedState: true hardcoded, and the route options give no way to change it. A host that keeps a state for its own UI but turns an inspector's agent tools off still has that state listed by devframe_state_read and served as a devframe://state/ resource. The agent tools are hidden, but the data leaks through the generic state tool. The MCP adapter already supports boolean | (key) => boolean (createMcpServer, createMcpFetchHandler, and the Next host). Only the hub and the dev server mount could not reach it. Change McpRouteOptions gets exposeSharedState?: boolean | ((key: string) => boolean). resolveMcpConfig carries it, and both mounts (initHub and initDevframe) pass config.exposeSharedState ?? true instead of true. true (default, also when omitted): every key is exposed. Nothing changes for existing users. false: no devframe_state_read tool and no devframe://state resources. (key) => boolean: only accepted keys are listed, readable, and served as resources. A rejected key gets the same unknown-key error as a missing one. The states still exist and work over RPC, so a UI can use them while agents cannot. initHub({ mcp: { exposeSharedState: key => key.startsWith('my-tool:public:') }, }) I reused the existing type instead of adding a string[] form, so the option has one shape across createMcpServer, createMcpFetchHandler, the Next host and the route options. A list is a one-line filter. Docs updated in the MCP adapter page, the hub-initiate guide and the agent-native guide. Tests In packages/hub/src/node/__tests__/initiate.test.ts (aggregate route) and packages/devframe/src/adapters/__tests__/initiate.test.ts (dev server route): default exposes every key through devframe_state_read and resources/list a filter hides a key from the key list, from a direct read (unknown-key error) and from the resources false removes the tool and the resources The filter and false tests failed before the change. The API snapshot for McpRouteOptions is updated. Verified pnpm lint && pnpm knip && pnpm test && pnpm typecheck && pnpm build all pass.

Open Graph Description: Problem @devframes/hub and the dev server mount the MCP route with exposeSharedState: true hardcoded, and the route options give no way to change it. A host that keeps a state for its own UI but tu...

X Description: Problem @devframes/hub and the dev server mount the MCP route with exposeSharedState: true hardcoded, and the route options give no way to change it. A host that keeps a state for its own UI but tu...

Opengraph URL: https://github.com/devframes/devframe/pull/444

X: @github

direct link

Domain: github.com

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/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:1e122c23-1411-9c8a-6759-426cce8cb785
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idE7F0:26BE6B:15878A5:1D82387:6AFB7A87
html-safe-nonce66e965ff50403f641aa131bf17ad7db77963a071716ee331497c45109a3203ab
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFN0YwOjI2QkU2QjoxNTg3OEE1OjFEODIzODc6NkFGQjdBODciLCJ2aXNpdG9yX2lkIjoiMjUxOTU4OTcxMTA5OTY0NDIzIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac4523777cc78524f60344fd8fac89bbe302ceef95cfaeaaf5c72b5f03f13871c4
hovercard-subject-tagpull_request:4805759723
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/devframes/devframe/pull/444/files
twitter:imagehttps://avatars.githubusercontent.com/u/88717125?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/88717125?s=400&v=4
og:image:altProblem @devframes/hub and the dev server mount the MCP route with exposeSharedState: true hardcoded, and the route options give no way to change it. A host that keeps a state for its own UI but tu...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Noneef32892d4269fb87b55e81cc4ba8d86e0f16aa28446ffbf46cba8be5179ab188
turbo-cache-controlno-preview
diff-viewunified
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 full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasebc3703b4dcbe820d1284ef63c88b001c850be25e
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/devframes/devframe/pull/444/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fdevframes%2Fdevframe%2Fpull%2F444%2Ffiles
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%2Fpull%2F444%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=devframes%2Fdevframe
Reloadhttps://github.com/devframes/devframe/pull/444/files
Reloadhttps://github.com/devframes/devframe/pull/444/files
Reloadhttps://github.com/devframes/devframe/pull/444/files
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
Sign up for GitHub https://github.com/signup?return_to=%2Fdevframes%2Fdevframe%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fdevframes%2Fdevframe%2Fissues%2Fnew%2Fchoose
antfuhttps://github.com/antfu
devframes:mainhttps://github.com/devframes/devframe/tree/main
erkamyaman:feat/mcp-expose-shared-state-filterhttps://github.com/erkamyaman/devframe/tree/feat/mcp-expose-shared-state-filter
Conversation 2 https://github.com/devframes/devframe/pull/444
Commits 1 https://github.com/devframes/devframe/pull/444/commits
Checks 12 https://github.com/devframes/devframe/pull/444/checks
Files changed https://github.com/devframes/devframe/pull/444/files
Please reload this pagehttps://github.com/devframes/devframe/pull/444/files
feat(mcp): add exposeSharedState to the mcp route options https://github.com/devframes/devframe/pull/444/files#top
Show all changes 1 commit https://github.com/devframes/devframe/pull/444/files
c5d482e feat(mcp): add exposeSharedState to the mcp route options erkamyaman Oct 9, 2026 https://github.com/devframes/devframe/pull/444/commits/c5d482ee7db5bb1bca90084a58d637f0696ab883
Clear filters https://github.com/devframes/devframe/pull/444/files
Please reload this pagehttps://github.com/devframes/devframe/pull/444/files
Please reload this pagehttps://github.com/devframes/devframe/pull/444/files
15.agent-native.md https://github.com/devframes/devframe/pull/444/files#diff-256cfb005765d3bb9564fe00fb2221c0453f7f4c809809eac90cd691096cc40b
18.hub-initiate.md https://github.com/devframes/devframe/pull/444/files#diff-c911ddd426817578cc6655c6ada19630b98f84f60f947704c3fc5cd2ba08c1bb
7.mcp.md https://github.com/devframes/devframe/pull/444/files#diff-769d96ffd948ba24074be6c6f8b457d5b1cd3df1633a14a996aa98344bc95b57
initiate.test.ts https://github.com/devframes/devframe/pull/444/files#diff-6bcd391afe0ce4686676a750685773009e25bceb8f6c48339faef1a778e46ee1
_shared.ts https://github.com/devframes/devframe/pull/444/files#diff-cdd58b3ec2c6b0f9cfea033419805385934c80e092023dd55f6b8bf4f17490d0
initiate.ts https://github.com/devframes/devframe/pull/444/files#diff-a9bcfb29d9c365ee0dd03456bdef86e93a812ea81bdada66f197d5e0d7631975
devframe.ts https://github.com/devframes/devframe/pull/444/files#diff-753444a22cd40457a3aeb4a48d0bda1e9c7768bca343ccf72f16699131320795
initiate.test.ts https://github.com/devframes/devframe/pull/444/files#diff-25706eadb28a322bb2a43ffff82c94d39cf906ed65c2d9a10b26ee6fc3d4e907
initiate.ts https://github.com/devframes/devframe/pull/444/files#diff-500061a187e404009222ccd84a3d851545df0a3826241909a3b3b3d9580a4b02
index.snapshot.d.ts https://github.com/devframes/devframe/pull/444/files#diff-e36c6d402239a03e9a6e3a7c285d18780f3584e9dd275c7e5220a6fc41fb160d
docs/content/1.guide/15.agent-native.mdhttps://github.com/devframes/devframe/pull/444/files#diff-256cfb005765d3bb9564fe00fb2221c0453f7f4c809809eac90cd691096cc40b
View file https://github.com/erkamyaman/devframe/blob/c5d482ee7db5bb1bca90084a58d637f0696ab883/docs/content/1.guide/15.agent-native.md
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/devframes/devframe/pull/444/{{ revealButtonHref }}
https://github.com/devframes/devframe/pull/444/files#diff-256cfb005765d3bb9564fe00fb2221c0453f7f4c809809eac90cd691096cc40b
https://github.com/devframes/devframe/pull/444/files#diff-256cfb005765d3bb9564fe00fb2221c0453f7f4c809809eac90cd691096cc40b
docs/content/1.guide/18.hub-initiate.mdhttps://github.com/devframes/devframe/pull/444/files#diff-c911ddd426817578cc6655c6ada19630b98f84f60f947704c3fc5cd2ba08c1bb
View file https://github.com/erkamyaman/devframe/blob/c5d482ee7db5bb1bca90084a58d637f0696ab883/docs/content/1.guide/18.hub-initiate.md
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/devframes/devframe/pull/444/{{ revealButtonHref }}
https://github.com/devframes/devframe/pull/444/files#diff-c911ddd426817578cc6655c6ada19630b98f84f60f947704c3fc5cd2ba08c1bb
https://github.com/devframes/devframe/pull/444/files#diff-c911ddd426817578cc6655c6ada19630b98f84f60f947704c3fc5cd2ba08c1bb
docs/content/2.adapters/7.mcp.mdhttps://github.com/devframes/devframe/pull/444/files#diff-769d96ffd948ba24074be6c6f8b457d5b1cd3df1633a14a996aa98344bc95b57
View file https://github.com/erkamyaman/devframe/blob/c5d482ee7db5bb1bca90084a58d637f0696ab883/docs/content/2.adapters/7.mcp.md
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/devframes/devframe/pull/444/{{ revealButtonHref }}
https://github.com/devframes/devframe/pull/444/files#diff-769d96ffd948ba24074be6c6f8b457d5b1cd3df1633a14a996aa98344bc95b57
https://github.com/devframes/devframe/pull/444/files#diff-769d96ffd948ba24074be6c6f8b457d5b1cd3df1633a14a996aa98344bc95b57
packages/devframe/src/adapters/__tests__/initiate.test.tshttps://github.com/devframes/devframe/pull/444/files#diff-6bcd391afe0ce4686676a750685773009e25bceb8f6c48339faef1a778e46ee1
View file https://github.com/erkamyaman/devframe/blob/c5d482ee7db5bb1bca90084a58d637f0696ab883/packages/devframe/src/adapters/__tests__/initiate.test.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/devframes/devframe/pull/444/{{ revealButtonHref }}
https://github.com/devframes/devframe/pull/444/files#diff-6bcd391afe0ce4686676a750685773009e25bceb8f6c48339faef1a778e46ee1
https://github.com/devframes/devframe/pull/444/files#diff-6bcd391afe0ce4686676a750685773009e25bceb8f6c48339faef1a778e46ee1
packages/devframe/src/adapters/_shared.tshttps://github.com/devframes/devframe/pull/444/files#diff-cdd58b3ec2c6b0f9cfea033419805385934c80e092023dd55f6b8bf4f17490d0
View file https://github.com/erkamyaman/devframe/blob/c5d482ee7db5bb1bca90084a58d637f0696ab883/packages/devframe/src/adapters/_shared.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/devframes/devframe/pull/444/{{ revealButtonHref }}
https://github.com/devframes/devframe/pull/444/files#diff-cdd58b3ec2c6b0f9cfea033419805385934c80e092023dd55f6b8bf4f17490d0
https://github.com/devframes/devframe/pull/444/files#diff-cdd58b3ec2c6b0f9cfea033419805385934c80e092023dd55f6b8bf4f17490d0
https://github.com/devframes/devframe/pull/444/files#diff-cdd58b3ec2c6b0f9cfea033419805385934c80e092023dd55f6b8bf4f17490d0
https://github.com/devframes/devframe/pull/444/files#diff-cdd58b3ec2c6b0f9cfea033419805385934c80e092023dd55f6b8bf4f17490d0
packages/devframe/src/adapters/initiate.tshttps://github.com/devframes/devframe/pull/444/files#diff-a9bcfb29d9c365ee0dd03456bdef86e93a812ea81bdada66f197d5e0d7631975
View file https://github.com/erkamyaman/devframe/blob/c5d482ee7db5bb1bca90084a58d637f0696ab883/packages/devframe/src/adapters/initiate.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/devframes/devframe/pull/444/{{ revealButtonHref }}
https://github.com/devframes/devframe/pull/444/files#diff-a9bcfb29d9c365ee0dd03456bdef86e93a812ea81bdada66f197d5e0d7631975
https://github.com/devframes/devframe/pull/444/files#diff-a9bcfb29d9c365ee0dd03456bdef86e93a812ea81bdada66f197d5e0d7631975
packages/devframe/src/types/devframe.tshttps://github.com/devframes/devframe/pull/444/files#diff-753444a22cd40457a3aeb4a48d0bda1e9c7768bca343ccf72f16699131320795
View file https://github.com/erkamyaman/devframe/blob/c5d482ee7db5bb1bca90084a58d637f0696ab883/packages/devframe/src/types/devframe.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/devframes/devframe/pull/444/{{ revealButtonHref }}
https://github.com/devframes/devframe/pull/444/files#diff-753444a22cd40457a3aeb4a48d0bda1e9c7768bca343ccf72f16699131320795
https://github.com/devframes/devframe/pull/444/files#diff-753444a22cd40457a3aeb4a48d0bda1e9c7768bca343ccf72f16699131320795
packages/hub/src/node/__tests__/initiate.test.tshttps://github.com/devframes/devframe/pull/444/files#diff-25706eadb28a322bb2a43ffff82c94d39cf906ed65c2d9a10b26ee6fc3d4e907
View file https://github.com/erkamyaman/devframe/blob/c5d482ee7db5bb1bca90084a58d637f0696ab883/packages/hub/src/node/__tests__/initiate.test.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/devframes/devframe/pull/444/{{ revealButtonHref }}
https://github.com/devframes/devframe/pull/444/files#diff-25706eadb28a322bb2a43ffff82c94d39cf906ed65c2d9a10b26ee6fc3d4e907
https://github.com/devframes/devframe/pull/444/files#diff-25706eadb28a322bb2a43ffff82c94d39cf906ed65c2d9a10b26ee6fc3d4e907
packages/hub/src/node/initiate.tshttps://github.com/devframes/devframe/pull/444/files#diff-500061a187e404009222ccd84a3d851545df0a3826241909a3b3b3d9580a4b02
View file https://github.com/erkamyaman/devframe/blob/c5d482ee7db5bb1bca90084a58d637f0696ab883/packages/hub/src/node/initiate.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/devframes/devframe/pull/444/{{ revealButtonHref }}
https://github.com/devframes/devframe/pull/444/files#diff-500061a187e404009222ccd84a3d851545df0a3826241909a3b3b3d9580a4b02
https://github.com/devframes/devframe/pull/444/files#diff-500061a187e404009222ccd84a3d851545df0a3826241909a3b3b3d9580a4b02
tests/__snapshots__/tsnapi/devframe/index.snapshot.d.tshttps://github.com/devframes/devframe/pull/444/files#diff-e36c6d402239a03e9a6e3a7c285d18780f3584e9dd275c7e5220a6fc41fb160d
View file https://github.com/erkamyaman/devframe/blob/c5d482ee7db5bb1bca90084a58d637f0696ab883/tests/__snapshots__/tsnapi/devframe/index.snapshot.d.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/devframes/devframe/pull/444/{{ revealButtonHref }}
https://github.com/devframes/devframe/pull/444/files#diff-e36c6d402239a03e9a6e3a7c285d18780f3584e9dd275c7e5220a6fc41fb160d
https://github.com/devframes/devframe/pull/444/files#diff-e36c6d402239a03e9a6e3a7c285d18780f3584e9dd275c7e5220a6fc41fb160d
Please reload this pagehttps://github.com/devframes/devframe/pull/444/files
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.