GPT

ChatGPT Plugin

Manage your Linux servers directly from ChatGPT. Check agent status, run tasks, trigger security audits, and review inventory — all through natural language in the ChatGPT interface.

Table of Contents

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. No middleware or proxy is required.

Features

Natural Language Tasks

Tell ChatGPT what you need in plain English — it picks the right skill, agent, and instruction automatically.

Per-User Authentication

OAuth 2.0 login — each user signs in with their own ManageLM account. No shared API keys.

Security Audits

Trigger and review security audit findings with severity levels, directly in the chat.

Inventory Scans

Discover installed packages, running services, and containers across your servers.

Agent Management

List servers, check health metrics, approve pending agents, and view dashboard stats.

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.

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 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

Available Skills

The GPT submits tasks using skills. Each skill defines what the agent can do on the server:

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, Docker, Apache, MySQL, etc.) 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)Yes (per-user skills)
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.

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.