# scrypted-mcp-plugin [Health: Active]

**Category:** 🏠 Home Automation  
**Repository:** https://github.com/sv-tools/scrypted-mcp-plugin  
**GitHub Stars:** 8  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/scrypted-mcp-plugin

## Description
Scrypted plugin that exposes a Streamable HTTP Model Context Protocol endpoint, with OAuth backed by Scrypted user accounts. Lets AI assistants inspect logs, manage plugins, and query devices on the same Scrypted server.

## Tools
Capabilities this server exposes over MCP:

- **list_plugins** — All installed plugins with id / pluginId / name / type.
- **get_plugin_info** — pid, pending RPC calls, object count for one plugin.
- **get_plugin_stats** — Per-plugin CPU % and memory (including child processes such as ffmpeg) read from Linux `/proc`, plus container limits and the Scrypted server process.
- **reload_plugin** — Restart a plugin host (picks up code changes).
- **kill_plugin** — Kill a plugin host without auto-reload.
- **install_plugin** — Install / upgrade a plugin from npm.
- **update_plugins** — Upgrade every installed plugin to its latest npm version.
- **npm_info** — Query npmjs.org via the Scrypted server. Use `"scrypted-kasa"` for package metadata, or
- **rename_device_id** — Rename a Scrypted device id (briefly kills the owning plugin).
- **set_mixins** — Replace the list of mixins on a device. Read `get_device` first if you only want to add/remove one.
- **get_id_for_native_id** — Reverse-lookup a Scrypted device id from a plugin's internal `nativeId`.
- **disconnect_clients** — Disconnect all websocket clients of a plugin (forces reconnection).
- **read_console** — Read a device's console output, including its mixins.
- **clear_console** — Clear a plugin device's console buffer.
- **list_devices** — All devices. Filter by interface / type / name substring.
- **get_device** — Snapshot every state property on a device.
- **get_snapshot** — Capture a still snapshot from a `Camera` device as an image (read-only; supports optional `width`, `height`, and `timeout`).
- **call_device_method** — Invoke a method on a device (`turnOn`, `setBrightness`, `getSettings`, …). Image `MediaObject` results are returned as MCP image content; non-image `MediaObject`s return `{ mediaObject: true, mimeType, ... }`.
- **get_logs** — Retained server logs (~48 h). Filter by component, level, `sinceMs`.
- **clear_logs** — Clear the server-side log buffer.
- **list_alerts** — Persisted alerts (plugin crashes, warnings).
- **remove_alert** — Remove a single alert by id.
- **clear_alerts** — Remove all alerts.
- **get_server_info** — Scrypted version + `SCRYPTED_*` environment variables.
- **restart_server** — Restart the Scrypted server. The MCP connection drops.
- **update_server** — Trigger a server update (webhook or `.update` file + restart).
- **get_dotenv** — Read the contents of the Scrypted `.env` file.
- **set_dotenv** — Overwrite the Scrypted `.env` file (verbatim — include all keys).
- **list_users** — All Scrypted user accounts (username + admin flag).
- **add_user** — Create a user. Omit `aclId` to create an admin.
- **remove_user** — Delete a user by username.
- **get_local_addresses** — Configured local addresses / interface names.
- **set_local_addresses** — Replace local addresses. Pass interface names (`en0`) or IPs.
- **get_external_addresses** — External (publicly reachable) addresses for a plugin endpoint.
- **set_external_addresses** — Replace external addresses for a plugin endpoint.
- **get_cors** — CORS origin allowlist for a plugin endpoint.
- **set_cors** — Replace the CORS origin allowlist for a plugin endpoint.
- **list_cluster_workers** — Registered cluster workers (id, name, labels, mode, address, fork count).
- **create_backup** — Snapshot the Scrypted database. Returns the ZIP inline as a base64-encoded `EmbeddedResource` (plus
- **restore_backup** — Restore from a base64-encoded backup ZIP. The MCP host decodes it in memory and hands the bytes

## Claude Desktop Quick Installation
No generated config for this server: it installs through its own setup steps.

The project's own setup steps (from https://github.com/sv-tools/scrypted-mcp-plugin), copied verbatim. Follow them in order; they are not an mcpServers config.

1. Add to Claude Code:

```sh
claude mcp add --transport http --scope user scrypted http://your-scrypted-host:11080/endpoint/scrypted-mcp/public/mcp \
  --header "Authorization: Bearer smcp_..."
```

2. Add to Claude Code:

```sh
claude mcp add --transport http --scope user scrypted https://your-scrypted-host/endpoint/scrypted-mcp/public/mcp
```

3. Install:

```sh
npm run scrypted-deploy # push to a running Scrypted server
```

## Documentation

## What scrypted-mcp-plugin does

scrypted-mcp-plugin adds an MCP endpoint to a Scrypted installation as an installed plugin. Agents can use it to inspect device state, capture camera snapshots, read server logs, review persisted alerts, examine plugin health, and invoke methods exposed by Scrypted devices. It also covers operational administration, including plugin installation and updates, server updates and restarts, user management, network endpoint settings, and environment-file editing.

The plugin includes backup and restore operations. A database backup is returned to the MCP client as an inline base64-encoded ZIP with a byte count and SHA-256 summary. Restoring replaces the Scrypted database and installed plugin files.

## How it works

The plugin serves a Streamable HTTP MCP endpoint from the Scrypted host, so no separate service needs to be deployed. Its endpoint settings expose HTTP and HTTPS URLs. HTTP is intended for local-network access with an API token; OAuth is available over HTTPS when the client trusts the certificate, such as through a reverse proxy or tunnel.

Authentication uses Scrypted accounts. OAuth requires signing in as a Scrypted administrator, while an API token can be supplied as a bearer token for local access. Tool annotations identify read-only and destructive operations, allowing clients that honor MCP annotations to request approval before making changes.

## Setup and configuration

Install the plugin from Scrypted's Plugins area by searching npm for `scrypted-mcp`, then open the installed MCP Server plugin to retrieve its endpoint URL. In Scrypted's API Tokens settings, create a token for a local-network client and pass it as an `Authorization: Bearer` header. For HTTPS OAuth, sign in to Scrypted as an administrator in a browser before the MCP client starts its authorization flow.

Claude Code is shown as a supported connection target for both HTTP with an API token and HTTPS with OAuth. The plugin runs within Scrypted after installation and does not require another host process.

## Tools and capabilities

- Inspect installed plugins, plugin statistics, pending RPC calls, object counts, console output, and persistent storage.
- Reload or terminate plugin hosts, install individual npm plugins, update all plugins, query npm metadata, and manage device identifiers or mixins.
- List devices, read complete device state, capture camera stills, and invoke device methods such as power or brightness controls. Image results are returned as MCP image content.
- Read and clear retained logs and persisted alerts, with log filtering by component, level, and time.
- Read server information and environment variables, edit the `.env` file, restart or update Scrypted, and manage users, addresses, CORS settings, and cluster workers.
- Create database backups and perform explicitly gated restores.

## Limitations and notes

Server logs are retained for roughly 48 hours. Plugin CPU and memory statistics use Linux `/proc` data and include child processes such as `ffmpeg`, along with container limits and the Scrypted process.

`call_device_method` can invoke arbitrary methods on a device and is therefore treated as potentially destructive. Restarting Scrypted, restoring a backup, or changing configuration drops the MCP connection or may briefly stop affected services. Restoring requires the exact confirmation string `RESTORE FROM BACKUP`, client support for MCP elicitation on the 2026-07-28 protocol, and an explicit confirmation; the confirmation expires after five minutes.

Claude Desktop and claude.ai are not supported connection targets in the documented setup. OAuth requires trusted HTTPS, while plain HTTP is intended for local-network API-token access.

_Full upstream README: https://allmcps.com/mcp/scrypted-mcp-plugin/readme_

