modelcontextprotocol / modelcontextprotocol/python-sdk

[docs] How to run FastMCP with args or env vars?

未关闭 适合新手
#339 3 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

documentation P2 ready for work
主要语言
Python
星标
24.3k
派生
4k
平均合并
1 天 1 小时
30 天内合并 PR
31

描述

https://github.com/modelcontextprotocol/python-sdk/tree/main?tab=readme-ov-file#development-mode

# Development Mode
The fastest way to test and debug your server is with the MCP Inspector:

mcp dev server.py

# Add dependencies
mcp dev server.py --with pandas --with numpy

# Mount local code
mcp dev server.py --with-editable .

This didn't show how to run with args in dev mode.
Expected to see something like this:

mcp install server.py -v API_KEY=abc123 -v DB_URL=postgres://...
mcp install server.py -f .env

However this is not dev mode

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

从 README 的 Development Mode 部分以及现有的 mcp devmcp install 示例开始。检查开发命令如何接受服务器参数和环境变量,然后记录受支持的调用方式,或者说明限制和适当的替代方案。当新手能够根据更新后的说明,使用所需配置运行开发服务器时,即表示完成。

由索引模型根据 Issue 内容生成。

评估

技术栈
python
领域
cli, documentation
Issue 类型
文档
难度
2/5
预计耗时
1-3 小时
活跃度
冷清
描述清晰度
基本清楚
新手友好度
68/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。