Repository avatar
Other Tools
v0.2.0
active

screenconnect-mcp-server

io.github.pitwch/screenconnect-mcp-server

MCP server for ScreenConnect RESTful API Manager: read, write and gated destructive tools

Documentation

MCP Server for ConnectWise ScreenConnect

ScreenConnect MCP Server

ScreenConnect MCP Server

MCP server for ConnectWise ScreenConnect
Sessions · Notes · Messages · Commands — MSP-safe read / write / destructive modes

English · Deutsch

npm version Official MCP Registry MCP stdio and Streamable HTTP MIT Node.js 20+ Pedrett IT+Web AG

Unofficial community project; not affiliated with or endorsed by ConnectWise.


Overview

This server connects AI assistants (ChatGPT, Claude, Gemini, …) to a ScreenConnect instance via the RESTful API Manager extension. Security boundaries are enforced in code: default read-only mode, optional write tools with dryRun previews, and destructive command/toolbox tools only with explicit opt-in.

ProtocolModel Context Protocol (stdio and single-tenant Streamable HTTP /mcp)
APIConnectWise Labs RESTful API Manager
Distributionnpm (npx -y screenconnect-mcp-server) · Official MCP Registry · Claude Desktop .mcpb · Docker
StackTypeScript · Node.js 20+ · @modelcontextprotocol/server
LicenseMIT

Why this server?

  • Standalone token auth — no admin passwords, no vendor lock-in: Authenticates directly against your ScreenConnect instance using the official ConnectWise Labs RESTful API Manager shared secret (CTRLAuthHeader). No ScreenConnect admin username/password Basic Auth and no third-party SaaS broker.
  • Code-enforced 3-tier safety: SCREENCONNECT_MODE=read|write|destructive hides disabled tools from tools/list and enforces gates in code. Write tools support dryRun: true; destructive tools require SCREENCONNECT_ENABLE_COMMANDS=true, confirm: true, and support an optional expectedName target guard.
  • MSP-ready hardening: Session-group allowlist, HTTPS-only upstream validation, 10 MiB upstream response cap (SCREENCONNECT_MAX_RESPONSE_BYTES), secret-free stderr audit log, and Sigstore-attested npm releases published via GitHub Actions OIDC.

Table of contents


Quick start

Option 1: npx (recommended for most MCP clients)

No clone or build required — add this to your MCP client config:

{
  "mcpServers": {
    "screenconnect": {
      "command": "npx",
      "args": ["-y", "screenconnect-mcp-server"],
      "env": {
        "SCREENCONNECT_BASE_URL": "https://your-instance.example.com",
        "SCREENCONNECT_API_SECRET": "your-restful-api-manager-secret",
        "SCREENCONNECT_MODE": "read"
      }
    }
  }
}

Option 2: Claude Desktop one-click bundle (.mcpb)

  1. Download screenconnect-mcp-server-vX.Y.Z.mcpb from GitHub Releases.
  2. Double-click the .mcpb file to open it in Claude Desktop.
  3. Enter your ScreenConnect Base URL and RESTful API Manager Secret (stored securely as a sensitive field), keeping Safety Mode on read to start.

Option 3: Streamable HTTP server (remote / Docker / mcpproxy)

export SCREENCONNECT_BASE_URL="https://your-instance.example.com"
export SCREENCONNECT_API_SECRET="your-restful-api-manager-secret"
export SCREENCONNECT_MODE="read"
export MCP_TRANSPORT="http"
export MCP_HTTP_BEARER_TOKEN="$(openssl rand -hex 32)" # >= 32 chars

npx -y screenconnect-mcp-server

Serves MCP Streamable HTTP on http://127.0.0.1:8080/mcp (Bearer-protected with Host/Origin validation) and unauthenticated GET /health.


ScreenConnect extension setup

Start here if you do not have a REST secret yet.

Full tutorial (install extension → create RESTfulAuthenticationSecret → curl probe → MCP env):

Short version:

  1. Administration → Extensions → install RESTful API Manager (ConnectWise Labs).
  2. ⋮ → Edit Settings → set RESTfulAuthenticationSecret (long random secret / GUID). That value is SCREENCONNECT_API_SECRET and is sent as CTRLAuthHeader.
  3. Optional: set RESTfulAllowedOrigin and mirror it as SCREENCONNECT_ORIGIN.
  4. Probe with curl (GetSessionsByFilter), then start this server with SCREENCONNECT_MODE=read.

Configuration

