Skip to content

Integrations

Write a plugin

Create and check an Agent Plugins package, start its MCP server inside the sandbox, and add a declarative Code tool, a debug adapter or a language server.

  • 7 min read
  • 9 sections

Write a plugin ​

Start from a working folder, check it on this computer, then import it into Octant, where it arrives untrusted and switched off like any other plugin.

What a plugin package holds ​

A portable package uses the Agent Plugins 1.0.0 layout: a root plugin.json, a skills/ folder, and an mcp.json. Packages with a Codex-compatible .codex-plugin/plugin.json are still supported through a compatibility adapter.

A plugin can contribute prompt-only skills, MCP servers, and declared surfaces: sidebar destinations, settings sections, workspace tabs, thread panes, preview viewers, appearance presets and board views. The host rejects unknown contribution points, and a disabled component contributes no surface.

Every installed package carries a stable extension ID, source, source version and content digest, manifest version, provenance record, compatibility range, and declared components. An invalid skill or MCP entry is set aside so its siblings still load.

Create a plugin ​

sh
octant plugin create meeting-notes

This makes a meeting-notes folder in the current folder with:

  • plugin.json: the plugin's name, version and one-line description.
  • skills/meeting-notes/SKILL.md: a skill. The description line tells an agent when to use it; the text below the --- line is what the agent follows. Add more skills as more folders under skills/. Each folder's name must match the name in its SKILL.md.
  • README.md: these steps.

To give agents a hosted MCP server's tools as well, pass its address:

sh
octant plugin create crm --mcp-url https://mcp.example.com/mcp

That adds an mcp.json naming the server. The address must use https, or http to this computer, and cannot hold a user name, a password, or a # fragment. Octant asks you to sign in when it first connects. The name uses lowercase letters, digits and single hyphens, up to 64 characters. create never writes into a folder that already exists.

Check the folder ​

sh
octant plugin check meeting-notes

check reads the folder the way Octant does when you import it, and lists the skills and MCP servers it found, or the problems to fix first.

  • It checks the Agent Plugins layout that create writes. A Claude Code or Codex plugin folder still imports, but check does not read those layouts.
  • A folder that also holds octant-language-server.json, octant-provider-driver.json or octant-debug-adapter.json is read as that kind of package instead, so check refuses it.
  • It leaves out a .git folder and links inside the folder, as the import does, and refuses a link that points outside it.

Both commands work only on files on this computer: they need no running Octant, reach no network, and install nothing.

Import and share it ​

Add it in Settings → Skills & Extensions → Marketplace → Import local Agent Plugin…. It arrives untrusted and switched off; review it, trust it, and switch it on there. To share it, publish the folder as an npm package, and others can install it from npm.

Start an MCP server ​

Agent Plugins MCP servers get PLUGIN_ROOT and a dedicated, persistent PLUGIN_DATA folder. Octant expands only those two placeholders, in args, env values and cwd, and connects with the declared stdio or Streamable HTTP transport when the component becomes effective.

On macOS an MCP server runs in a sandbox that cannot follow a #! line to its interpreter. Declare the interpreter as the command and the script as an argument, with the script's absolute path or ${PLUGIN_ROOT}:

json
{ "type": "stdio", "command": "node", "args": ["${PLUGIN_ROOT}/server.mjs"] }

A command that is itself a script, whether shipped in the plugin or a launcher such as npx, npm or uvx, is refused before it starts, with this fix in the message, and the server is never shown as ready. uv tool run and uv run are refused the same way.

The server reads only the plugin's own folder, so a package installed globally on the Mac is out of reach. Put what it needs inside the plugin when you build it:

  • Node. Run npm install --prefix "${PLUGIN_ROOT}" <package>, and point node at ${PLUGIN_ROOT}/node_modules/<package>/<entry>.js.
  • Python. Build a virtual environment inside the plugin, for example uv venv "${PLUGIN_ROOT}/.venv" and uv pip install --python "${PLUGIN_ROOT}/.venv/bin/python" <package>. Set "command": "${PLUGIN_ROOT}/.venv/bin/python" with the package's script or ["-m", "<module>"] as args. A virtual environment built from Homebrew Python runs under the sandbox.

Add a declarative Code tool ​

An Agent Plugins package can describe Code tools under extensions.octant.codeTools in its root plugin.json. A declaration names existing host-registered credential operations or saved command bindings. It contains no JavaScript, commands, URLs, environment values or keys, so it does not make the plugin executable or approve a credential operation.

This package offers the existing account-check operation:

