# Codex plugin

> The `permahost` plugin connects Codex to the permahost.io MCP server and adds a `permahost` skill, so Codex can publish files and static sites at permanent public URLs when you ask it to.

HTML version: https://permahost.io/docs/plugins/codex/ · All docs: https://permahost.io/docs.md

## Install

Add the marketplace, then the plugin from it:

Shell:

```
$ codex plugin marketplace add tmphost/permahost
$ codex plugin add permahost@permahost
```

The marketplace is the public GitHub repository [tmphost/permahost](https://github.com/tmphost/permahost); its `.agents/plugins/marketplace.json` lists one plugin, `permahost`, from `plugin/codex`. That folder is a portable [Agent Plugins](https://agent-plugins.org) package, the same one built for ChatGPT.

## Check the install

Shell:

```
$ codex plugin list
$ codex mcp list
```

The first lists `permahost@permahost` as installed and enabled; the second lists the `permahost` server at `https://mcp.permahost.io/mcp`, not logged in until the first sign-in.

## What it adds

| Part | What it does |
| --- | --- |
| MCP server `permahost` | Streamable HTTP server at `https://mcp.permahost.io/mcp` with the tools `uploadFile`, `downloadFile`, `listFiles`, `getUrl` and `listFolders` ([MCP tools](https://permahost.io/docs/mcp/)). |
| Skill `permahost` | When and how to use each tool: `textContent` for text files, multi-file sites in one folder, finding a folder to update with `listFolders`, and credits. |

## Sign in

The first tool call asks you to sign in with your permahost.io account. The server answers `401`, Codex discovers the OAuth endpoints of app.permahost.io, registers itself (Dynamic Client Registration) and opens the browser. Sign in or sign up, and Codex keeps the token.

## Try it

Codex:

```
> Share these files as a static site and send me the URL.
```

Codex uploads `index.html` into a new folder, the other files into the same folder by its `folderId`, and answers with the folder URL, such as `https://k7q2m9xa3bd.file.permahost.io/`. The id and URL here are examples. Later: "Add the changelog page to my permahost site": it finds the folder with `listFolders` and uploads into it, at no folder cost.

For large or binary files, Codex does better with the [`permahost` CLI](https://permahost.io/docs/cli/) in its shell: it uploads from disk without passing the bytes through the conversation. See [plugin or CLI?](https://permahost.io/docs/plugins/#cli)

## Self-hosted permahost

Instead of the plugin, add your own server's MCP URL (such as `https://files.example.com/mcp`) to Codex as an MCP server named `permahost`.

## License

The plugin is licensed under the Apache License 2.0. The permahost server it connects to is AGPL-3.0-only.
