René's URL Explorer Experiment


Title: feat(mcp): support remote MCP servers over Streamable HTTP by gtxy27 · Pull Request #198 · lessweb/deepcode-cli · GitHub

Open Graph Title: feat(mcp): support remote MCP servers over Streamable HTTP by gtxy27 · Pull Request #198 · lessweb/deepcode-cli

X Title: feat(mcp): support remote MCP servers over Streamable HTTP by gtxy27 · Pull Request #198 · lessweb/deepcode-cli

Description: 背景 目前 Deep Code 的 MCP 客户端只支持本地 stdio 服务器(command + args),无法连接走 HTTP 的远程 MCP 服务(如 GitHub 官方远程 server、各类 SaaS)。本 PR 增加对 Streamable HTTP(MCP 2025-03-26) 远程服务器的支持。 改动 抽出传输层抽象 McpTransport(start/send/close/isConnected/decorateError)。原有 stdio 逻辑搬进 StdioTransport,McpClient 只保留 JSON-RPC 协议层(请求/响应配对、握手、通知分发),通过注入的 transport 收发——stdio 行为不变。 新增 HttpTransport:实现 Streamable HTTP——每条 JSON-RPC 消息用一次 HTTP POST 发送,响应可为单个 JSON 或 SSE 流;自动记录并回传 Mcp-Session-Id;支持自定义请求头(如 Authorization)。 配置解析:McpServerConfig 增加可选 type / url / headers;mergeMcpServers 识别远程条目(有 url 或 type: "http"),项目级覆盖用户级、headers 跨层合并。 文档:中英文 MCP 文档、bundled skill 引用、README FAQ 均补充远程配置说明。 配置示例 { "mcpServers": { "local": { "command": "npx", "args": ["-y", "..."] }, "remote": { "type": "http", "url": "https://example.com/mcp", "headers": { "Authorization": "Bearer " } } } } 测试 新增 HttpTransport 集成测试:本地起 node:http server,覆盖 JSON 与 SSE 两条响应路径 + session-id 回传。 新增远程配置合并单测。 既有 stdio 测试全部保持通过。 npm run check(typecheck + lint + format)通过;全量测试 0 失败。 实现说明 不引入任何新依赖:使用 Node 22 内置的全局 fetch / ReadableStream / AbortController。 测试不依赖外网,本地 mock server 即可跑。 范围 仅实现 Streamable HTTP。旧版 HTTP+SSE 双端点传输(2024-11-05)、OAuth 授权流程、server 主动推送的独立 GET 流不在本 PR 范围内。 兼容性 无破坏性变更:现有 stdio 服务器配置与行为完全不变;新增字段均为可选。

