Replies: 7 comments
|
Hi @dwbimstr, thanks for starting this discussion! 👋 The Theia community will take a look soon. In the meantime, you might find helpful information in: 💙 Eclipse Theia is built and maintained by a community of contributors and sponsors. If Theia is valuable to your work, consider sponsoring the project. For professional support, training, or consulting services, learn more about available options. |
|
Hi @dwbimstr, |
|
Update — RFC Q3 answered with implementation (commit Hi @ndoschek @eneufeld — pushed an answer to the RFC's open Q3 ("expose
The other open RFC questions (Q1 add-vs-filter, Q2 credential parallelism, Q4 sequencing, Q5 priority constants, Q6 credential request shape, Q7 copyright) didn't gather new evidence from the downstream work — leaving those open for your judgement on this PR. Diff: 5 files, +224/−1. Happy to split, shrink, or revert if maintainers prefer Q3 stays "later RFC" — easy to drop the commit. |
|
The four extension points make sense, especially if Theia needs to support enterprise MCP deployments where transport, credentials, and tool policy are rarely one-size-fits-all. I would be careful about the order of responsibility:
The security-sensitive part is the tool filter. It should be able to filter by server identity, tool name, input schema, write capability, resource scope, and workspace trust level. A string-name allowlist is useful, but insufficient for MCP servers that expose broad tools with dangerous parameter combinations. For downstream IDEs, it would also help if the public API could expose an effective MCP manifest after filtering. That makes diagnostics and user consent clearer: "these are the tools this agent can actually see and why." |
|
@musaabhasan - this is great feedback. let me think through the changes i would need to do for this. I also been doing a lot around agentgateway (solo.io) work. let me give another pass at security aspects and get back. Thank you for replying - really appreciate that. |
|
@musaabhasan thanks for the careful read — pushed two follow-ups to #17376 today that pick up two of your three points.
What I'm sketching next, holding for your input on shape:
One honest question on Happy to push the filter-context + headersHelper bits onto the same PR or split into a follow-up — let me know your preference. |
|
Quick ping — both this thread and #17376 have been quiet for ~3 weeks since the F / H / I commits landed. @musaabhasan, did the responsibility-flow + @ndoschek @eneufeld, no rush at all — just a quick steer on sequencing (whether to keep F/H/I stacked on the same PR or split them off into a follow-up) would help me plan the next pass. Happy either way. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
RFC: Extension points for
@theia/ai-mcpHi Theia maintainers — proposing four contribution-point types for
@theia/ai-mcpso downstream projects (Sutra IDE, plus a handful of enterprise Theia distros) can plug into MCP transport, credential resolution, tool filtering, and client instantiation without forking the package.Single draft PR with the full proposal: #17376
Motivation
@theia/ai-mcptoday owns the entire MCP lifecycle: config, stdio/HTTP/SSE transports, credential reading via preferences, and client creation. That's the right default for most deployments, but it leaves no room for:We're currently forced to fork the package, and so are at least two enterprise distros we've talked to.
Proposal — four extension points
Each is a
ContributionProvider<T>contribution point. Built-in providers ship withpriority: 0and match today's behaviour bit-for-bit.MCPTransportProviderMCPServerDescriptionMCPCredentialResolverMCPToolFilterToolInvocationRegistryMCPClientFactoryClientwrapping for instrumentationFull types + docstrings are in #17376. Quick preview:
Delivery shape
Now a single consolidated draft PR (#17376) with one commit per phase so reviewers can inspect each phase in isolation. Originally filed as four per-phase PRs (#17376 A, #17378 B, #17379 C, #17380 D) — the per-phase PRs have been closed and their commits rolled into #17376. Either shape is fine by me; please flag preference on #17376 and I'll re-push accordingly.
4e45089) — public type surface only. ~370 LOC incl. tests. Zero existing code touched beyondcommon/index.tsre-exports.afa7bc6) — wireContributionProvider<T>lookup intoMCPServerManager/MCPServer; add default built-ins for stdio, HTTP/SSE, passthrough tool filter, and@modelcontextprotocol/sdkclient factory. All invariants of the existing test suite preserved.e0ba0f9) —${env:VAR}sentinel-backed credential resolver + preference-fallback resolver, wired as a priority chain. Unblocks OAuth / keychain plugins.362e3be) — documentation + migration guide underpackages/ai-mcp/README.mdandpackages/ai-mcp/doc/MIGRATION.md.Compatibility
${env:VAR}sentinel is strictly opt-in; preferences that carry inline credentials today keep working exactly as they do now.Prior art in Theia
The extension-point shape mirrors Theia's existing
ContributionProvider<T>pattern used forCommandContribution,FileServiceContribution, etc. Plugin authors already know how to contribute services; no new mental model. Default providers are bound withbindRootContributionProviderper the coding guideline.Questions I'd like guidance on
ToolInvocationRegistryif they want to add entries.undefinedwins) rather than parallel resolution to keep refresh semantics predictable. Happy to revisit.MCPClientevents —onToolAdded,onClose, etc. are on the internal client today; should I promote them in the public interface, or leave that for a later RFC?0/50/100as conventions. Promote to exported constants or keep as free integers likeFrontendApplicationContributionordering today?MCPCredentialRequestexposes{ serverName, field, literal? }. Shouldfieldbe a strongly-typed enum ('auth-token' | 'header' | 'custom') or kept as a free string?Copyright (C) 2026 Sutra IDE contributors.— happy to adjust to whatever attribution convention maintainers prefer for external contributions. ECA sign-off pending.Broader impact
Beyond Sutra, this unlocks:
Full RFC doc with the gory detail (work breakdown, test strategy, API migration notes): https://github.com/dwbimstr/theia-sutra-ide/blob/main/docs/theia-mcp-extension-points-rfc.md
Happy to restructure, split, shrink, or rewrite any of this based on your guidance.
Thanks for maintaining
@theia/ai-mcp; we've gotten a huge amount of mileage out of it.All reactions