Document the HTTP shared-secret and trusted-hosts options of mcp_server(type = "http"), or add arguments for them
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 73/100
- issue の種類
- ドキュメント
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- r
調査の方向性
mcp_serverのヘルプページ、サーバーのビネット、README、NEWSを読みます。issueによると、現時点ではこれらのオプションを記載しているものはありません。既存のtest-server.Rにあるmcptools.http_shared_secretのテストを確認し、動作とヘッダー名を確かめます。ポートを含む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
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- 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 1週間以上 初心者へのやさしさ 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 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
AlexsLemonade/scpca-nf#1384 ·
-
Order the Vignettesオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
メンテナーはふだん 1 日以内に返信
-
bug
難易度 1/5 1時間未満 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
メンテナーはふだん 1 日以内に返信