VariableRequiredDefaultPurpose
SCREENCONNECT_BASE_URLyes—Instance HTTPS URL (http:// is rejected)
SCREENCONNECT_API_SECRETyes—Extension RESTfulAuthenticationSecret (CTRLAuthHeader)
SCREENCONNECT_EXTENSION_IDno2d558935-686a-4bd0-9991-07539f5fe749Extension GUID
SCREENCONNECT_ORIGINno—Must match RESTfulAllowedOrigin when set
SCREENCONNECT_ALLOWED_GROUPSnoemptyFull session-group paths (comma-separated)
SCREENCONNECT_MODEnoreadread · write · destructive
SCREENCONNECT_ENABLE_COMMANDSnofalseRequired for destructive tools
SCREENCONNECT_TIMEOUT_MSno30000Per-call timeout (ms, max 120000)
SCREENCONNECT_MAX_RESPONSE_BYTESno10485760Upstream response cap (10 MiB default, max 50 MiB)
MCP_TRANSPORTnostdiostdio (default) or http (Streamable HTTP on /mcp)
MCP_HTTP_HOSTno127.0.0.1Bind address when MCP_TRANSPORT=http
MCP_HTTP_PORTno8080Bind port when MCP_TRANSPORT=http
MCP_HTTP_BEARER_TOKENhttp only—Bearer token for /mcp (minimum 32 characters)
MCP_HTTP_ALLOWED_ORIGINSnolocalhostAllowed Origin headers / hostnames for /mcp

See .env.example and docs/security-model.md.


Tools

Read (SCREENCONNECT_MODE=read)

ToolPurpose
health_checkReachability + auth probe
list_sessions / search_sessionsGetSessionsByFilter (structured fields incl. onlineOnly / offlineOnly, or raw filter)
get_sessionLightweight single-session lookup (GetSessionBySessionID, allowlist-checked)
get_session_detailsOS, user, IP, custom properties, online state (optional redacted includeRaw)
get_session_eventsEvents from session details with readable eventTypeName
get_server_infoLocal mode/allowlist metadata (no upstream call)

Write (MODE=write, all support dryRun: true)

ToolPurpose
add_session_noteAppend note (dryRun: true previews target & note)
send_message_to_sessionGuest message (dryRun: true previews message)
update_session_nameRename session (dryRun: true shows current → new name)
update_custom_propertiesMerge slots 1–8 (dryRun: true previews merged 8-slot array)

Destructive (MODE=destructive + ENABLE_COMMANDS=true + confirm: true)

ToolPurpose
send_command_to_sessionQueue cmd/PowerShell; optional expectedName guard & output poll
send_toolbox_itemRun toolbox item; optional expectedName guard
create_sessionCreate Support/Meeting/Access session

Client setup

ChatGPT / Claude / Gemini

Most MCP clients use a JSON mcpServers block. Start from docs/mcp-client.example.json using npx -y screenconnect-mcp-server, or install the .mcpb bundle directly in Claude Desktop.

mcpproxy

See docs/mcpproxy.example.yaml for both stdio (recommended default) and Streamable HTTP examples. Start with read mode before enabling write/destructive.


Streamable HTTP & Docker

Docker (stdio)

docker build -t screenconnect-mcp-server .
docker run --rm -i \
  -e SCREENCONNECT_BASE_URL=https://your-instance.example.com \
  -e SCREENCONNECT_API_SECRET=... \
  -e SCREENCONNECT_MODE=read \
  screenconnect-mcp-server

Docker (Streamable HTTP)

docker run --rm -p 127.0.0.1:8080:8080 \
  -e SCREENCONNECT_BASE_URL=https://your-instance.example.com \
  -e SCREENCONNECT_API_SECRET=... \
  -e SCREENCONNECT_MODE=read \
  -e MCP_TRANSPORT=http \
  -e MCP_HTTP_HOST=0.0.0.0 \
  -e MCP_HTTP_PORT=8080 \
  -e MCP_HTTP_BEARER_TOKEN="$(openssl rand -hex 32)" \
  screenconnect-mcp-server

Runs as non-root. Bind to loopback (127.0.0.1) or place behind a TLS-terminating reverse proxy — never expose /mcp directly over plain HTTP on the public internet.


Development

git clone https://github.com/pitwch/screenconnect-mcp-server.git
cd screenconnect-mcp-server
npm install
npm run typecheck
npm run lint
npm test
npm run build
npm run smoke
npm run build:mcpb

Live fixture capture (lab instance only): npm run capture-fixtures
(*.live.json is gitignored.)

Important: write only MCP JSON-RPC to stdout — log exclusively with console.error.

Releasing

Each package.json version gets a GitHub Release (vX.Y.Z) with notes from CHANGELOG.md and the built screenconnect-mcp-server-vX.Y.Z.mcpb bundle attached.

# 1. Bump version in package.json, server.json, src/version.ts, CHANGELOG.md, commit to main
# 2. Tag and push — CI publishes the GitHub Release (.mcpb), npm package, and MCP Registry entry automatically
git tag -a v0.2.0 -m "v0.2.0"
git push origin v0.2.0

Releases: https://github.com/pitwch/screenconnect-mcp-server/releases

The publish-mcp.yml workflow publishes the npm package (Trusted Publishing with Sigstore provenance) and then server.json to the official MCP Registry (io.github.pitwch/screenconnect-mcp-server) using GitHub Actions OIDC — no long-lived tokens required.


Links

ResourceURL
npm packagehttps://www.npmjs.com/package/screenconnect-mcp-server
Official MCP Registryhttps://registry.modelcontextprotocol.io/v0.1/servers/io.github.pitwch%2Fscreenconnect-mcp-server/versions/latest
Repositoryhttps://github.com/pitwch/screenconnect-mcp-server
Extension setupdocs/extension-setup.md
ALSO Cloud MCP (sibling)https://github.com/pitwch/also-cloud-marketplace-mcp
MCP Spechttps://modelcontextprotocol.io
Providerhttps://www.pitw.ch
Social previewdocs/assets/social-preview.png (1280×640 — GitHub → Settings → General → Social preview)

License & provider

MIT License — see LICENSE.


Pedrett IT+Web AG

Developed and provided by
Pedrett IT+Web AG
www.pitw.ch

Full automation and support — directly from the developer.

Murgtalstrasse 20 · 9542 Münchwilen TG · Switzerland · info@pitw.ch

NPM
screenconnect-mcp-server
Install Command
npm install screenconnect-mcp-server