Document the HTTP shared-secret and trusted-hosts options of mcp_server(type = "http"), or add arguments for them
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 73/100
- Loại issue
- Tài liệu
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- r
- Lĩnh vực
- documentation
Hướng nghiên cứu
Đọc trang trợ giúp mcp_server, vignette về máy chủ, README và NEWS; issue cho biết hiện không có tài liệu nào trong số này mô tả các tùy chọn đó. Kiểm tra các bài kiểm thử hiện có trong test-server.R cho mcptools.http_shared_secret để xác nhận hành vi và tên header. Tài liệu hóa các tùy chọn được hỗ trợ, bao gồm việc khớp chính xác Host kèm cổng, và nêu rõ những thiết lập nào được hỗ trợ.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- R
- Star
- 207
- Fork
- 24
- Merge trung bình
- 36 phút
- Pull request đã merge (30 ngày)
- 2
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của posit-dev/mcptools
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 20/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
Tất cả issue của posit-dev/mcptools
Issue tương tự
-
num_ode_rk4_adaptive rejects atol = 0 while accepting rtol = 0 and while num_ode_dopri5 accepts bothĐang mởarea/ode-pde good first issue help wanted kind/contract severity/4-minor
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Apich-Organization/rssn#383 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Make sure salmon and alevin-fry versions (and mapped reads) are not `null` in the output JSONĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
AlexsLemonade/scpca-nf#1384 ·
-
Order the VignettesĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
Maintainer thường phản hồi trong vòng 1 ngày