@@ -10,7 +10,7 @@ FastMCP run command implementation with enhanced type hints.
1010
1111## Functions
1212
13- ### ` is_url ` <sup ><a href = " https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/cli/run.py#L29 " target = " _blank" ><Icon icon = " github" style = " width: 14px; height: 14px;" /></a ></sup >
13+ ### ` is_url ` <sup ><a href = " https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/cli/run.py#L28 " target = " _blank" ><Icon icon = " github" style = " width: 14px; height: 14px;" /></a ></sup >
1414
1515``` python
1616is_url(path: str ) -> bool
@@ -20,7 +20,7 @@ is_url(path: str) -> bool
2020Check if a string is a URL.
2121
2222
23- ### ` run_with_uv ` <sup ><a href = " https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/cli/run.py#L35 " target = " _blank" ><Icon icon = " github" style = " width: 14px; height: 14px;" /></a ></sup >
23+ ### ` run_with_uv ` <sup ><a href = " https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/cli/run.py#L34 " target = " _blank" ><Icon icon = " github" style = " width: 14px; height: 14px;" /></a ></sup >
2424
2525``` python
2626run_with_uv(server_spec: str , python_version: str | None = None , with_packages: list[str ] | None = None , with_requirements: Path | None = None , project: Path | None = None , transport: TransportType | None = None , host: str | None = None , port: int | None = None , path: str | None = None , log_level: LogLevelType | None = None , show_banner: bool = True , editable: str | list[str ] | None = None ) -> None
@@ -29,6 +29,10 @@ run_with_uv(server_spec: str, python_version: str | None = None, with_packages:
2929
3030Run a MCP server using uv run subprocess.
3131
32+ This function is called when we need to set up a Python environment with specific
33+ dependencies before running the server. The config parsing and merging should already
34+ be done by the caller.
35+
3236** Args:**
3337- ` server_spec ` : Python file, object specification (file\: obj), config file, or URL
3438- ` python_version ` : Python version to use (e.g. "3.10")
@@ -41,9 +45,10 @@ Run a MCP server using uv run subprocess.
4145- ` path ` : Path to bind to when using http transport
4246- ` log_level ` : Log level
4347- ` show_banner ` : Whether to show the server banner
48+ - ` editable ` : Editable package paths
4449
4550
46- ### ` create_client_server ` <sup ><a href = " https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/cli/run.py#L170 " target = " _blank" ><Icon icon = " github" style = " width: 14px; height: 14px;" /></a ></sup >
51+ ### ` create_client_server ` <sup ><a href = " https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/cli/run.py#L115 " target = " _blank" ><Icon icon = " github" style = " width: 14px; height: 14px;" /></a ></sup >
4752
4853``` python
4954create_client_server(url: str ) -> Any
@@ -59,7 +64,7 @@ Create a FastMCP server from a client URL.
5964- A FastMCP server instance
6065
6166
62- ### ` create_mcp_config_server ` <sup ><a href = " https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/cli/run.py#L190 " target = " _blank" ><Icon icon = " github" style = " width: 14px; height: 14px;" /></a ></sup >
67+ ### ` create_mcp_config_server ` <sup ><a href = " https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/cli/run.py#L135 " target = " _blank" ><Icon icon = " github" style = " width: 14px; height: 14px;" /></a ></sup >
6368
6469``` python
6570create_mcp_config_server(mcp_config_path: Path) -> FastMCP[None ]
@@ -69,7 +74,7 @@ create_mcp_config_server(mcp_config_path: Path) -> FastMCP[None]
6974Create a FastMCP server from a MCPConfig.
7075
7176
72- ### ` load_fastmcp_config ` <sup ><a href = " https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/cli/run.py#L201 " target = " _blank" ><Icon icon = " github" style = " width: 14px; height: 14px;" /></a ></sup >
77+ ### ` load_fastmcp_config ` <sup ><a href = " https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/cli/run.py#L146 " target = " _blank" ><Icon icon = " github" style = " width: 14px; height: 14px;" /></a ></sup >
7378
7479``` python
7580load_fastmcp_config(config_path: Path) -> FastMCPConfig
@@ -85,7 +90,7 @@ Load a FastMCP configuration from a fastmcp.json file.
8590- FastMCPConfig object
8691
8792
88- ### ` run_command ` <sup ><a href = " https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/cli/run.py#L219 " target = " _blank" ><Icon icon = " github" style = " width: 14px; height: 14px;" /></a ></sup >
93+ ### ` run_command ` <sup ><a href = " https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/cli/run.py#L163 " target = " _blank" ><Icon icon = " github" style = " width: 14px; height: 14px;" /></a ></sup >
8994
9095``` python
9196run_command(server_spec: str , transport: TransportType | None = None , host: str | None = None , port: int | None = None , path: str | None = None , log_level: LogLevelType | None = None , server_args: list[str ] | None = None , show_banner: bool = True , use_direct_import: bool = False , skip_source: bool = False ) -> None
@@ -107,7 +112,7 @@ Run a MCP server or connect to a remote one.
107112- ` skip_source ` : Whether to skip source preparation step
108113
109114
110- ### ` run_v1_server ` <sup ><a href = " https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/cli/run.py#L341 " target = " _blank" ><Icon icon = " github" style = " width: 14px; height: 14px;" /></a ></sup >
115+ ### ` run_v1_server ` <sup ><a href = " https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/cli/run.py#L284 " target = " _blank" ><Icon icon = " github" style = " width: 14px; height: 14px;" /></a ></sup >
111116
112117``` python
113118run_v1_server(server: FastMCP1x, host: str | None = None , port: int | None = None , transport: TransportType | None = None ) -> None
0 commit comments