Repository navigation
Conversation
kvz
marked this pull request as ready for review
November 29, 2026 12:41
This branch has not been deployed
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.
Why
Coding agents can look up public Robot documentation and lint Assembly Instructions over hosted MCP before connecting a Workspace. A separate keyless route preserves the OAuth challenge and discovery flow on
/mcp.DSP-1652. Chosen design and questions for Tim and default-off search decision.
Changes
Product code. Embedders can configure
publicPathon the Node HTTP handler. Its public server card andtools/listadvertise the same three local tools:transloadit_list_robots,transloadit_get_robot_help, andtransloadit_lint_assembly_instructions. The public server registers only its allowlist and omits Workspace discovery and resources. Express and CLI entry points retain their existing routes. A later API2 PR wires up hosting and the rate limiter after the SDK package is released.Security considerations
The default public tools use no outbound HTTP, including linting Instructions that mention external URLs. The public route requires a host-supplied rate limiter and fails closed on errors or after two seconds. The callback receives an abort signal for timeouts, disconnects, and shutdown. All public POSTs, including invalid messages, count toward the caller’s budget. The limiter receives request headers and the socket address before the handler reads the body. The route caps bodies at 128 KiB, rejects batches, ignores Authorization before dispatch, defaults to wildcard CORS without credentials, honors an explicit origin allowlist, and returns 405 for an SSE GET. Public lint caps fix work and bounds its formatted diagnostics while computing the verdict from all issues. Robot list and help have bounded inputs.
The existing OAuth challenge remains on
/mcp. Its HTTP boundary checks for a bearer value, and API2 validates that value when tools make account calls. The API2 hosting PR needs to verify tokens before/mcpbypasses public limits if that separation is enforced at deployment. Embedders configure the Node HTTP server’s body-read timeout.Tim’s hosting decision.
publicDocsSearchdefaults to false. API2 can explicitly enable it after Tim approves first-party egress for anonymous callers. It adds onlytransloadit_search_docs. On a cache miss, search sends the query to the fixed first-partyhttps://transloadit.com/api/docs/search/endpoint with redirects disabled. It shares a five-minute, 500-entry cache and ten concurrent upstream slots across public server instances. An abandoned coalesced request can hold a slot until the upstream completes or its ten-second deadline expires. Search stays docs-only. Individual page retrieval, registry remotes, and the hosted rate-limit budget are covered by the design discussion.Plan and implementation details
The checked-out MCP package requires Node 22 or newer. Its existing search already uses the fixed URL, response bounds, and timeout, so this PR wraps it in a cache for the optional public search. Robot help accepts a legacy comma-separated argument as well as an array, so both forms receive a five-name limit. The Express router and the Node HTTP handler have separate request plumbing. The new options belong to the Node handler, where embedders can pass a callback. The Node SDK bounds diagnostic hydration using the serialized MCP issue format, so the public tool returns every diagnostic that fits its 32 KiB budget.
Validation
The initial red regression suite confirmed the unconfigured public route returned 404. The HTTP tests use a real Streamable HTTP client and cover the OAuth challenge, discovery and the server card, public and denied tools, CORS, SSE refusal, quotas, shutdown, and input and diagnostic limits. The default-profile test watches both fetch and Node HTTP for outbound requests. Optional search uses a stub at the outbound fetch boundary.
yarn check, the MCP TypeScript check, and all 423 MCP unit tests passed locally. The 60 focused HTTP and linter tests also passed on Node 22.23.5. The built SDK linter passed a smoke test on Node 20.10. The change adds 511 runtime lines. SDK CI for1542d57cpassed all 14 applicable checks on x64.Council
🤖 Claimed by kvz on
framework1/node-sdksince 2026-11-29 · resume:codex resume 01a226fb-da1c-7272-bad4-4104e8d6e26c