GPT

ChatGPT Plugin

Manage your Linux and Windows servers directly from ChatGPT. Run tasks and scans, search your fleet and act on cloud VMs, all through natural language in the ChatGPT interface.

Overview

The ManageLM ChatGPT plugin is an OpenAI GPT that connects ChatGPT to your infrastructure through the ManageLM portal API. It uses OAuth 2.0 for authentication. Each user signs in with their own ManageLM credentials and gets access to their own servers.

The GPT calls the same REST API used by the n8n and Slack plugins and covers the same features as the ManageLM MCP server, with each user's own permissions. No middleware or proxy is required.

Features

Natural Language Tasks

Tell ChatGPT what you need in plain English. It picks the server, the skill and the instruction, and asks you when the agent needs input.

Per-User Authentication

OAuth 2.0 login, each user signs in with their own ManageLM account and acts with their own permissions. No shared API keys.

Scans

Security audits, inventory, SSH keys and sudo rules, certificates and user activity, run on a server and read in the chat.

Fleet Search

Inventory, security issues, logins, SSH access, certificates, monitors, backups, credentials, keystore and cloud resources, without running anything on the servers.

Cloud VM Actions

Start, stop, reboot or snapshot a VM through its hosting connector. ChatGPT asks for your confirmation every time.

SaaS & Self-Hosted

Use the public GPT with ManageLM SaaS, or create your own GPT for self-hosted portals.

Architecture

