No description
Find a file
Zepheris af9cccbaa1 Initial commit: Tactical RMM MCP Server
- MCP server implementation for Tactical RMM integration with Claude AI
- 16 tools for agent management, script execution, alerts, and monitoring
- Async HTTP client with Pydantic validation
- Full documentation and setup instructions
- Compatible with mcp 1.26.0+ and Python 3.11+

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-03-21 15:21:39 -06:00
.gitignore Initial commit: Tactical RMM MCP Server 2026-03-21 15:21:39 -06:00
CLAUDE.md Initial commit: Tactical RMM MCP Server 2026-03-21 15:21:39 -06:00
README.md Initial commit: Tactical RMM MCP Server 2026-03-21 15:21:39 -06:00
requirements.txt Initial commit: Tactical RMM MCP Server 2026-03-21 15:21:39 -06:00
Tactical RMM API.yaml Initial commit: Tactical RMM MCP Server 2026-03-21 15:21:39 -06:00
trmm_mcp_server.py Initial commit: Tactical RMM MCP Server 2026-03-21 15:21:39 -06:00

Tactical RMM MCP Server

A Model Context Protocol (MCP) server that enables Claude AI to interact with Tactical RMM (Remote Monitoring and Management) infrastructure. This server bridges Claude with your RMM system, allowing AI agents to manage, monitor, and automate tasks across distributed devices.

Features

  • Agent Management - List, monitor, and update agents
  • Script Management - Create, update, and execute scripts on agents
  • Alerts & Monitoring - Access alerts, event logs, and system information
  • Patch Management - Check Windows update status
  • Client/Site Management - Manage customers and locations

Prerequisites

  • Python 3.11+ (3.12+ recommended)
  • Tactical RMM instance running and accessible
  • Tactical RMM API Key with appropriate permissions
  • Claude App (v0.3.0+) or Claude Code (latest version)

Installation

1. Clone or Download the Repository

cd TacticalRMM-mcp

2. Create a Python Virtual Environment

Create an isolated Python environment to avoid dependency conflicts:

# On Windows
python -m venv .venv

# Activate the virtual environment
# On Windows (PowerShell)
.\.venv\Scripts\Activate.ps1

# On Windows (Command Prompt)
.\.venv\Scripts\activate.bat

# On macOS/Linux
source .venv/bin/activate

You should see (.venv) at the beginning of your terminal prompt when the environment is active.

3. Install Dependencies

With your virtual environment activated:

pip install --upgrade pip setuptools wheel
pip install -r requirements.txt

4. Configure Environment Variables

Create a .env file in the project root with your Tactical RMM credentials:

TRMM_URL=https://your-rmm-server.com
TRMM_API_KEY=your-api-key-here

Or set environment variables directly:

# On Windows (PowerShell)
$env:TRMM_URL="https://your-rmm-server.com"
$env:TRMM_API_KEY="your-api-key-here"

# On Windows (Command Prompt)
set TRMM_URL=https://your-rmm-server.com
set TRMM_API_KEY=your-api-key-here

# On macOS/Linux
export TRMM_URL="https://your-rmm-server.com"
export TRMM_API_KEY="your-api-key-here"

Configuration

Claude App (Desktop Application)

The Claude App uses claude_settings.json to configure MCP servers.

1. Find Your claude_settings.json File

  • Windows: %APPDATA%\Claude\claude_settings.json
    • Usually: C:\Users\YourUsername\AppData\Roaming\Claude\claude_settings.json
  • macOS: ~/Library/Application Support/Claude/claude_settings.json
  • Linux: ~/.config/Claude/claude_settings.json

2. Add the MCP Server Configuration

Open claude_settings.json in a text editor and add the server configuration under the mcpServers section:

{
  "mcpServers": {
    "tactical-rmm": {
      "command": "E:\\Users\\Zepheris\\Nextcloud\\GIT\\TacticalRMM-mcp\\.venv\\Scripts\\python.exe",
      "args": [
        "E:\\Users\\Zepheris\\Nextcloud\\GIT\\TacticalRMM-mcp\\trmm_mcp_server.py"
      ],
      "env": {
        "TRMM_URL": "https://your-rmm-server.com",
        "TRMM_API_KEY": "your-api-key-here"
      }
    }
  }
}

Important Notes:

  • Replace the paths with the full path to your project directory
  • Use \\ for path separators on Windows (or use forward slashes /)
  • Always use the full path to the Python executable from your virtual environment (.venv/Scripts/python.exe)
  • The main server file is trmm_mcp_server.py, not src/server.py

3. Restart Claude App

Close and reopen the Claude App for the changes to take effect.

4. Verify the Connection

In a Claude conversation, ask Claude to list agents:

List all agents in my Tactical RMM system

Claude Code (CLI Tool)

Claude Code uses settings.json in your project directory to configure MCP servers.

1. Create or Edit settings.json

In your TacticalRMM-mcp project root, create/edit settings.json:

{
  "mcpServers": {
    "tactical-rmm": {
      "command": ".venv/Scripts/python.exe",
      "args": [
        "trmm_mcp_server.py"
      ],
      "env": {
        "TRMM_URL": "https://your-rmm-server.com",
        "TRMM_API_KEY": "your-api-key-here"
      }
    }
  }
}

