View the source code for this module on GitHub: https://github.com/mcp-use/mcp-use/blob/main/libraries/python/mcp_use/server/templates/cli.py
copy_template
function copy_template
Copy the template to the target folder after replacing placeholders.from mcp_use.server.templates.cli import copy_template
SignatureParameter valueParameter valueDictionary of key-value pairs
def copy_template(template_dir: pathlib.Path, target_dir: pathlib.Path, context: dict[str, str]):
detect_installer
get_available_templates
install_dependencies
function install_dependencies
Prompt user to install dependencies and run the installer. Returns True if installed.from mcp_use.server.templates.cli import install_dependencies
ReturnsParameter value
Signature
def install_dependencies(target_dir: pathlib.Path):
main
render_template
function render_template
Replace {{KEY}} placeholders with context values.from mcp_use.server.templates.cli import render_template
ReturnsString valueDictionary of key-value pairs
Signature
def render_template(content: str, context: dict[str, str]):
run_install
function run_install
Run the installer, capturing output. Returns True on success.from mcp_use.server.templates.cli import run_install
ReturnsName identifierList of itemsParameter value
Signature
def run_install(name: str, cmd: list[str], target_dir: pathlib.Path):