OpenDaemon

MCP Integration

Connect OpenDaemon to MCP clients for AI-driven service operations.

OpenDaemon can run as an MCP stdio server with dmn mcp, allowing AI clients to inspect status/logs and control services.

Quick setup

  1. Validate your config:
dmn mcp --check --config /absolute/path/to/dmn.json
  1. Add OpenDaemon to your MCP client config.
  2. Restart your IDE/client.
  3. Ask the AI to list services or check status.

Cursor/Kiro config example

{
  "mcpServers": {
    "opendaemon": {
      "command": "dmn",
      "args": ["mcp", "--config", "/absolute/path/to/dmn.json"],
      "env": {}
    }
  }
}

Use an absolute --config path to avoid working-directory issues.

Available MCP tools

ToolAccessPurpose
list_servicesReadList configured services
get_service_statusReadGet current service statuses
read_logsReadRead buffered logs for one service
watch_logsReadStream logs with duration/pattern stop conditions
start_serviceWriteStart one service (+ dependencies)
stop_serviceWriteStop one running service
restart_serviceWriteRestart one service

Key parameters

  • read_logs: service, lines (number or "all"), optional contains, caseSensitive, stream (stdout|stderr|both)
  • watch_logs: service, plus either durationSeconds or untilPattern; optional timeoutSeconds, pollIntervalMs, maxLines, includeExisting, includePatterns, excludePatterns, caseSensitive, stream
  • start_service / stop_service / restart_service: service

Runtime routing behavior

  • If an extension daemon is active for the same config path, MCP tool calls reuse that runtime.
  • Otherwise, MCP uses its own orchestrator runtime for the loaded config.

See Runtime Model for cross-interface details.

Practical validation flow

Try asking your AI assistant:

  1. "List my OpenDaemon services."
  2. "Start the frontend service."
  3. "Check status until frontend is running."
  4. "Restart frontend and show recent frontend logs."

MCP troubleshooting

  • dmn not found: use an absolute binary path in MCP config.
  • No services returned: verify --config points to the right dmn.json.
  • Service action appears to do nothing: check if service is already running, then test with restart_service.
  • Extension UI and MCP disagree: confirm both target the same absolute config path.

On this page