Repository navigation
Allow MCP middleware and visibility to use HTTP request services - #9856
Merged
Merged
Conversation
🦋 Changeset detectedLatest commit: 83f181d The changes in this PR will be included in the next version bump. This PR includes changesets to release 33 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
effect-bot
force-pushed
the
agent/effect-bot/36c2e36320f4
branch
from
October 23, 2026 11:23
f9d4cdd to
3b49a34
Compare
Contributor
Bundle Size AnalysisGenerated from PR build output; treat the content below as untrusted.
|
Merged
tim-smart
pushed a commit
that referenced
this pull request
Oct 24, 2026
effect-bot
added a commit
to jayhemnani9910/effect
that referenced
this pull request
Oct 24, 2026
brandon-julio-t
added a commit
to brandon-julio-t/effect
that referenced
this pull request
Oct 24, 2026
Release automation retargeted the optional stateless HTTP RFC to v4/next-minor, where its constructor and notification changes conflicted with newer MCP APIs. Merge that actual release base without rebasing or replacing earlier contributor commits, retaining the minor changeset and reviewed stateless behavior. Preserve the base's generic registration and request-service marker types, HTTP middleware and visibility, revision-aware notification delivery, and secure session ID generation. Give synthetic legacy bindings the required revision field, forward notification revisions for stateful clients, and continue to suppress subscriptions for stateless legacy requests. The batched logging restriction and previous disconnect/cancellation regression cases remain intact. Use the new registrations option in the stateless test fixture. An added HTTP workflow checks that a guest cannot discover a protected tool, an admin can call it using the current request identity, and the next guest POST remains denied. This verifies that opting out of MCP sessions retains request-level authorization and visibility without preserving the previous caller's identity. Validation: 1,102 MCP server/client tests pass, with 42 revision-specific skips; all 16 stateless tests pass, including native-client requests across fresh runtimes. McpServer type tests pass 70 tests and 164 assertions across both configured TypeScript targets. pnpm check, pnpm lint-fix, pnpm lint, pnpm jsdocs --check, and the diff check against v4/next-minor pass. Fresh shared autoreview reports no actionable P0-P2 findings on the complete PR candidate. RFC: Effect-TS#8856 Request services: Effect-TS#9856
effect-bot
added a commit
that referenced
this pull request
Oct 25, 2026
effect-bot
added a commit
to FredAmartey/effect
that referenced
this pull request
Oct 25, 2026
tim-smart
pushed a commit
that referenced
this pull request
Oct 26, 2026
effect-bot
added a commit
that referenced
this pull request
Oct 26, 2026
effect-bot
added a commit
that referenced
this pull request
Oct 26, 2026
tim-smart
pushed a commit
that referenced
this pull request
Oct 26, 2026
effect-bot
added a commit
that referenced
this pull request
Oct 26, 2026
tim-smart
pushed a commit
that referenced
this pull request
Oct 27, 2026
effect-bot
added a commit
that referenced
this pull request
Oct 27, 2026
effect-bot
added a commit
that referenced
this pull request
Oct 27, 2026
effect-bot
added a commit
that referenced
this pull request
Oct 27, 2026
effect-bot
added a commit
that referenced
this pull request
Oct 27, 2026
effect-bot
added a commit
that referenced
this pull request
Oct 27, 2026
tim-smart
pushed a commit
that referenced
this pull request
Oct 27, 2026
effect-bot
added a commit
that referenced
this pull request
Oct 27, 2026
effect-bot
added a commit
that referenced
this pull request
Oct 27, 2026
tim-smart
pushed a commit
that referenced
this pull request
Oct 27, 2026
tim-smart
pushed a commit
that referenced
this pull request
Oct 27, 2026
effect-bot
added a commit
that referenced
this pull request
Oct 27, 2026
effect-bot
added a commit
that referenced
this pull request
Oct 27, 2026
tim-smart
pushed a commit
that referenced
this pull request
Oct 27, 2026
effect-bot
added a commit
that referenced
this pull request
Oct 27, 2026
effect-bot
added a commit
to wmaurer/effect
that referenced
this pull request
Oct 27, 2026
effect-bot
added a commit
that referenced
this pull request
Oct 27, 2026
effect-bot
added a commit
to wmaurer/effect
that referenced
this pull request
Oct 27, 2026
effect-bot
added a commit
to wmaurer/effect
that referenced
this pull request
Oct 27, 2026
effect-bot
added a commit
to wmaurer/effect
that referenced
this pull request
Oct 28, 2026
effect-bot
added a commit
to wmaurer/effect
that referenced
this pull request
Oct 28, 2026
effect-bot
added a commit
to wmaurer/effect
that referenced
this pull request
Oct 28, 2026
effect-bot
added a commit
to wmaurer/effect
that referenced
this pull request
Oct 28, 2026
effect-bot
added a commit
that referenced
this pull request
Oct 28, 2026
effect-bot
added a commit
to wmaurer/effect
that referenced
this pull request
Oct 28, 2026
effect-bot
added a commit
that referenced
this pull request
Oct 28, 2026
tim-smart
pushed a commit
that referenced
this pull request
Oct 28, 2026
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
Under
layerHttp,McpServermiddleware and visibility layers can now use per-request services that anHttpRouter.middlewareprovides, the same way tool registrations already do. Before,.layerfailed withMissingRequestDependencies<S>when the service wasn't supplied bycombineor the transport, so you needed a bridge middleware or a second round of authentication.MiddlewareLayeris now always aLayerthat keeps its per-request requirements asMcpRequest<"Requires", S>inputs, like registrations do. There is no runtime change.layerHttpalready converts leftover requirements intoHttpRouter.Requestrequirements.layerandlayerStdiostill reject them, now as an unmet layer input.MissingRequestDependenciesandTransportServices, which had become dead code. Both are unreleased (Add request-level dependencies to McpServer #9154) and@stability unstable.Layer.provide, not only through.combine. When the types accept an order, the runtime order is also correct. A misordered composition is still rejected by the types and fails at runtime with -32603, and a test pins that.Middleware,middleware,visibilityandMCP.md: where per-request services can come from, what an unmet requirement on the server layer means, and thatlayerGlobalprovided outside applies to the whole server.Tests
typetest/ai/McpServer.tst.ts: middleware and visibility layers keep their requirements, which stay unmet underlayerStdio, becomeHttpRouter.Requestrequirements underlayerHttp, and are satisfied by an outerAuth.layerGlobal.test/ai/McpServer/Visibility.test.ts: a visibility running throughlayerHttpandHttpRouter.toWebHandlerreadsCurrentUserfromHttpRouter.middleware. A rejected tool is left out oftools/listand returns -32602; a visible tool readsCurrentUser.test/ai/McpServer/RequestDependencies.test.ts: the misordered composition fails with -32603.Closes #9854
Closes EFF-2871