Manage your Linux servers directly from Slack. Get real-time alerts when agents come online or go offline, when tasks complete or fail, and approve new servers — all without leaving your workspace.
ManageLM connects Slack to your infrastructure through the same portal API used by the Claude extension and n8n integration. Ask ManageLM to check agent status, approve pending servers, or run tasks on any managed host.
- Real-time notifications — agent enrollment, online/offline, task completed/failed
- Slash commands —
/managelm status,approve,run,help - Interactive buttons — approve agents and view task details inline
- Channel routing — send alerts to
#ops-alertsand info to#ops-general - HMAC verification — cryptographic signature on every webhook delivery
- Socket Mode or HTTP — develop locally with Socket Mode, deploy with HTTP
ManageLM Portal ── webhook (HMAC) ──> Slack Plugin ──> Slack API
:3101/webhook (notifications)
Slack Users ── /managelm ──> Slack Plugin ──> ManageLM Portal API
:3100 (status, approve, run tasks)
The plugin runs two lightweight HTTP servers:
| Port | Purpose |
|---|---|
| 3100 | Slack Bolt app — slash commands, interactive buttons |
| 3101 | ManageLM webhook receiver — event notifications |
Quick method — use the manifest:
- Go to api.slack.com/apps and click Create New App > From an app manifest
- Select your workspace
- Paste the contents of
manifest.yamlfrom this repo - Replace
<YOUR_HOST>with your plugin's public URL - Click Create
Manual method (if you prefer):
- Go to api.slack.com/apps and click Create New App > From scratch
- Name it ManageLM and select your workspace
- Under OAuth & Permissions, add bot scopes:
chat:write,commands - Under Slash Commands, create
/managelmwith Request URLhttps://<your-host>:3100/slack/events - Under Interactivity, enable and set Request URL to
https://<your-host>:3100/slack/events
After creating the app:
- Install the app to your workspace
- Copy the Bot User OAuth Token (
xoxb-...) from OAuth & Permissions - Copy the Signing Secret from Basic Information
Socket Mode (optional, easier for development):
- Enable Socket Mode in the app settings
- Generate an App-Level Token with the
connections:writescope (xapp-...)
- In the ManageLM portal, go to Settings > API Keys
- Create a new key with the agents permission
- Copy the key (
mlm_ak_...)
cp .env.example .envEdit .env:
# Slack credentials
SLACK_BOT_TOKEN=xoxb-your-token
SLACK_SIGNING_SECRET=your-signing-secret
SLACK_APP_TOKEN=xapp-your-app-token # only for Socket Mode
# ManageLM
MANAGELM_PORTAL_URL=https://app.managelm.com
MANAGELM_API_KEY=mlm_ak_your-key
# Webhook
MANAGELM_WEBHOOK_SECRET=your-webhook-secret # must match portal webhook config
PORT=3100
# Channel routing (optional)
SLACK_CHANNEL_ALERTS=C0123456789 # agent.offline, task.failed
SLACK_CHANNEL_INFO=C9876543210 # all other eventsIn the ManageLM portal, go to Settings > Webhooks and create a webhook:
| Field | Value |
|---|---|
| URL | https://<your-host>:3101/webhook |
| Events | Select all events you want notifications for |
| Secret | Same value as MANAGELM_WEBHOOK_SECRET in your .env |
The portal signs every delivery with HMAC-SHA256 using this secret.
The plugin verifies the X-Webhook-Signature header before processing.
Local development:
npm install
npm run build
npm startDocker:
docker build -t managelm-slack .
docker run --env-file .env -p 3100:3100 -p 3101:3101 managelm-slackDocker Compose:
services:
managelm-slack:
build: .
env_file: .env
ports:
- "3100:3100"
- "3101:3101"
restart: unless-stopped| Command | Description |
|---|---|
/managelm status |
List all agents with online/offline status |
/managelm approve <hostname> |
Approve a pending agent |
/managelm run <hostname> <skill> <instruction> |
Run a task on an agent |
/managelm help |
Show available commands |
/managelm status
/managelm approve web-prod-03
/managelm run web-prod-01 packages List outdated packages
/managelm run db-master security Run a full security audit
/managelm run lb-01 services Restart nginx
The run command works exactly like submitting a task from Claude or the
portal UI — it sends the instruction to the agent, waits for the result,
and posts it back to the channel.
When a ManageLM webhook event fires, the plugin posts a rich Block Kit message to the configured Slack channel:
| Event | Notification |
|---|---|
agent.enrolled |
Enrollment request with an Approve button |
agent.approved |
Confirmation that the agent is now managed |
agent.online |
Agent connected to the portal |
agent.offline |
Agent disconnected (routed to alerts channel) |
task.completed |
Task summary with a View Details button |
task.failed |
Error message with a View Details button (routed to alerts channel) |
- Approve — directly approve a pending agent from the Slack message
- View Details — fetch full task output and display it in an ephemeral message
- View in Portal — open the ManageLM portal in your browser
Route critical events to a dedicated alerts channel:
SLACK_CHANNEL_ALERTS=C0123456789 # receives: agent.offline, task.failed
SLACK_CHANNEL_INFO=C9876543210 # receives: all other eventsIf neither variable is set, events are posted to the bot's default conversation channel. You can also invite the bot to specific channels and events will be posted there.
| Variable | Required | Description |
|---|---|---|
SLACK_BOT_TOKEN |
Yes | Bot OAuth token (xoxb-...) |
SLACK_SIGNING_SECRET |
Yes | Slack app signing secret |
SLACK_APP_TOKEN |
No | App-level token for Socket Mode (xapp-...) |
MANAGELM_PORTAL_URL |
Yes | ManageLM portal URL |
MANAGELM_API_KEY |
Yes | ManageLM API key (mlm_ak_...) |
MANAGELM_WEBHOOK_SECRET |
No | HMAC secret for webhook verification |
MANAGELM_PORTAL_PUBLIC_URL |
No | Public URL for "View in Portal" links (defaults to MANAGELM_PORTAL_URL) |
PORT |
No | Bolt app port (default: 3100, webhook runs on PORT+1) |
SLACK_CHANNEL_ALERTS |
No | Channel ID for alert events |
SLACK_CHANNEL_INFO |
No | Channel ID for informational events |
src/
app.ts — entry point: Bolt app + webhook HTTP server
config.ts — environment variable loading and validation
managelm.ts — typed HTTP client for the ManageLM portal API
formatters.ts — Block Kit message builders for each event type
handlers.ts — slash command and button action handlers
- Node.js 20+
- ManageLM Portal with API keys enabled (managelm.com)
- Slack workspace with permission to install apps
To let other people install ManageLM into their own Slack workspaces:
- Go to your app at api.slack.com/apps
- Navigate to Settings > Manage Distribution
- Complete the checklist (app icon, description, etc.)
- Click Activate Public Distribution
Once activated, Slack gives you a Sharable URL like:
https://slack.com/oauth/v2/authorize?client_id=YOUR_CLIENT_ID&scope=chat:write,commands
You can also use Slack's official "Add to Slack" button. Add this HTML to your website or documentation:
<a href="https://slack.com/oauth/v2/authorize?client_id=YOUR_CLIENT_ID&scope=chat:write,commands&user_scope=">
<img alt="Add to Slack" height="40" width="139"
src="https://platform.slack-edge.com/img/add_to_slack.png"
srcSet="https://platform.slack-edge.com/img/add_to_slack.png 1x,
https://platform.slack-edge.com/img/add_to_slack@2x.png 2x" />
</a>Replace YOUR_CLIENT_ID with your app's Client ID from Basic Information.
- Clicks "Add to Slack" and authorizes the app for their workspace
- Copies the Bot Token and Signing Secret from their new app
- Creates a ManageLM API key in their portal
- Runs the plugin with their credentials (Docker or Node.js)
- Registers the webhook URL in their ManageLM portal
Add the "Add to Slack" button to your documentation page alongside the
existing n8n and Claude plugin install instructions. Self-hosted users
follow the same setup — they just point MANAGELM_PORTAL_URL at their
own instance.