What happened?
fastmcp dev inspector loads a filesystem server in the invoking Python process before it launches MCP Inspector and the configured uv run command. When a server imports a dependency supplied through --with, --with-editable, --with-requirements, or --project that is not installed in the caller's environment, the preliminary import raises ModuleNotFoundError and the configured subprocess never starts.
For example, a server that imports a package provided only through --with cannot be inspected even though the Inspector command is configured to install and run with that package.
The same preflight also imports the module and resolves its factory before launching fastmcp run, which imports the module and invokes the factory again. Factories with side effects therefore run twice.
Expected behavior: resolve and validate the server in the configured environment used by Inspector, and invoke its factory once for the server process.
Example Code
Version Information
- FastMCP main: `5baeacfe20eca735cb949564b4915f93a622b916`
- Python: 3.12.15
- OS: macOS 15.0.1 arm64
What happened?
fastmcp dev inspectorloads a filesystem server in the invoking Python process before it launches MCP Inspector and the configureduv runcommand. When a server imports a dependency supplied through--with,--with-editable,--with-requirements, or--projectthat is not installed in the caller's environment, the preliminary import raisesModuleNotFoundErrorand the configured subprocess never starts.For example, a server that imports a package provided only through
--withcannot be inspected even though the Inspector command is configured to install and run with that package.The same preflight also imports the module and resolves its factory before launching
fastmcp run, which imports the module and invokes the factory again. Factories with side effects therefore run twice.Expected behavior: resolve and validate the server in the configured environment used by Inspector, and invoke its factory once for the server process.
Example Code
Version Information