Docs: quickstart MCP configs use unpinned `npx -y`, contradicting the Local Server Security guide

未關閉 適合新手
#3,431 25 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 1 天內回覆

還沒有人認領這個 Issue。

評估

難度
2/5
預估耗時
1-3 小時
新手友好度
83/100
Issue 類型
文件
描述清晰度
描述清楚
活躍度
活躍
技術堆疊
typescript
領域
documentation

研究方向

先查看 docs/develop/connect-local-servers.mdx 和 docs/examples.mdx 中列出的範例,接著檢查 docs/develop/build-client.mdx 和 docs/tools/debugging.mdx,找出相同未固定版本的 npx 設定。將它們與本機伺服器安全指南進行比較。完成標準是:入門範例使用固定版本的套件,並包含一句連結至該指南的文字。

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

描述

What's broken?

The documentation is wrong or misleading

Where in the spec or docs?

https://modelcontextprotocol.io/docs/develop/connect-local-servers and https://modelcontextprotocol.io/examples

What should happen?

The beginner examples should follow the Local Server Security guide, which says to "Install a specific version rather than latest". For example "args": ["-y", "@modelcontextprotocol/[email protected]", ...], plus one sentence linking to that guide.

What actually happens?

The pages people copy from start every server unpinned: docs/develop/connect-local-servers.mdx (lines 100, 116, 216, 220, 273), docs/examples.mdx (lines 43, 50, 66 to 78), docs/develop/build-client.mdx (961) and docs/tools/debugging.mdx (131), in both the 2026-07-28 and draft versions. Each launch can fetch whatever was published last.

The pattern is widespread. In a random sample of 2,999 public GitHub repositories that ship agent skills or MCP configs, 159 of the 346 repositories that configure a local MCP server (46.0%) start at least one with no pinned version, and 63 of 346 (18.2%) ask for latest outright. A hand check found 19 of 22 findings correct. Caveat: it is a sample of what GitHub code search surfaces, not a census. Data and method: https://github.com/basitalisandhu/agent-skills-state-2026

Anything else?

The registry already rejects latest and version ranges for server.json packages (internal/validators/validators.go), so these docs are the main place that still teaches the unpinned form. If maintainers agree, I am happy to open the docs PR.

AI disclosure: I used Claude Code to help prepare the analysis and draft this issue.

主要語言
TypeScript
星號
9.8k
分支
1.9k
平均合併
2 天 4 小時
30 天內合併 PR
73

環境準備

  • 沒有 Dockerfile 或 Docker Compose 檔案
  • 沒有 Pull Request 範本
  • 閱讀貢獻指南

從這裡開始

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

modelcontextprotocol/modelcontextprotocol 的其他 Issue

查看 modelcontextprotocol/modelcontextprotocol 的全部 Issue

相似的 Issue

更多 TypeScript Issue

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

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