Skip to main content

Plugins on your machines

A plugin bundles slash commands, subagents, skills, hooks and local MCP servers. Save one on the gateway and each enrolled machine installs it.
Hooks and MCP servers run on every enrolled machine

A plugin's hooks and MCP servers are commands. Review them like code before you save a plugin. Saving or removing a plugin needs the orgplugins:manage capability (security_admin and the admin token), so an operator can still write Skills but not plugins.

Save a plugin​

1
Lay out the plugin

Use the standard folders. Only .claude-plugin/plugin.json is required.

PathHolds
.claude-plugin/plugin.jsonA JSON object. name is the plugin id and version is its version
commands/*.md, agents/*.mdSlash commands and subagents
skills/<folder>/SKILL.mdSkills, each with a name and a description in its front matter
hooks/hooks.jsonHooks, in Claude Code's hook shape
.mcp.jsonLocal (stdio) MCP servers
2
Upload it

In the console, open Connectors under Settings, then Plugins. Choose Add, then Upload a plugin, and drop the folder or .zip. The plugin's name and version come from plugin.json. Read the components the dialog lists (commands, agents, skills, hooks and MCP servers), then choose Add plugin.

A machine keeps the copy it has for a version. Upload the same version again and Add plugin stays disabled under a note asking you to raise version in plugin.json. A new version shows Update plugin.

3
Confirm it arrived

Machines pick the plugin up on their next sync. See check it arrived for the Claude Code and Claude Desktop checks, which read the same marketplace.

The gateway answers 400 with the reason when the plugin breaks a rule below, 403 without orgplugins:manage, and 409 when a skill in the plugin would take the id of another item or the files changed under the same version.

Remove a plugin​

Open the plugin under Plugins, choose the More actions menu, then Remove. Claude Code machines uninstall it at their next sync. Claude Desktop drops it from the organization marketplace.

What the tab shows​

The tab saysMeaning
Add menuYou hold orgplugins:manage
A note naming the security admin and owner rolesYou can read plugins but not change them
Needs gateway upgradeThis gateway predates plugins
Save with the API

The body is one JSON object: the id, a display name, a description, the version, "kind": "plugin", and files, a map of path to text.

Save review-kit
curl -X PUT https://<your-anyray-gateway>/admin/v1/desktop-plugins \
-H "Authorization: Bearer $ANYRAY_ADMIN_TOKEN" \
-H "Content-Type: application/json" \
-d @review-kit.json
review-kit.json
{
"id": "review-kit",
"name": "Review kit",
"description": "Review helpers for the platform team.",
"version": "1.0.0",
"kind": "plugin",
"files": {
".claude-plugin/plugin.json": "{\"name\":\"review-kit\",\"version\":\"1.0.0\"}",
"commands/review.md": "---\ndescription: Review a diff\n---\nReview the diff."
}
}

Admin API keys cannot save or remove plugins, whatever scopes they hold. Use a signed-in admin or the admin token.

Import from GitHub​

1
Inspect the repository

In the Plugins tab, choose Add, then Import from GitHub. Enter the repository URL, such as https://github.com/owner/repo, and a branch, tag or commit and a subfolder if you need them. Choose Inspect. Only public repositories work; for a private one, upload a zip.

2
Choose and import

Tick the plugins to import. A plugin in another public GitHub repository imports from there. One hosted elsewhere (npm, an archive URL, another git host) is disabled, with the reason. Choose Review, read the components and any files left out, then choose Import. Each plugin is imported on its own. A plugin that breaks a rule is refused whole, with the reason and the files, and nothing is saved.

3
Update later

A plugin row shows Update available when a file the plugin is built from changed upstream. A commit elsewhere in the repository does not count. Couldn't check for updates means GitHub did not answer. Open the row menu, choose Update from source, read what changed, then choose Update plugin. Nothing updates on its own.

The import reads a repository the way Claude Code does. plugin.json is optional: without it the marketplace entry, or else the folder name, names the plugin. The version comes from plugin.json, then the marketplace entry, then the first 12 characters of the commit. A binary file the plugin never loads, such as a screenshot in docs/, is left out and listed in the review. A binary inside a plugin folder, or one that a plugin file names, refuses the plugin.

Fetches send no credentials. Downloads stop at 8 MiB. Only the plugin's own files are checked: at most 2,000 files, 256 KiB each, 32 MiB of expanded text and expansion at 100 times compressed size. Traversal, symlinks and names differing only in ASCII case are refused there, and ignored elsewhere in the repository. A repository that moved on GitHub is refused: import it from its new address.

Add a marketplace​

In the Plugins tab, choose Add, then Add marketplace. Enter the public GitHub repository that holds the marketplace, like https://github.com/acme/plugins, and optionally a branch, a tag or a full 40-character commit SHA in Ref (the default branch otherwise). Choose Add marketplace. The gateway reads .claude-plugin/marketplace.json from the repository and the dialog lists the plugin names it found.

A marketplace hosted elsewhere can be added by the bare https:// address of its marketplace.json, without credentials, a query or a fragment. A marketplace whose name Claude reserves, like claude-plugins-official, is refused. Seats download only that file, so the gateway refuses one whose plugins use paths inside its repository (./plugins/x): add its GitHub repository instead.

The Marketplaces list shows anyray-org-skills first (read-only), then yours, each marked Claude Desktop. Open a row to see its address, its status (Reachable, Unreachable, Malformed or Won't install on seats), when the gateway last checked it and its plugins. Any status but reachable shows the reason and no list. To remove one, open its row menu and choose Remove.

Seats fetch a marketplace themselves; the list is what the gateway sees. Auto-install still needs a real Desktop check, and admin-added marketplaces are not pushed to Claude Code. A marketplace is a source of code for every enrolled machine, so adding or removing one needs orgplugins:manage, which admin API keys never hold.

Import and marketplaces with the API

Import: POST /admin/v1/desktop-plugins/git/inspect with repo, optional ref (default HEAD) and optional subfolder. Send the same coordinates, the chosen relative source (or the marketplace entry name), the inspected commitSha and expectedVersion: null to /git/preview, then send the same fields plus the preview's targetCommitSha to /git/import to save. A fresh import must follow a /git/preview of the same repo, commitSha and subfolder within 15 minutes, or it answers 422. Both return skipped, the binary files left out. The gateway records the repository, ref, commit, import time and path the plugin came from.

Updates: GET /admin/v1/desktop-plugins/<id>/source compares the plugin's files at the head with the imported commit, without downloading an archive. POST /admin/v1/desktop-plugins/<id>/source/preview returns added, removed and changed files, hooksChanged, mcpChanged and componentsChanged, which lists each changed kind of code that runs on machines (hooks, mcp, monitors, lsp, bin, settings). Apply it by sending its id, coordinates, source, commitSha and expectedVersion to /git/import. A replacement with changed files changes the version; a stale version answers 409.

Marketplaces: POST /admin/v1/desktop-plugins/marketplaces with {"url":"https://github.com/acme/plugins","ref":"v1"} (ref optional) or {"url":"https://synthetic.example/marketplace.json"}. The gateway adds {source: "github", repo, ref, expectedName} or {source: "url", url, expectedName} to the Desktop policy, sending only allowedPluginMarketplaces. Remove and query a GitHub marketplace with {"repo":"acme/plugins"}, any other by its exact url.

On /admin/v1/desktop-plugins/marketplacesRequest
List, with anyray-org-skills first and read-onlyGET
Remove, answering removed: false when nothing matchedDELETE with url or repo
Open or re-checkPOST /query with url or repo

Each detail request fetches again and returns checkedAt, status and a fixed failure reason. An unreachable, malformed or unusable marketplace reports plugins: null. A changed manifest name is malformed. A URL marketplace whose plugins use relative paths, or a stored ref a seat cannot clone (HEAD, refs/…, a short SHA that names no branch or tag), is unusable.

Check install state​

Run anyray-connect doctor on the machine. It reports each organization plugin separately for Claude Code and Claude Desktop. doctor --json and status --json carry the same plugin ids, versions and states, without paths or file contents. Only plugins the organization offers are listed: a plugin you removed drops out, even while Claude Desktop keeps its own record of it.

StateMeaning
installedThe tool has the plugin installed and enabled.
pendingThe plugin is offered but its installation has not finished.
turned_offThe plugin is installed but disabled. Connect leaves it off.
removed_by_userThe user removed the plugin. Connect does not reinstall it.
not_loadableA skill cannot load. Connect checks root SKILL.md and every skills/*/SKILL.md for the required front matter.
hooks_blockedThe plugin has hooks that managed settings prevent from running.
unknownConnect cannot determine the plugin's state from the available evidence.

