Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

everything: bind the HTTP transports to loopback by default, with HOST to widen

未关闭 适合新手
#5,371 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
72/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃

调研方向

从 transports/listen.ts 和 issue #3303 中的参考原型入手,了解两个 HTTP transport 是如何启动的。检查 README 中关于 everything 服务器及其环境变量的部分。完成标准是:两个 transport 默认绑定到 127.0.0.1,HOST 可以扩大绑定范围,并且 README 记录这两种行为。

由索引模型根据 Issue 内容生成。

描述

enhancement server-everything v2

Problem

The everything server's HTTP transports (Streamable HTTP and the deprecated HTTP+SSE) call app.listen(port) with no host (transports/listen.ts), so they bind to every network interface. A developer who starts the server over HTTP on a laptop exposes its tools to every host on the local network, not just to clients on the same machine. Browser access is already restricted to localhost origins (#5241), but a non-browser client on the LAN sends no Origin header and is let through.

Expected behavior

The HTTP transports bind to the loopback interface (127.0.0.1) by default, and a HOST environment variable (for example HOST=0.0.0.0) widens the bind deliberately, as a container image does (#3309). The README documents the variable and the default.

Reference prototype

#3303 by @TheodorNEngoy binds both HTTP transports to 127.0.0.1 by default with a HOST override (its CORS half has since shipped in #5241). It was opened before this repository moved to issues-only contributions, and is closed in favor of this issue; it serves as the reference prototype for the fix, and its author will be credited when the fix ships.

主要语言
TypeScript
星标
91.6k
派生
11.9k
平均合并
4 小时 38 分钟
30 天内合并 PR
241

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

modelcontextprotocol/servers 的其他 Issue

查看 modelcontextprotocol/servers 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。