feat: server-side MCP connector as a built-in tool

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

メンテナーはふだん 1 日以内に返信

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

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
30/100
issue の種類
機能追加
明瞭さ
説明が足りない
活発さ
静か
技術スタック
python
領域
api, tooling

調査の方向性

まず、既存のクライアント側エントリポイント register_mcp_tools_* と ToolBuiltIn の実装パターンをたどり、次に on_tool_request、ToolRejectError、PROVIDER_ANNOTATION_TYPES を調べます。OpenAI、Anthropic、Google のコネクタの契約を比較し、承認、認証、MCP イベントを chatlas にどのように組み込むべきかを決定します。合意された設計、プロバイダーのカバレッジ、コンテンツモデリング、テスト、ドキュメントが揃えば完了です。

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

説明

ai-triage:needs-review

chatlas already speaks MCP client-side (register_mcp_tools_http_stream_async() and friends): chatlas runs the MCP client, executes tool calls locally, and round-trips results. All three first-class providers now also offer a server-side MCP connector: you hand the provider a remote MCP server URL and the provider's infrastructure does tool discovery and invocation itself — no local MCP client, no async session to keep alive, works from restricted environments.

That makes it a natural next ToolBuiltIn after code execution:

chat.register_tool(tool_mcp(url="https://mcp.example.com", name="example"))

Provider mapping

Provider Tool spec Status
OpenAI (Responses) {"type": "mcp", "server_label": ..., "server_url": ..., "authorization": ..., "require_approval": ..., "allowed_tools": [...]} GA. Also supports OpenAI-maintained connectors (connector_id, e.g. Google Drive, Gmail). Docs
Anthropic mcp_servers request param + mcp_toolset tool type Beta (mcp-client-2025-11-20 header). Streamable HTTP/SSE, OAuth via authorization_token. Tools only (no prompts/resources). Docs
Google types.Tool(mcp_servers=[types.McpServer(name=..., streamable_http_transport=...)]) Experimental; Gemini API only (not Vertex). Docs

Design questions

  • Naming and docs positioning relative to the existing client-side register_mcp_tools_* functions — users will need a clear mental model of "chatlas executes the MCP tools" vs. "the provider executes the MCP tools" (and the privacy/latency trade-offs of each).
  • Approval flow: OpenAI's require_approval emits mcp_approval_request items that the client must answer. Can this map onto chatlas's existing tool-approval machinery (on_tool_request / ToolRejectError), or does it need its own surface?
  • Auth: how to pass tokens without persisting them in serialized turns.
  • Content modeling: what mcp_list_tools / mcp_call events look like as chatlas Content (probably new request/response content types in PROVIDER_ANNOTATION_TYPES, like search/fetch).
  • Anthropic's connector is not ZDR-eligible; worth a docs note.
主要言語
Python
スター
179
フォーク
32
平均マージ
1日 3時間
マージ済み PR(30日)
10

環境構築

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

はじめの一歩

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

posit-dev/chatlas のほかの issue

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

似ている issue

Python の issue をもっと見る

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

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