Labsco
dbanks-gh logo

Jamf Pro MCP Server

from dbanks-gh

A server for managing Apple devices through the Jamf Pro API.

๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅโœ“ VerifiedAccount requiredAdvanced setup

Jamf Pro MCP Server

A comprehensive MCP (Model Context Protocol) server that enables AI assistants to interact with Jamf Pro for complete Apple device management, including computers, mobile devices, policies, scripts, configuration profiles, packages, and reporting.

Features

Tools (Executable Functions)

Device Management

  • searchDevices: Find devices by name, serial number, IP address, or username (supports partial matching)
  • getDeviceDetails: Retrieve comprehensive device information by ID or name
  • checkDeviceCompliance: Find devices that haven't reported in X days (optimized for large fleets)
  • getDevicesBatch: Get details for multiple devices efficiently
  • updateInventory: Force inventory update on devices

Policy Management

  • listPolicies: List all policies in Jamf Pro
  • getPolicyDetails: Get detailed information about a specific policy by ID or name (includes scope, scripts with full content, and packages - you can see exactly what scripts and packages are attached to any policy)
  • searchPolicies: Search for policies by name or ID (supports partial matching)
  • executePolicy: Run policies on specific devices (policy and device can be specified by ID or name, requires confirmation)

Script Management

  • deployScript: Execute scripts for troubleshooting (with confirmation)
  • getScriptDetails: Get full script content and metadata including parameters, notes, and OS requirements

Configuration Profile Management

  • listConfigurationProfiles: List all configuration profiles (computer or mobile device)
  • getConfigurationProfileDetails: Get detailed information about a specific configuration profile
  • searchConfigurationProfiles: Search for configuration profiles by name
  • deployConfigurationProfile: Deploy a configuration profile to one or more devices (with confirmation)
  • removeConfigurationProfile: Remove a configuration profile from one or more devices (with confirmation)

Package Management

  • listPackages: List all packages with name, version, category, and size
  • getPackageDetails: Get detailed package information including metadata, requirements, and notes
  • searchPackages: Search packages by name, filename, or category
  • getPackageDeploymentHistory: Get deployment history and statistics for a package
  • getPoliciesUsingPackage: Find all policies that use a specific package

Computer Group Management

  • listComputerGroups: List computer groups (smart groups, static groups, or all)
  • getComputerGroupDetails: Get detailed information about a specific group including membership and smart group criteria
  • searchComputerGroups: Search for computer groups by name
  • getComputerGroupMembers: Get all members of a specific computer group
  • createStaticComputerGroup: Create a new static computer group with specified members (with confirmation)
  • updateStaticComputerGroup: Update the membership of a static computer group (with confirmation)
  • deleteComputerGroup: Delete a computer group (with confirmation)

Mobile Device Management

  • searchMobileDevices: Search for mobile devices by name, serial number, UDID, or other criteria
  • getMobileDeviceDetails: Get detailed information about a specific mobile device including hardware, OS, battery, and management status
  • listMobileDevices: List all mobile devices in Jamf Pro with basic information
  • updateMobileDeviceInventory: Force an inventory update on a specific mobile device
  • sendMDMCommand: Send MDM commands to mobile devices (lock, wipe, clear passcode, etc.) with confirmation for destructive actions
  • listMobileDeviceGroups: List mobile device groups (smart groups, static groups, or all)
  • getMobileDeviceGroupDetails: Get detailed information about a specific mobile device group including membership and criteria

Resources (Read-Only Data)

  • jamf://inventory/computers: Paginated device list
  • jamf://inventory/mobile-devices: Paginated mobile device list
  • jamf://reports/compliance: Security and patch compliance report
  • jamf://reports/mobile-device-compliance: Mobile device compliance report showing management status and issues
  • jamf://reports/storage: Disk usage analytics
  • jamf://reports/os-versions: OS version breakdown

Prompts (Workflow Templates)

  • troubleshoot-device: Step-by-step device troubleshooting
  • deploy-software: Software deployment workflow
  • compliance-check: Comprehensive compliance reporting
  • mass-update: Bulk device operations
  • storage-cleanup: Disk space management

Safety Features

  • Read-Only Mode: Set JAMF_READ_ONLY=true to prevent any modifications
  • Confirmation Required: Destructive operations require explicit confirmation
  • Error Handling: Comprehensive error messages and recovery
  • Rate Limiting: Respects Jamf Pro API limits
  • Audit Trail: All operations are logged

Enhanced Error Handling (v1.1.0)

The server now includes comprehensive error handling and retry logic:

Features

  • Automatic Retry: Exponential backoff for transient failures
  • Circuit Breaker: Prevents cascading failures
  • Enhanced Error Messages: Detailed error information with actionable suggestions
  • Request/Response Logging: Debug mode for troubleshooting
  • Rate Limiting: Built-in rate limiter to prevent API throttling

Configuration

Add these optional environment variables to your Claude Desktop config:

{
  "env": {
    "JAMF_USE_ENHANCED_MODE": "true",      // Enable enhanced features (default: false)
    "JAMF_MAX_RETRIES": "3",               // Max retry attempts (default: 3)
    "JAMF_RETRY_DELAY": "1000",            // Initial retry delay in ms (default: 1000)
    "JAMF_RETRY_MAX_DELAY": "10000",       // Max retry delay in ms (default: 10000)
    "JAMF_DEBUG_MODE": "false",            // Enable debug logging (default: false)
    "JAMF_ENABLE_RETRY": "true",           // Enable automatic retries (default: true)
    "JAMF_ENABLE_RATE_LIMITING": "false",  // Enable rate limiting (default: false)
    "JAMF_ENABLE_CIRCUIT_BREAKER": "false" // Enable circuit breaker (default: false)
  }
}

Error Types

The enhanced mode provides specific error types with helpful suggestions:

  • JamfAPIError: General API errors with status codes and suggestions
  • NetworkError: Connection issues with network troubleshooting tips
  • AuthenticationError: Auth failures with credential verification steps
  • RateLimitError: Rate limit errors with retry timing
  • ValidationError: Input validation errors with field-specific feedback

See docs/ERROR_HANDLING.md for detailed documentation.

Development

Local Development Setup

For local development without Claude Desktop, create a .env file:

cp .env.example .env
# Edit .env with your Jamf Pro credentials:
# JAMF_URL=https://your-instance.jamfcloud.com
# JAMF_CLIENT_ID=your-api-client-id
# JAMF_CLIENT_SECRET=your-api-client-secret
# JAMF_READ_ONLY=false

Running in Development Mode

npm run dev

Testing with MCP Inspector

npm run inspector

Running Tests

npm test

Security Considerations

  • Store credentials securely (use environment variables)
  • Use read-only mode when write access isn't needed
  • Regularly rotate API credentials
  • Monitor API usage for anomalies
  • Implement IP allowlisting in Jamf Pro if possible