fastmcp_runnerΒΆ

FastMCP Server Runner.

Manages the lifecycle of FastMCP servers registered in the system. Provides process management, monitoring, and integration with the discovery system.

AttributesΒΆ

ClassesΒΆ

FastMCPCLI

Command-line interface for FastMCP server management.

MCPProcessManager

Manages MCP server processes with monitoring and auto-restart.

FunctionsΒΆ

main()

Main CLI entry point.

Module ContentsΒΆ

class fastmcp_runner.FastMCPCLIΒΆ

Command-line interface for FastMCP server management.

async run_command(command: str, args: list[str])ΒΆ

Execute a CLI command.

managerΒΆ
class fastmcp_runner.MCPProcessManager(config_path: pathlib.Path | None = None)ΒΆ

Manages MCP server processes with monitoring and auto-restart.

get_server_status(server_name: str) dict[str, Any]ΒΆ

Get detailed status of a server.

list_running_servers() list[dict[str, Any]]ΒΆ

List all running servers with their status.

load_servers() dict[str, Any]ΒΆ

Load server configurations.

async monitor_servers()ΒΆ

Monitor running servers and restart if needed.

async restart_server(server_name: str) dict[str, Any]ΒΆ

Restart a server.

async start_monitoring()ΒΆ

Start the monitoring task.

async start_server(server_name: str) dict[str, Any]ΒΆ

Start a specific server.

async stop_all_servers()ΒΆ

Stop all running servers.

async stop_monitoring()ΒΆ

Stop the monitoring task.

async stop_server(server_name: str) dict[str, Any]ΒΆ

Stop a specific server.

config_pathΒΆ
monitor_task = NoneΒΆ
process_info: dict[str, dict[str, Any]]ΒΆ
processes: dict[str, subprocess.Popen]ΒΆ
async fastmcp_runner.main()ΒΆ

Main CLI entry point.

fastmcp_runner.loggerΒΆ