The one exception is the built-in anyray plugin in Claude Desktop. With Require the Anyray skill on, Connect turns it back on and lets Desktop reinstall it. Off by default.

Connect reads managed settings to diagnose blocked hooks and never changes them. The per-tool org_plugins health check carries the result to the gateway. Admins can read seat counts by plugin, version and state.

The Seats column in the Plugins tab shows the same counts to a security admin or an owner. Each tool that reports a plugin gets a line, such as installed on 3 of 4 seats, counting seats on the current version, with the turned off, removed, not loadable and hooks blocked seats counted beside it, N on an older version for seats not yet updated, and N on a mixed or unknown version for seats whose machines disagree. No reports yet means no seat has reported that plugin.

Which machines get what​

Claude Code and Claude Desktop install the whole plugin from the gateway's marketplace. Other tools that Connect writes skills for (Codex, Cursor and the rest) get the skills only: each skills/<folder>/SKILL.md lands as a skill named <plugin>-<folder>, and a root SKILL.md lands under the plugin id.

What the gateway checks on a save
  • name in plugin.json equals the id, and version equals the item version.
  • hooks and mcpServers in plugin.json are inline, absent, or ./ paths to files in the plugin that pass the same checks. A bundle (.mcpb, .dxt) or a URL is refused.
  • hooks/hooks.json holds a hooks map of events to groups. Each group lists hooks that have a type, and a command hook has a command.
  • An id keeps its kind. Saving a Skill or Guidance item under a plugin's id, or a plugin under theirs, answers 409. Remove the old item first.
  • Item ids that differ only in letter case, or a skill folder that matches another item's id, are refused.
  • Every .mcp.json server is stdio. A url or a type other than stdio is refused: add remote MCP servers under Connectors, where they get credentials and governance.
  • Every skills/<folder>/SKILL.md opens with front matter that sets a name and a description. Folder names use letters, digits, dots, underscores and hyphens.
  • Files are text, up to 256 KB per plugin and 2 MB for all Skills, Guidance and plugins together.
  • Marketplace and archive URLs are public, so a value shaped like a key or token is refused. In plugin.json, hooks.json and .mcp.json that includes a key such as API_KEY or password with a literal value. Reference an environment variable instead, like ${API_KEY}.
  • The archive stores every file without the execute bit. Start scripts through their interpreter, like sh scripts/start.sh.
Machines that lock Claude Code hooks

When a machine's managed Claude Code settings set allowManagedHooksOnly, plugin hooks run only if the managed enabledPlugins lists the plugin. Without that entry the plugin installs and its hooks stay off.