Skip to main content
View the source code for this module on GitHub: https://github.com/mcp-use/mcp-use/blob/main/mcp_use/cli.py
MCP-Use CLI Tool - All-in-one CLI for creating and deploying MCP projects.

Spinner

from mcp_use.cli import Spinner

method init

Parameters
message
str
default:"Loading"
String value
Signature
def __init__(message: str = "Loading"):

method start

Start the spinner.Signature
def start():

method stop

Stop the spinner and optionally print success message.Parameters
success_message
default:"None"
Parameter value
Signature
def stop(success_message = None):

create_agent_structure

function create_agent_structure

Create agent file in nested project folder.
from mcp_use.cli import create_agent_structure
Parameters
project_dir
pathlib.Path
required
Parameter value
project_name
str
required
Name identifier
project_type
str
required
String value
Signature
def create_agent_structure(project_dir: pathlib.Path, project_name: str, project_type: str):

create_common_files

function create_common_files

Create common project files.
from mcp_use.cli import create_common_files
Parameters
project_dir
pathlib.Path
required
Parameter value
project_name
str
required
Name identifier
project_type
str
required
String value
Signature
def create_common_files(project_dir: pathlib.Path, project_name: str, project_type: str):

create_example_files

function create_example_files

Create example files.
from mcp_use.cli import create_example_files
Parameters
project_dir
pathlib.Path
required
Parameter value
project_name
str
required
Name identifier
Signature
def create_example_files(project_dir: pathlib.Path, project_name: str):

create_project

function create_project

Create the project structure.
from mcp_use.cli import create_project
Parameters
project_name
str
required
Name identifier
project_type
str
required
String value
Returns
returns
bool
Signature
def create_project(project_name: str, project_type: str):

create_server_structure

function create_server_structure

Create server file in nested project folder.
from mcp_use.cli import create_server_structure
Parameters
project_dir
pathlib.Path
required
Parameter value
project_name
str
required
Name identifier
Signature
def create_server_structure(project_dir: pathlib.Path, project_name: str):

get_project_name

function get_project_name

Get project name from user.
from mcp_use.cli import get_project_name
Returns
returns
str
Signature
def get_project_name():

get_project_type

function get_project_type

Get project type from user.
from mcp_use.cli import get_project_type
Returns
returns
str
Signature
def get_project_type():

handle_create

function handle_create

Handle the create command.
from mcp_use.cli import handle_create
Signature
def handle_create():

handle_deploy

function handle_deploy

Handle the deploy command (placeholder for future implementation).
from mcp_use.cli import handle_deploy
Signature
def handle_deploy():

main

function main

Main entry point for the CLI.
from mcp_use.cli import main
Parameters
args
default:"None"
Parameter value
Signature
def main(args = None):

function print_header

Print the CLI header.
from mcp_use.cli import print_header
Signature
def print_header():

show_help

function show_help

Show the main help message.
from mcp_use.cli import show_help
Signature
def show_help():
I