FlashMCP provides a command-line interface (CLI) that makes it easy to run, develop, and install your MCP servers. The CLI is automatically installed when you install FlashMCP.
FlashMCP --help

Commands Overview

CommandPurposeDependency Management
runRun a FlashMCP server directlyUses your current environment; you are responsible for ensuring all dependencies are available
devRun a server with the MCP Inspector for testingCreates an isolated environment; dependencies must be explicitly specified with --with and/or --with-editable
installInstall a server in the Claude desktop appCreates an isolated environment; dependencies must be explicitly specified with --with and/or --with-editable
versionDisplay version informationN/A

Command Details

run

Run a FlashMCP server directly or proxy a remote server.
FlashMCP run server.py
This command runs the server directly in your current Python environment. You are responsible for ensuring all dependencies are available.

Options

OptionFlagDescription
Transport--transport, -tTransport protocol to use (stdio, streamable-http, or sse)
Host--hostHost to bind to when using http transport (default: 127.0.0.1)
Port--port, -pPort to bind to when using http transport (default: 8000)
Log Level--log-level, -lLog level (DEBUG, INFO, WARNING, ERROR, CRITICAL)

Server Specification

New in version: 2.3.5
The server can be specified in three ways:
  1. server.py - imports the module and looks for a FlashMCP object named mcp, server, or app. Errors if no such object is found.
  2. server.py:custom_name - imports and uses the specified server object
  3. http://server-url/path or https://server-url/path - connects to a remote server and creates a proxy
When using FlashMCP run with a local file, it ignores the if __name__ == "__main__" block entirely. Instead, it finds your server object and calls its run() method directly with the transport options you specify. This means you can use FlashMCP run to override the transport specified in your code.
For example, if your code contains:
# server.py
from FlashMCP import FlashMCP

mcp = FlashMCP("MyServer")

@mcp.tool()
def hello(name: str) -> str:
    return f"Hello, {name}!"

if __name__ == "__main__":
    # This is ignored when using `FlashMCP run`!
    mcp.run(transport="stdio")
You can run it with Streamable HTTP transport regardless of what’s in the __main__ block:
FlashMCP run server.py --transport streamable-http --port 8000
Examples
# Run a local server with Streamable HTTP transport on a custom port
FlashMCP run server.py --transport streamable-http --port 8000

# Connect to a remote server and proxy as a stdio server
FlashMCP run https://example.com/mcp-server

# Connect to a remote server with specified log level
FlashMCP run https://example.com/mcp-server --log-level DEBUG

dev

Run a MCP server with the MCP Inspector for testing.
FlashMCP dev server.py
This command runs your server in an isolated environment. All dependencies must be explicitly specified using the --with and/or --with-editable options.
The dev command is a shortcut for testing a server over STDIO only. When the Inspector launches, you may need to:
  1. Select “STDIO” from the transport dropdown
  2. Connect manually
This command does not support HTTP testing. To test a server over HTTP:
  1. Start your server manually with HTTP transport using either:
    FlashMCP run server.py --transport streamable-http
    
    or
    python server.py  # Assuming your __main__ block sets HTTP transport
    
  2. Open the MCP Inspector separately and connect to your running server

Options

OptionFlagDescription
Editable Package--with-editable, -eDirectory containing pyproject.toml to install in editable mode
Additional Packages--withAdditional packages to install (can be used multiple times)
Inspector Version--inspector-versionVersion of the MCP Inspector to use
UI Port--ui-portPort for the MCP Inspector UI
Server Port--server-portPort for the MCP Inspector Proxy server
Example
# Run dev server with editable mode and additional packages
FlashMCP dev server.py -e . --with pandas --with matplotlib

install

Install a MCP server in the Claude desktop app.
FlashMCP install server.py
This command installs your server in an isolated environment. All dependencies must be explicitly specified using the --with and/or --with-editable options.
The install command currently only sets up servers for STDIO transport. When installed in the Claude desktop app, your server will be run using STDIO regardless of any transport configuration in your code.

Options

OptionFlagDescription
Server Name--name, -nCustom name for the server
Editable Package--with-editable, -eDirectory containing pyproject.toml to install in editable mode
Additional Packages--withAdditional packages to install (can be used multiple times)
Environment Variables--env-var, -vEnvironment variables in KEY=VALUE format (can be used multiple times)
Environment File--env-file, -fLoad environment variables from a .env file
Example
# Install server with custom name, dependencies, and environment variables
FlashMCP install server.py -n "My Analysis Server" -e . --with pandas --env-var API_KEY=12345

version

Display version information about FlashMCP and related components.
FlashMCP version