Command Line Interface (CLI)

Configuration tool for setting up the JamfMCP server with AI platforms.

Overview

This CLI helps users configure JamfMCP to work with various AI platforms like Claude Desktop, Cursor, and others. It handles two installation modes:

  1. PyPI Mode (default): For users who installed JamfMCP from PyPI

  2. Development Mode (--dev): For developers working on JamfMCP source code

Both modes configure the MCP server to run locally on the user’s machine. The difference is how the server is invoked (uvx vs uv run).

Standalone functions

format_err(exc: Exception) None[source]

Format and display an error message to stderr.

Parameters:

exc (Exception) – The exception to format and display

Return type:

None

async validate_jamf_connection(url: str, credentials: dict[str, str]) bool[source]

Validate connection to Jamf Pro server.

Parameters:
  • url (str) – Jamf Pro server URL

  • credentials (dict[str, str]) – Authentication credentials

Returns:

True if connection is valid

Return type:

bool

check_uv_installed() bool[source]

Check if uv is installed.

Returns:

True if uv is installed

Return type:

bool

show_next_steps(platform: str, workspace: Path | None) None[source]

Display next steps after successful configuration.

Parameters:
  • platform (str) – The AI platform that was configured

  • workspace (Path | None) – Whether a workspace was specified (for Cursor, Gemini)

Returns:

None

Return type:

None

get_project_paths() Path[source]

Get the project root path for development mode.

Returns:

Path to the project root directory

Return type:

Path

get_config_path(platform: str, workspace: Path | None = None) Path[source]

Get the configuration file path for the specified platform.

Parameters:
  • platform (str) – The AI platform (claude-desktop, cursor, claude-code, gemini-cli)

  • workspace (Path | None) – Optional workspace directory for project-specific configurations

Returns:

Path to the platform’s configuration file

Return type:

Path

build_config(dev: bool, credentials: dict) dict[str, Any][source]

Build the MCP server configuration.

Parameters:
  • dev (bool) – Whether to configure for development mode

  • credentials (dict) – Jamf Pro credentials dictionary

Returns:

MCP server configuration dictionary

Return type:

dict[str, Any]

save_mcp_config(config: dict[str, Any], platform: str, workspace: Path | None) bool[source]

Save MCP configuration, merging with existing config if present.

Parameters:
  • config (dict[str, Any]) – The MCP server configuration to save

  • platform (str) – The platform being configured

  • workspace (Path | None) – Optional workspace path for cursor or Gemini

Returns:

True if successful

Return type:

bool

Tip

For a list of all options to pass to the CLI, see the CLI setup guide