modelcontextprotocol / modelcontextprotocol/python-sdk

Audit MCPServer constructor parameters

未關閉
#2,052 1 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

enhancement v2
主要語言
Python
星號
24.3k
分支
4k
平均合併
1 天 1 小時
30 天內合併 PR
31

描述

From the V2 checklist in #1253:

We need to recheck the constructor parameters of the MCPServer class. I did remove and refactor a bit, but we need to audit it a bit better.

PR #1732 renamed FastMCP to MCPServer and moved transport-specific options (host, port, stateless_http, etc.) to run(). However, the constructor still has parameters that may need further review:

  • Are all remaining constructor parameters appropriate for the constructor vs. run()?
  • Are there parameters that should be removed, renamed, or have their defaults reconsidered?
  • Is the constructor signature clean and minimal for the common case?

This is a follow-up audit to ensure the MCPServer API surface is well-designed before V2 stabilizes.

Ref: Kludex's V2 checklist in #1253, follow-up to #1732

貢獻指南

開啟貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

研究方向

首先檢視 MCPServer 建構函式及其 run() 進入點,同時查看 PR #1732 中的變更以及 #1253 中的 V2 檢查清單。稽核哪些參數應屬於哪個 API,並記錄或測試由此得出的決策,讓建構函式保持最小化且適用於 V2。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
python
領域
backend-api-design
Issue 類型
重構
難度
5/5
預估耗時
一週以上
活躍度
冷清
描述清晰度
需要釐清
新手友好度
35/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。