> ## Documentation Index
> Fetch the complete documentation index at: https://docs.flow.engineer/llms.txt
> Use this file to discover all available pages before exploring further.

# Package a plugin

> Ship your skills and MCP connection together in a native plugin package.

A plugin packages your skills and the connection to your MCP server. Flow generates Claude Code
and portable Agent Plugins packages from the same `agent/skills/` folder.

## Choose a host

> **[Claude Code](https://docs.flow.engineer/plugins/claude-code.md)**
>
> Generate the Claude package and load it locally.

> **[ChatGPT](https://docs.flow.engineer/plugins/chatgpt.md)**
>
> Connect your server and prepare a plugin for ChatGPT.

> **[Codex](https://docs.flow.engineer/plugins/codex.md)**
>
> Package your tools and workflow skills for Codex.

> **[Other Agent Plugins hosts](https://docs.flow.engineer/plugins/agent-plugins.md)**
>
> Use the portable format in a compatible host.

## Before you start

You need an [MCP server](https://docs.flow.engineer/framework/mcp.md), a URL the host can reach, and any skills in `agent/skills/`.
The packages connect to your running server; generating them does not deploy it.

## Generate and check the packages

**1. Write the plugin output**

Run this in the agent's folder, replacing the example URL with your server's URL:

```sh Terminal theme={null}
npx @flow-engineer/flow plugin \
  --server https://agent.example.com/mcp \
  --out plugins
```

Add `--name my-product` to choose a plugin name instead of the package name.

**2. Validate it**

```sh Terminal theme={null}
npx @flow-engineer/flow check --plugin plugins
```

**Check it worked:** both package folders exist and the check reports no stale or
unsupported skill references.

**3. Load it in your host**

Choose the package format your host supports and follow that host's installation flow.
Try a request that uses one of your skills and tools.

**Check it worked:** the host loads the skill once and calls a tool through `/mcp/plugin`.
Directory publication, where available, has its own submission and review process.

## Generated files

**Claude Code**

```text plugins/claude/ theme={null}
.claude-plugin/
  plugin.json
.mcp.json
skills/
  <name>/SKILL.md
```

The MCP connection uses `type: "http"` and points to `/mcp/plugin`.

**Agent Plugins**

```text plugins/agent-plugins/ theme={null}
plugin.json
mcp.json
skills/
  <name>/SKILL.md
```

This uses Agent Plugins 1.0.0 and `type: "streamable-http"`. ChatGPT and Codex accept the
portable format; installation and distribution depend on the host.

## Why two MCP endpoints?

| Endpoint | What it delivers | Use it with |
| - | - | - |
| `/mcp` | Tools, skill descriptions and `read_skill` | A standalone MCP connection |
| `/mcp/plugin` | Tools only | A plugin that already ships the skill files |

Both use the same tools, authentication and descriptor overrides. This gives the host one copy
of each skill.

> **Change the plugin endpoint**
>
> Disable it with `mcpServer({ ..., plugin: false })`, or change it with
> `plugin: { path: "/native" }`. `handle.plugin` exposes its path and descriptors.
>
> For a custom route, pass its URL ending in `/plugin` to the generator or update the generated
> MCP configuration. The server's `instructions` override and `extend` handlers apply to both paths.

## Keep it in sync

Regenerate after changing a skill or one of its assets. `check --plugin` compares content hashes,
so checking out a file cannot make a stale package look current.

> [!NOTE]
>
> Generated manifests and copied skills are rewritten on regeneration. Keep hand-written skills
> outside those generated source paths. You can customize the packages and add other components
> alongside them. No bearer token is written into either package.

Format references: [Agent Plugins 1.0.0](https://agent-plugins.org/specification),
[OpenAI plugin packaging](https://developers.openai.com/plugins/build/plugins), and
[Claude Code plugins](https://code.claude.com/docs/en/plugins-reference).
The generator's formats were checked on 18 October 2026.

> **[Write portable skills](https://docs.flow.engineer/skills.md)**
>
> Keep the workflow in one source folder.

> **[Trace tool calls](https://docs.flow.engineer/traces.md#tool-call-traces)**
>
> Inspect MCP, plugin and CLI calls from the same server.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.