Open Graph Description: 背景 目前 Deep Code 的 MCP 客户端只支持本地 stdio 服务器(command + args),无法连接走 HTTP 的远程 MCP 服务(如 GitHub 官方远程 server、各类 SaaS)。本 PR 增加对 Streamable HTTP(MCP 2025-03-26) 远程服务器的支持。 改动 抽出传输层抽象 McpTransport(start/send/c...

X Description: 背景 目前 Deep Code 的 MCP 客户端只支持本地 stdio 服务器(command + args),无法连接走 HTTP 的远程 MCP 服务(如 GitHub 官方远程 server、各类 SaaS)。本 PR 增加对 Streamable HTTP(MCP 2025-03-26) 远程服务器的支持。 改动 抽出传输层抽象 McpTransport(start/send/c...

Opengraph URL: https://github.com/lessweb/deepcode-cli/pull/198

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:4f9d3ac7-eabb-727b-fc84-74da3b265435
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idA560:FCF93:10CE712:18A0344:6A4E38B8
html-safe-nonce461295f4687912fd5e60b6fab5828700b970c19f7410907616d86f145d1fefe0
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNTYwOkZDRjkzOjEwQ0U3MTI6MThBMDM0NDo2QTRFMzhCOCIsInZpc2l0b3JfaWQiOiI1NzA4NjY1NDg1NTkzMDMyODg4IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmacf61abdd26756b2a9b06057eebd1a828ab7bbb88dd76615b2672519905c0f9a8f
hovercard-subject-tagpull_request:3935663388
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/lessweb/deepcode-cli/pull/198/files
twitter:imagehttps://avatars.githubusercontent.com/u/59104199?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/59104199?s=400&v=4
og:image:alt背景 目前 Deep Code 的 MCP 客户端只支持本地 stdio 服务器(command + args),无法连接走 HTTP 的远程 MCP 服务(如 GitHub 官方远程 server、各类 SaaS)。本 PR 增加对 Streamable HTTP(MCP 2025-03-26) 远程服务器的支持。 改动 抽出传输层抽象 McpTransport(start/send/c...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None030096ee0db095447bfe77409d33bfac127ca7128299c58deef27c52eaa1b1f0
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/lessweb/deepcode-cli git https://github.com/lessweb/deepcode-cli.git
octolytics-dimension-user_id118287711
octolytics-dimension-user_loginlessweb
octolytics-dimension-repository_id1223512305
octolytics-dimension-repository_nwolessweb/deepcode-cli
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id1223512305
octolytics-dimension-repository_network_root_nwolessweb/deepcode-cli
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
release42a6d378d7587a44c93aca255096cd66b7c8eb2d
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/lessweb/deepcode-cli/pull/198/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Flessweb%2Fdeepcode-cli%2Fpull%2F198%2Ffiles
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
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
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://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/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Flessweb%2Fdeepcode-cli%2Fpull%2F198%2Ffiles
Sign up https://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=lessweb%2Fdeepcode-cli
Reloadhttps://github.com/lessweb/deepcode-cli/pull/198/files
Reloadhttps://github.com/lessweb/deepcode-cli/pull/198/files
Reloadhttps://github.com/lessweb/deepcode-cli/pull/198/files
Please reload this pagehttps://github.com/lessweb/deepcode-cli/pull/198/files
lessweb https://github.com/lessweb
deepcode-clihttps://github.com/lessweb/deepcode-cli
Notifications https://github.com/login?return_to=%2Flessweb%2Fdeepcode-cli
Fork 152 https://github.com/login?return_to=%2Flessweb%2Fdeepcode-cli
Star 1.7k https://github.com/login?return_to=%2Flessweb%2Fdeepcode-cli
Code https://github.com/lessweb/deepcode-cli
Issues 44 https://github.com/lessweb/deepcode-cli/issues
Pull requests 22 https://github.com/lessweb/deepcode-cli/pulls
Actions https://github.com/lessweb/deepcode-cli/actions
Projects https://github.com/lessweb/deepcode-cli/projects
Security and quality 0 https://github.com/lessweb/deepcode-cli/security
Insights https://github.com/lessweb/deepcode-cli/pulse
Code https://github.com/lessweb/deepcode-cli
Issues https://github.com/lessweb/deepcode-cli/issues
Pull requests https://github.com/lessweb/deepcode-cli/pulls
Actions https://github.com/lessweb/deepcode-cli/actions
Projects https://github.com/lessweb/deepcode-cli/projects
Security and quality https://github.com/lessweb/deepcode-cli/security
Insights https://github.com/lessweb/deepcode-cli/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Flessweb%2Fdeepcode-cli%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Flessweb%2Fdeepcode-cli%2Fissues%2Fnew%2Fchoose
gtxy27https://github.com/gtxy27
lessweb:mainhttps://github.com/lessweb/deepcode-cli/tree/main
gtxy27:feat/mcp-remote-transporthttps://github.com/gtxy27/deepcode-cli/tree/feat/mcp-remote-transport
Conversation 1 https://github.com/lessweb/deepcode-cli/pull/198
Commits 4 https://github.com/lessweb/deepcode-cli/pull/198/commits
Checks 0 https://github.com/lessweb/deepcode-cli/pull/198/checks
Files changed https://github.com/lessweb/deepcode-cli/pull/198/files
Please reload this pagehttps://github.com/lessweb/deepcode-cli/pull/198/files
feat(mcp): support remote MCP servers over Streamable HTTP https://github.com/lessweb/deepcode-cli/pull/198/files#top
Show all changes 4 commits https://github.com/lessweb/deepcode-cli/pull/198/files
ed145e0 refactor(mcp): extract transport abstraction from McpClient gtxy27 Jun 25, 2026 https://github.com/lessweb/deepcode-cli/pull/198/commits/ed145e07c6c687384af037794b7b46b4fc3f1077
5315fed feat(mcp): support remote servers over Streamable HTTP gtxy27 Jun 25, 2026 https://github.com/lessweb/deepcode-cli/pull/198/commits/5315fed86c9b13141787144a875848db131b6902
42efcf9 feat(settings): resolve remote MCP servers from mcpServers gtxy27 Jun 25, 2026 https://github.com/lessweb/deepcode-cli/pull/198/commits/42efcf9a0c17a3337cbf20cf398c491878819535
57fabc4 docs(mcp): document remote Streamable HTTP servers gtxy27 Jun 25, 2026 https://github.com/lessweb/deepcode-cli/pull/198/commits/57fabc4fcd3302ed0559d13b1a49afe1754ceebb
Clear filters https://github.com/lessweb/deepcode-cli/pull/198/files
Please reload this pagehttps://github.com/lessweb/deepcode-cli/pull/198/files
Please reload this pagehttps://github.com/lessweb/deepcode-cli/pull/198/files
README-en.md https://github.com/lessweb/deepcode-cli/pull/198/files#diff-423106708231f87bb4bc44163037961a21853bbcda4795297b34f4e0f048cfb6
README-zh_CN.md https://github.com/lessweb/deepcode-cli/pull/198/files#diff-099beda0196f3588b806c1d7ace4d054b6a1caf09bfede3b0c1a9ac7cfb74473
README.md https://github.com/lessweb/deepcode-cli/pull/198/files#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5
mcp.md https://github.com/lessweb/deepcode-cli/pull/198/files#diff-540fac6ea007bc938b77f99fe1f0766cf1ab7628ffed1d2830327fb2dab88c28
mcp_en.md https://github.com/lessweb/deepcode-cli/pull/198/files#diff-34dd6d2fca8e6558e3870efe928fda17b6f0d326a69f845fc3fb0a36105592bb
mcp-client.ts https://github.com/lessweb/deepcode-cli/pull/198/files#diff-5d02ace300c3bbae93b4acefe34edd6b14fa9a1a2e3227297ac40519f9b14727
mcp-http-transport.ts https://github.com/lessweb/deepcode-cli/pull/198/files#diff-03f2f78aa591319b554489f56ff93fbe4f7774370caa2fd97de242832b3117ca
mcp-manager.ts https://github.com/lessweb/deepcode-cli/pull/198/files#diff-e553be557e8b86d4309cf08a30cfb774d5b0b801d6f366bbf4c62acecd60ccd7
mcp-stdio-transport.ts https://github.com/lessweb/deepcode-cli/pull/198/files#diff-5913afe5409206da627759a91e5c55be6479e87395e14c7037c171bc1a5b2d72
mcp-transport.ts https://github.com/lessweb/deepcode-cli/pull/198/files#diff-a04a28bc8cc73ff67e1f271054a7e36f9f869f006837cab3c4a334349aa25460
settings.ts https://github.com/lessweb/deepcode-cli/pull/198/files#diff-dbb374fe62f23fdf770022c3b44c4d1d8ffbe3b81c6678a4f3e06ae045ebf83e
mcp-client.test.ts https://github.com/lessweb/deepcode-cli/pull/198/files#diff-efc19843731fcf4cc2291e9c50b1b2c53ef6f033031ffa6aa0ac2ce4e96016aa
settings-and-notify.test.ts https://github.com/lessweb/deepcode-cli/pull/198/files#diff-08afccad280438a8c538673f556ca66fcb83a15b7412a036f35ec82ef568b6b2
README.md https://github.com/lessweb/deepcode-cli/pull/198/files#diff-bc0755b71ebc8a4c9ec78146d7cda8563e230637c867ab17cb46eaea5faa3603
mcp.md https://github.com/lessweb/deepcode-cli/pull/198/files#diff-c8ce8ef66d18bb434577949c540d5e2aa232ea3fcb02e630b021a8432f8660af
mcp_en.md https://github.com/lessweb/deepcode-cli/pull/198/files#diff-3f5ff313dd5eea86f02eb8bd28babfed2570573ff333dc64a94889e0a0d68b98
README-en.mdhttps://github.com/lessweb/deepcode-cli/pull/198/files#diff-423106708231f87bb4bc44163037961a21853bbcda4795297b34f4e0f048cfb6
View file https://github.com/lessweb/deepcode-cli/blob/57fabc4fcd3302ed0559d13b1a49afe1754ceebb/README-en.md
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/lessweb/deepcode-cli/pull/198/{{ revealButtonHref }}
https://github.com/lessweb/deepcode-cli/pull/198/files#diff-423106708231f87bb4bc44163037961a21853bbcda4795297b34f4e0f048cfb6
https://github.com/lessweb/deepcode-cli/pull/198/files#diff-423106708231f87bb4bc44163037961a21853bbcda4795297b34f4e0f048cfb6
README-zh_CN.mdhttps://github.com/lessweb/deepcode-cli/pull/198/files#diff-099beda0196f3588b806c1d7ace4d054b6a1caf09bfede3b0c1a9ac7cfb74473
View file https://github.com/lessweb/deepcode-cli/blob/57fabc4fcd3302ed0559d13b1a49afe1754ceebb/README-zh_CN.md
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/lessweb/deepcode-cli/pull/198/{{ revealButtonHref }}
https://github.com/lessweb/deepcode-cli/pull/198/files#diff-099beda0196f3588b806c1d7ace4d054b6a1caf09bfede3b0c1a9ac7cfb74473
https://github.com/lessweb/deepcode-cli/pull/198/files#diff-099beda0196f3588b806c1d7ace4d054b6a1caf09bfede3b0c1a9ac7cfb74473
README.mdhttps://github.com/lessweb/deepcode-cli/pull/198/files#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5
View file https://github.com/lessweb/deepcode-cli/blob/57fabc4fcd3302ed0559d13b1a49afe1754ceebb/README.md
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/lessweb/deepcode-cli/pull/198/{{ revealButtonHref }}
https://github.com/lessweb/deepcode-cli/pull/198/files#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5
https://github.com/lessweb/deepcode-cli/pull/198/files#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5
docs/mcp.mdhttps://github.com/lessweb/deepcode-cli/pull/198/files#diff-540fac6ea007bc938b77f99fe1f0766cf1ab7628ffed1d2830327fb2dab88c28
View file https://github.com/lessweb/deepcode-cli/blob/57fabc4fcd3302ed0559d13b1a49afe1754ceebb/docs/mcp.md
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/lessweb/deepcode-cli/pull/198/{{ revealButtonHref }}
https://github.com/lessweb/deepcode-cli/pull/198/files#diff-540fac6ea007bc938b77f99fe1f0766cf1ab7628ffed1d2830327fb2dab88c28
https://github.com/lessweb/deepcode-cli/pull/198/files#diff-540fac6ea007bc938b77f99fe1f0766cf1ab7628ffed1d2830327fb2dab88c28
docs/mcp_en.mdhttps://github.com/lessweb/deepcode-cli/pull/198/files#diff-34dd6d2fca8e6558e3870efe928fda17b6f0d326a69f845fc3fb0a36105592bb
View file https://github.com/lessweb/deepcode-cli/blob/57fabc4fcd3302ed0559d13b1a49afe1754ceebb/docs/mcp_en.md
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/lessweb/deepcode-cli/pull/198/{{ revealButtonHref }}
https://github.com/lessweb/deepcode-cli/pull/198/files#diff-34dd6d2fca8e6558e3870efe928fda17b6f0d326a69f845fc3fb0a36105592bb
https://github.com/lessweb/deepcode-cli/pull/198/files#diff-34dd6d2fca8e6558e3870efe928fda17b6f0d326a69f845fc3fb0a36105592bb
Please reload this pagehttps://github.com/lessweb/deepcode-cli/pull/198/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.