Note: Claude Code will execute this from your project directory, so use relative paths. If you're using a virtual environment, use .venv/Scripts/python.exe as the command.

2. Test with Claude Code

Run Claude Code from the project directory:

claude

In the Claude Code session, ask Claude to interact with your RMM:

What agents are currently in my RMM system?

Usage Examples

Once the MCP server is configured and connected, you can ask Claude to:

Agent Management

  • "List all agents in my Tactical RMM"
  • "Get the status of agent named 'Server01'"
  • "Show me all agents owned by Client XYZ"
  • "Update the description for agent 'Workstation05'"

Script Management

  • "Create a new PowerShell script that restarts Windows Update"
  • "List all available scripts in my RMM"
  • "Run the 'Check Disk Space' script on agent 'Server02'"
  • "Show me the 'Daily Backup' script"

Monitoring & Alerts

  • "List recent alerts in my RMM"
  • "Get the event log for agent 'Server01'"
  • "What software is installed on agent 'Workstation03'?"
  • "Check patch status for all agents"

Troubleshooting

Virtual Environment Not Activating

Problem: .venv not found or not activating

Solution:

  1. Ensure you're in the project directory: cd TacticalRMM-mcp
  2. Recreate the virtual environment:
    python -m venv .venv
    
  3. Activate it again (see Installation Step 2)

API Key or URL Not Working

Problem: Connection errors or 401/403 responses

Solution:

  1. Verify your TRMM_URL is correct (no trailing slash)
  2. Verify your TRMM_API_KEY is valid and has proper permissions
  3. Test the connection manually:
    curl -H "Authorization: Bearer YOUR_API_KEY" https://your-rmm-server.com/api/agents/
    

Module Not Found Errors

Problem: ModuleNotFoundError: No module named 'mcp'

Solution:

  1. Ensure your virtual environment is activated (you should see (.venv) in your prompt)
  2. Reinstall dependencies:
    pip install --upgrade pip
    pip install -r requirements.txt
    

MCP Server Not Connecting in Claude App

Problem: Claude doesn't recognize the MCP server

Solution:

  1. Check that the path in claude_settings.json is correct and absolute
  2. Ensure TRMM_URL and TRMM_API_KEY are set in the env section
  3. Use the full path to the Python executable (including .venv)
  4. Restart the Claude App completely
  5. Check Claude's logs for error messages

"Preparing metadata" Error During Installation

Problem: pydantic-core compilation fails

Solution:

  1. Update pip, setuptools, and wheel first:
    pip install --upgrade pip setuptools wheel
    
  2. Then install requirements:
    pip install -r requirements.txt
    

ImportError with mcp (Tool, ToolResult, CallToolResult)

Problem: ImportError: cannot import name 'Tool' from 'mcp.server.models' or similar mcp import errors

Solution: This project requires mcp 1.26.0+. Ensure you have the latest version:

pip install --upgrade mcp

API Changes in mcp 1.26.0+:

  • Tool is imported from mcp.types (not mcp.server.models)
  • ToolResult was renamed to CallToolResult
  • Server.run() requires initialization_options parameter

If you're developing on this codebase, these changes have already been applied.

Server.run() Missing Argument Error

Problem: TypeError: Server.run() missing 1 required positional argument: 'initialization_options'

Solution: This project has been updated to work with mcp 1.26.0+. If you see this error, ensure you have the latest version of the server code and mcp installed:

pip install --upgrade mcp

Project Structure

TacticalRMM-mcp/
├── trmm_mcp_server.py      # Main MCP server implementation
├── requirements.txt        # Python dependencies
├── .venv/                  # Virtual environment (created during setup)
├── .env                    # Environment variables (create this - do not commit)
├── settings.json           # Claude Code configuration (create this)
└── README.md              # This file

Available Tools

The MCP server exposes 16 tools for interacting with Tactical RMM:

Tool Purpose
list_agents List all agents with optional filtering
agent_status Get detailed status for a specific agent
update_agent Update agent properties
get_agent_checks Get monitoring rules for an agent
get_agent_services Get Windows services and status
get_patch_status Get Windows update status
list_clients List client organizations
list_sites List customer locations/sites
list_alerts List recent alerts/events
get_event_log Get Windows event log entries
list_installed_software Get software installed on agent
get_system_info Get comprehensive system information
list_scripts List available scripts
create_script Create a new script
update_script Update existing script
run_script Execute a script on an agent

Security Notes

  • Never commit your .env file or include API keys in claude_settings.json
  • Store sensitive credentials in environment variables only
  • Ensure your TRMM_API_KEY has minimal required permissions
  • The MCP server communicates directly with your Tactical RMM API
  • All requests use HTTPS (recommended)

Requirements

See requirements.txt for exact versions:

  • mcp>=1.26.0 - Model Context Protocol framework (v1.26.0 or newer)
  • httpx>=0.27.0 - Async HTTP client
  • pydantic>=2.11.0 - Data validation (v2.11.0 or newer)

Note: This server uses the latest MCP API (v1.26.0+). If you have issues with imports or API compatibility, ensure you've installed the latest versions.

Support

For issues with:

License

[Add your license here]