Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Expose HTTP request headers (e.g. Posit Connect user session token) to tools

オープン
#136 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
48/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
r
領域
backend

調査の方向性

Start by reading the mcptools server request handling and tool invocation code to see where incoming HTTP headers can be passed into a tool call. The issue suggests either an injected reserved argument or a request-scoped accessor, with concurrent calls and clear behavior outside a request as key constraints. Done means tools can read the triggering request headers safely, including the Posit Connect session token.

索引モデルが issue の本文から書いたものです。

説明

When an mcptools server is deployed to Posit Connect, tools have no way to read the incoming HTTP request. In particular, they can't read the HTTP_POSIT_CONNECT_USER_SESSION_TOKEN within the request header. Connect uses the token for viewer-based credentials, so without it a tool can't make downstream requests, such as database queries, as the calling user. It can only use the credentials of the deployed process.

Feature request:
Could mcptools provide a supported way for a tool to read the headers of the request that triggered it? This would make viewer-based credentials usable in tools deployed to Connect.

Implementation thoughts:

  • A reserved argument (e.g. .request) that mcptools injects and omits from the JSON schema seems the safest option. The value is passed directly into one call, so it can't leak between calls and doesn't depend on which mcptools version is loaded.
  • An accessor such as mcptools::mcp_request_headers(), valid only during tool execution, would also work. It would need to be stable across versions and fail clearly when called outside a request.
  • I would avoid a global option or env var. Both are process-wide, so concurrent or async tool calls could see each other's tokens. Env vars are also inherited by child processes.

I'm happy to help test and might also be able to contribute a PR.

主要言語
R
スター
204
フォーク
23
PR マージ指標
30日以内にマージされた PR はありません

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

posit-dev/mcptools のほかの issue

posit-dev/mcptools の issue をすべて見る

似ている issue

R の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。