You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[docs] How to run FastMCP with args or env vars? #339
# 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:
+1, --help also shows no possible options to add args. I think this is a missing feature. For env vars, you could walk-around by using .env then load it in the script, but for args, it is not possible yet.
I noticed the v2 MCP development documentation could use a bit more clarity around how mcp dev behaves. My plan is to update docs/run/index.md to mention that it:
inherits environment variables from the invoking shell,
supports --with and --with-editable for dependencies,
and doesn't forward arbitrary arguments to the server.
I'll keep the scope limited to documentation only. If that sounds good, I'd be happy to take this on. Thanks!
Activity
thadanguyen commentedon Aug 3, 2025
+1,
--helpalso shows no possible options to add args. I think this is a missing feature. For env vars, you could walk-around by using.envthen load it in the script, but for args, it is not possible yet.felixweinberger commentedon Oct 7, 2025
More support for expanded CLI docs
looney-blooper commentedon Jul 20, 2026
yelo! I'd like to work on this if it's available.
I noticed the v2 MCP development documentation could use a bit more clarity around how
mcp devbehaves. My plan is to updatedocs/run/index.mdto mention that it:--withand--with-editablefor dependencies,I'll keep the scope limited to documentation only. If that sounds good, I'd be happy to take this on. Thanks!