ChatGPT User, > Sign in to ManageLM, > ManageLM Portal API (OAuth 2.0) /api/* | Bearer (OAuth token)

The GPT uses OpenAI Actions (an OpenAPI spec) to call the ManageLM portal REST API directly. Each user authenticates via OAuth 2.0 and gets their own bearer token. The GPT never stores credentials.

Operations

GPT Actions allow 30 operations, and the spec covers the ManageLM MCP tools in 29. Two lists stay out: the skill catalog, which is too large for an action response, and the sites list.

AreaOperations
Servers & accountsearchAgents, getAgent, getAgentSkills, getAccount, listGroups
SearchsearchInventory, searchSecurity, searchActivity, searchSshKeys, searchSudoRules, searchCertificates, searchPki, searchMonitors, searchBackups, searchCredentials, searchKeystore
HostinglistConnectors, searchCloud, getConnectorActions, runConnectorAction
TaskssubmitTask, listTasks, getTask, answerTask, followUpTask, getTaskChanges, revertTask
ScansstartScan, getScan (security, inventory, sshkeys, certscan, activity)

ChatGPT stops waiting for an action after 45 seconds, so a task waits 35 seconds. A longer task returns its ID, and the GPT checks it with getTask. Tasks and scans run on one server at a time. Approving servers, users, skills, groups, API keys and webhooks are managed in the portal.

Use the Public GPT (SaaS)

If you use ManageLM at app.managelm.com, the public GPT is ready to use:

  1. Open the ManageLM GPT in ChatGPT (requires ChatGPT Plus, Team, or Enterprise)

  2. Click Sign in to ManageLM when prompted

  3. Log in with your ManageLM email and password

  4. Start managing your servers, try "Show me all my servers"

Tip: The GPT works in the ChatGPT web interface at chatgpt.com. The macOS desktop app does not fully support OAuth redirects.

Create Your Own GPT (Self-Hosted)

If you run ManageLM on your own server, you can create a private GPT that connects to your portal. The source files are on GitHub.

Prerequisites

Generate OAuth credentials

On your portal server, generate credentials and add them to your .env:

bash
node -e "const c=require('crypto');
console.log('OAUTH_APP_CLIENT_ID=mlm_oc_'+c.randomBytes(8).toString('hex'));
console.log('OAUTH_APP_CLIENT_SECRET=mlm_os_'+c.randomBytes(32).toString('hex'))"

Add the output to your portal .env file and restart the portal.

Create the GPT

  1. Go to chatgpt.com/gpts/editor and click Create a GPT

  2. In the Configure tab, set:

    • Name: ManageLM
    • Description: Manage Linux and Windows servers through ManageLM
    • Instructions: paste the contents of instructions.md from the repo
  3. Under Actions, click Create new action:

    • Authentication: OAuth
    • Client ID: your OAUTH_APP_CLIENT_ID value
    • Client Secret: your OAUTH_APP_CLIENT_SECRET value
    • Authorization URL: https://your-portal.example.com/oauth/authorize
    • Token URL: https://your-portal.example.com/oauth/token
    • Scope: (leave empty)
    • Token Exchange Method: Default (POST request)
  4. In the Schema box, paste the contents of openapi.yaml from the repo. Before pasting, change the server URL:

openapi.yaml (change this line)
servers:
  - url: https://your-portal.example.com/api
  1. Click Save (private or share with your team via link)

Note: The OAuth app credentials (OAUTH_APP_CLIENT_ID / OAUTH_APP_CLIENT_SECRET) identify the GPT application. They do not grant access by themselves. Each user must still sign in with their own ManageLM account.

Example Usage

ChatGPT conversation
> Show me all my servers

> What's the disk usage on web-prod-1?

> Install nginx on staging-web-02

> Run a security audit on db-primary

> Which servers have CPU usage above 80%?

> List running services on lb-01

> Show the last 50 lines of /var/log/syslog on monitoring-1

> Who logged in to db-primary yesterday?

> Which certificates expire this month?

Available Skills

The GPT submits tasks using skills. Each skill defines what the agent can do on the server. The GPT reads the skills assigned to a server with getAgentSkills, or passes auto to let the agent choose. Common skills:

SkillUse for
baseRead files, search content, check disk usage, system info (read-only)
systemOS info, performance tuning, hostname, timezone, kernel parameters
packagesInstall, remove, update, search packages
servicesManage systemd services, cron jobs, view logs, process control
usersManage user accounts, groups, SSH keys, sudo
networkInterfaces, routes, DNS, ports, connectivity testing
securitySecurity hardening, fail2ban, SSH config, SELinux, SSL/TLS

Additional skills (firewall, containers, web servers, databases, certificates and more) can be imported from the skill catalog in the portal.

Limitations

FeatureChatGPT GPTClaude Extension
Task executionYes (via API Actions)Yes (via MCP)
File upload/downloadNoYes
Streaming outputNo (request/response)Yes (SSE)
Dynamic tool discoveryNo (static spec, 29 operations)Yes (per-user skills)
Long tasksWaits 35 s, then checks backWaits for the result
Multi-agent targetingOne at a timeHostname, group, or "all"
Desktop appWeb onlyDesktop + CLI

Troubleshooting

"User ID does not match"

This happens when OpenAI has cached OAuth state from a previous GPT configuration. Delete the GPT entirely at chatgpt.com/gpts/mine and create a new one from scratch.

"Authorization Failed: Unknown Client ID"

The OAUTH_APP_CLIENT_ID in your portal .env doesn't match the Client ID in the GPT editor, or the portal hasn't been restarted after adding the env var.

"An error has occurred" after sign-in

Check that the Authorization URL and Token URL in the GPT editor point to the correct portal. For self-hosted, these must match your portal's public URL exactly.

GPT doesn't ask for sign-in

OpenAI caches OAuth tokens. To force re-authentication, go to ChatGPT Settings > Connected apps and disconnect ManageLM. If that option isn't available, delete and recreate the GPT.

Every call is refused after sign-in

If you set an MCP / API Key IP Whitelist (per user, in Settings > MCP & API), calls from ChatGPT come from OpenAI's servers and are refused with 403. Add OpenAI's egress IP ranges to the whitelist, or leave it empty.

"The task is still running"

ChatGPT stops waiting for an action after 45 seconds, so a long task (a package upgrade, a large search on the server) returns its ID. Ask the GPT to check the task again, and it reads the result with getTask.

Works in browser but not in macOS app

The ChatGPT macOS desktop app doesn't fully support OAuth redirects. Use chatgpt.com in your browser instead.