Document the HTTP shared-secret and trusted-hosts options of mcp_server(type = "http"), or add arguments for them
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 73/100
- Issue 类型
- 文档
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- r
调研方向
阅读 mcp_server 帮助页面、服务器 vignette、README 和 NEWS;issue 表示目前这些文档都没有记录这些选项。检查 test-server.R 中针对 mcptools.http_shared_secret 的现有测试,以确认其行为和 header 名称。记录受支持的选项,包括精确匹配带端口的 Host,并明确说明支持哪些设置。
由索引模型根据 Issue 内容生成。
描述
Hi, and thanks for mcptools.
putior is on CRAN; its development version (to be released as 0.2.0) adds putior_mcp_server(), which can serve putior's tools over HTTP with mcptools::mcp_server(type = "http"). putior sets one of two options before calling it:
- With a token (putior requires one when the server listens on a non-loopback address), putior sets
mcptools.http_shared_secret;handle_http_request()then requires the headerPlumber-Shared-Secret. - Without a token (loopback only): putior adds the loopback names to
mcptools.http_trusted_hosts, whichhandle_http_request()compares with theHostheader as written, in addition to your Origin check.
Both options came with the Posit Connect engine (#106). The code that reads them is unchanged from 1.0.0 to 1.0.3 and on main (714803b), and test-server.R covers mcptools.http_shared_secret as an override of plumber2.sharedSecret. But none of ?mcp_server, the server vignette, the README or NEWS mentions them; ?mcp_server documents MCPTOOLS_PORT and MCPTOOLS_SOCKET_DIR, but not these.
If a later release read other settings, a putior server started with a token would answer requests that lack it, without an error. putior therefore sends mcptools' internal handle_http_request() test requests at start-up, and does not start unless the requests without the right secret or from an untrusted Host get 401/403 and a valid one does not. We would rather depend on a documented interface.
Would you consider one of these?
- Documenting
mcptools.http_shared_secretandmcptools.http_trusted_hostsin?mcp_server, with the header name and the exact Host match (port included).MCPTOOLS_HTTP_TRUSTED_HOSTS,mcptools.http_allowed_originsandMCPTOOLS_HTTP_ALLOWED_ORIGINScould go there too, if you want them supported. - Or arguments such as
mcp_server(..., shared_secret = NULL, trusted_hosts = NULL). - If these options are likely to change, a NEWS entry when they do would already help.
Happy to send a PR for the documentation.
- 主要语言
- R
- 星标
- 207
- 派生
- 24
- 平均合并
- 36 分钟
- 30 天内合并 PR
- 2
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
posit-dev/mcptools 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 76/100
-
难度 2/5 1-3 小时 新手友好度 20/100
-
难度 4/5 3-5 天 新手友好度 48/100
-
难度 5/5 一周以上 新手友好度 35/100
-
难度 4/5 3-5 天 新手友好度 48/100
查看 posit-dev/mcptools 的全部 Issue
相似的 Issue
-
num_ode_rk4_adaptive rejects atol = 0 while accepting rtol = 0 and while num_ode_dopri5 accepts both未关闭area/ode-pde good first issue help wanted kind/contract severity/4-minor
难度 2/5 1-3 小时 新手友好度 78/100
Apich-Organization/rssn#383 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 72/100
PRL-PRG/r-compile-server#70 · 1 条评论 ·
-
dependencies docker enhancement
难度 2/5 1-3 小时 新手友好度 74/100
posit-dev/images-workbench#257 ·
维护者通常 1 天内回复
-
dependencies docker enhancement
难度 2/5 1-3 小时 新手友好度 72/100
posit-dev/images-package-manager#188 ·
维护者通常 1 天内回复
-
dependencies docker enhancement
难度 2/5 1-3 小时 新手友好度 68/100
posit-dev/images-connect#222 ·
维护者通常 1 天内回复