A focused MCP server for TRMM-style remote management operations.
This project exposes a curated set of MCP tools for common IT operations tasks such as:
- agent lookup and control
- checks
- scripts
- services
- software
- Windows updates
- reporting
- alerts
- automation
- tasks
The server is designed specifically for local or smaller models that are not reliable at constructing raw API paths, HTTP methods, or JSON payloads.
Instead of exposing one generic “call any endpoint” tool, this server exposes small, strongly-named tools with only a few arguments. The backend then translates those arguments into valid API requests.
Smaller local models tend to struggle with:
- choosing the correct endpoint
- selecting the right HTTP method
- building valid JSON payloads
- keeping IDs and object types straight
- avoiding destructive or overly broad actions
This server solves that by giving the model:
- a small tool surface
- explicit tool names
- simple arguments
- backend-side request translation
- consistent result handling
In short, the model decides what it wants to do, and the backend decides how to call the real API.
The project is split into four main layers:
Hosts the FastAPI application and mounts the MCP ASGI app at /mcp.
Also includes:
- bearer token protection for the MCP route
- a simple
/healthzendpoint
Defines the MCP tools exposed to the model.
These are the only functions the model should see.
Examples:
list_agents()get_agent(agent_id)reboot_agent(agent_id, mode="normal")run_agent_command(agent_id, command, shell="cmd")
Converts model-friendly arguments into actual API requests.
This layer handles:
- endpoint selection
- method selection
- JSON body construction
- argument normalization
- simple action mapping
Example:
- model calls
reboot_agent(agent_id="abc", mode="force") - translator turns that into
PATCH /agents/{agent_id}/reboot/with the correct request body
Sends the final HTTP request to the upstream TRMM/PAI API and returns a normalized result object.
This layer handles:
- authentication headers
- timeouts
- JSON parsing
- status handling
- structured error reporting
This MCP server is intentionally opinionated.
The server only includes useful tools, not every endpoint in the upstream schema.
Each tool is designed to be easy for a smaller model to call correctly.
Where possible, the model should inspect first and act second.
The model should never be responsible for building raw endpoint paths or request payloads.
Destructive or state-changing tools are kept limited and clearly named.
list_agentsget_agentget_agent_historyget_agent_notescreate_agent_noteget_agent_taskscreate_agent_taskreboot_agentshutdown_agentwake_agentrun_agent_commandrun_agent_scriptget_agent_eventloglist_agent_processesget_agent_processkill_agent_process
list_checksget_checklist_agent_checksrun_checksrun_checks_for_agentreset_checkreset_all_checks_for_agent
get_agent_softwareuninstall_agent_softwarelist_choco_packages
get_agent_winupdatesscan_agent_winupdatesinstall_agent_winupdates
list_agent_servicesget_agent_servicecontrol_agent_service
list_scriptsget_scriptdownload_scripttest_script_on_agent
list_report_historyrun_report_historylist_report_schedulesget_report_schedulerun_report_schedule
get_alertupdate_alert_status
get_automation_policies_overviewget_automation_policylist_automation_policy_checkslist_automation_policy_tasksrun_automation_taskget_automation_task_statusget_automation_check_status
list_tasksget_taskrun_task
This server does not attempt to expose every endpoint from the upstream schema.
The following kinds of endpoints are intentionally avoided unless they are truly needed:
- generic CRUD for every object type
- broad administrative mutation endpoints
- highly ambiguous update endpoints
- raw pass-through API tools
- configuration-heavy endpoints that require large request bodies
- tools that overlap too heavily with clearer existing tools
This keeps the model from being overwhelmed and reduces incorrect tool selection.
The model should:
- call
list_agents - identify the correct agent
- call
reboot_agent(agent_id, mode="normal")
The model should:
- find the agent
- call
get_agent_service(...)orlist_agent_services(...) - inspect the result
- only then call
control_agent_service(...)if requested or clearly appropriate
The model should:
- call
get_agent_winupdates(agent_id) - inspect the result
- only call
scan_agent_winupdates(...)orinstall_agent_winupdates(...)when requested
Start the FastAPI app with Uvicorn:
uvicorn server:app --host 0.0.0.0 --port 8000