json
{
  "$schema": "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json",
  "name": "account-check-tools",
  "version": "0.1.0",
  "description": "Offer a bounded account check in Code.",
  "license": "MIT",
  "extensions": {
    "octant": {
      "codeTools": [
        {
          "id": "check",
          "label": "Check account",
          "description": "Request the host's registered account check.",
          "operationIds": ["linear-account-check"],
          "savedCommandIds": []
        }
      ]
    }
  }
}

Limits:

  • A package can declare at most 16 tools.
  • Each tool has a lowercase ID of at most 16 characters, a label and a description.
  • Each list accepts at most 16 unique IDs, and the two lists together need at least one.
  • Saved command IDs are existing binding UUIDs from that host. A declaration cannot register a new command or change an operation's rules.

To use it, import or install the package, review its credential capability, trust and enable it, then select it in a Code thread or pin it to a Project. That makes only the declared, currently permitted operations available. It does not authorize a credential request or command: the request card and saved-command review still apply, with the thread's mode, checkout, provider and access limits.

The tool offers help, list, request and run-saved, only within its declared allowlist. Its list shows permitted IDs, labels and fixed operation reasons; it shows no saved executable, arguments, directory, account or credential reference. The host keeps credentials and runs everything. Octant names each installed tool for the provider, so a package cannot replace octant_credential or another package's tool.

Disabling the package or component, revoking trust, replacing the package, or a change to the task's authority cancels pending use, as does ending the turn. Removing a draft selection or Project pin affects later turns; use the package or component switch to stop live use. The host checks authority again after waiting for your review. The built-in credential tool keeps its own behavior.

Add a debug adapter ​

A debug adapter lets Octant debug a program in a Code thread.

  1. Put the adapter in a folder with an octant-debug-adapter.json at its root, like a language server below. Give it one component of kind debug-adapter whose debugAdapter names its runtimes and the body of the launch request it needs.
  2. The folder holds exactly one adapter, and its binary is the only executable file in it.
  3. Import the folder from Marketplace.

Review before installing names the binary and its SHA-256 digest, the runtimes, the launch request with the values Octant fills in, whether it takes a debug port, and whether it also debugs the program's child processes. An adapter that does declares childSessions: 1 and how it announces a child (childAnnouncement: the standard startDebugging request, or one event of its own). Octant gives it two loopback ports as OCTANT_DEBUG_CHILD_PORT and OCTANT_DEBUG_CHILD_SERVER_PORT, and its listeners must use them.

An adapter runs the programs you confirm from the checkout and can write the checkout. It reaches only the hosts the thread's network rules allow, and never runs in Plan, for a paired device, or for an agent. Confirm install stores it disabled until you trust and enable it. Start a session from the Code dock's Run and debug tool.

Add a language server ​

A Code thread's editor can read type errors and definitions from a language server you add, next to the TypeScript server Octant bundles. Put the server in a folder with an octant-language-server.json at its root, and import the folder from Marketplace with the native folder picker:

json
{
  "manifest": {
    "manifestVersion": 1,
    "slug": "lua-language",
    "displayName": "Lua",
    "version": "3.13.0",
    "provenance": { "publisher": "Example", "canonicalUrl": "https://example.com/lua" },
    "license": { "kind": "spdx", "identifier": "MIT" },
    "compatibility": { "platforms": ["macos", "linux"], "modes": ["code"], "providerFamilies": [] },
    "declaredCapabilities": ["filesystem"],
    "components": [
      {
        "id": "language-server",
        "kind": "language-server",
        "displayName": "Lua",
        "declaredCapabilities": ["filesystem"],
        "entryPoint": "bin/lua-language-server",
        "languageServer": { "languages": ["lua"], "launchClass": "static" }
      }
    ]
  }
}

The folder holds exactly one language server, and its binary is the only executable file in it. Octant starts the binary with no arguments and talks to it over stdin and stdout. Octant sets the package's identity, source, digest and review state itself, so the file must not state them.

A server that runs the repository's own tools, such as a build or a package manager, declares "launchClass": "repo-tooling" and may add shell and network to its capabilities. It never starts until you allow it from the editor of a Code thread, for one checkout or the whole Project (see Language services).

Review before installing names the binary, its SHA-256 digest (compare it with the one the server's author publishes), the languages it reads, and its class.

  • A static server reads the checkout and keeps a private cache. It cannot write, run other programs, or reach the network.
  • A repo-tooling server can, once you allow it, write the checkout, run programs, and reach the hosts your Project's network rules allow.

Confirm install stores it disabled. It serves nothing until you Trust source, Enable plugin and Enable component under Installed, and it stops as soon as you take any of those back. Before each start Octant checks the stored binary against the digest you reviewed and does not run one that changed.

Octant decides a file's language from its extension, not from the repository. When the bundled server and yours both read a language, the bundled one serves it.

Next steps ​

Octant documentation · local-first by design