[v0.8 MCP 1/4] establish generic MCP transport foundation - #1175
Open
sethkarten wants to merge 10 commits into
Open
[v0.8 MCP 1/4] establish generic MCP transport foundation#1175sethkarten wants to merge 10 commits into
sethkarten wants to merge 10 commits into
Conversation
The http_client branch built a bare httpx.AsyncClient, which uses httpx's default 5s read timeout. Long MCP tool calls (e.g. browser-rendered fetch_content) failed with ReadTimeout before the server replied. Pass headers into mcp.shared._httpx_utils.create_mcp_http_client instead so the transport gets the SDK defaults (30s / 300s SSE read) on an httpx2 client. (cherry picked from commit 2df5cf3)
(cherry picked from commit d0fefe2)
7 tasks
Contributor
Author
v0.8 stack checkpoint — 2026-08-11 15:50 UTCThis draft PR remains the GitHub MCP stack surface and will be kept current rather than leaving the active work local-only.
This is a progress checkpoint, not a readiness claim. |
sethkarten
marked this pull request as ready for review
August 11, 2026 18:12
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit ef91d50. Configure here.
# Conflicts: # packages/coding-agent/CHANGELOG.md
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.

Phase 1 / 4 — MCP transport foundation
Current head:
c374ca52d9eabbdcec26b3dda733b9bc35fa22c1Branch/base:
v080/mcp→mainScope
Establishes the generic HTTP MCP transport foundation only:
Authorizationheader, while anonymous servers preserve configured headers;enabled: falseis a hard gate before URL fallback, credential resolution, imports, or transport creation;McpDisabledwith settings +/reloadremediation, distinct from credential-onlyNotEnabled.M01 commands, OAuth native secret storage, project declaration execution, and later MCP phases are intentionally excluded.
Reconciliation and fixes
mainin mergeef91d500010beab85e8aa4bf14ec297e439a7f81; its incremental diff against that main parent is exactly the accepted eight-path foundation delta, with no dependency-consolidation drift.bf02700b0a6c1f1caa7d42eed86dca9c6b34cad8; the incremental diff remains exactly the nine-path foundation/error-taxonomy delta with release metadata preserved.r3753793711(disabled anonymous transport bypass) was fixed, replied to, and resolved.r3760580996(incorrect login guidance for disabled servers) was fixed bye6071221dcaeabe562c3e882fc25a729d91923d9, replied to, and resolved.Validation
c374ca52d9eabbdcec26b3dda733b9bc35fa22c1:git diff --checkpassed. Its diff frombf02700b0a6c1f1caa7d42eed86dca9c6b34cad8is exactly two deletions inpackages/coding-agent/CHANGELOG.md; the 0.7.2-and-older release content is unchanged.bf02700b0a6c1f1caa7d42eed86dca9c6b34cad8: focused host regression 16/16; focused runtime disabled-anonymous, disabled-credentialed, and lazyMcpDisabledexport regressions 3/3; TypeScripttsgo --noEmitandgit diff --checkpassed during reconciliation.McpDisabledappend with no code blockers.Review status
Ready for human review. The PR remains scoped to phase 1 and targets
main; it is not a merge or readiness claim for S01/M02/M03/ACP-MCP.Note
Establish generic MCP transport foundation with anonymous HTTP server support
McpManager.isAuthednow returnstruefor integrations with no OAuth orbearerTokenEnvVarconfigured, treating them as anonymous servers; themcp.configresponse gains explicitenabledandrequiresAuthflags.McpDisabledexception (exported fromrlm) to distinguish explicit host disablement fromNotEnabled, raised before any network or auth activity.McpIntegration._open_sessionin mcp_base.py skips bearer token resolution whenrequiresAuthis false; when auth is required, the bearer token is appended last so it overrides any staticAuthorizationheader.create_mcp_http_client) to inherit SDK timeout defaults, fixing prematureReadTimeouterrors on long SSE reads.requiresAuthdefault torequires_auth=Truefor backward compatibility.Macroscope summarized c374ca5.
Note
Medium Risk
Changes MCP connection, auth gating, and HTTP client setup in the kernel; behavior is contract-tested and backward-compatible for missing
requiresAuth, but misconfiguration could still affect integration connectivity.Overview
Phase 1 MCP transport foundation so kernel
McpIntegrationskills can talk to remote HTTP MCP servers without new agent tools.The host (
McpManager) treats HTTP entries with neitheroauthnorbearerTokenEnvVaras connectable without credentials, still honorsenabled: false, and extendsmcp.configwithenabledandrequiresAuthso the kernel gates before URL fallback or transport.The runtime adds
McpDisabled(settings +/reloadvs login), resolves connection via_resolve_connection_config, skips bearer injection whenrequiresAuthis false (keeping static headers, including non-BearerAuthorization), and uses the MCP SDKcreate_mcp_http_clienton thehttp_clienttransport path to avoid short read timeouts on long tool calls. MissingrequiresAuthfrom older hosts still defaults to authenticated.Docs/changelog describe anonymous servers, the new exception, and a phase-1 contract; focused TS/Python tests cover anonymous enablement, disabled gating, and header/timeout behavior.
Reviewed by Cursor Bugbot for commit c374ca5. Bugbot is set up for automated code reviews on this repo. Configure here.