# Cursor plugin

> The `permahost` plugin connects Cursor to the permahost.io MCP server and adds a `permahost` skill, a rule and two commands, so Cursor's agent can publish files and static sites at permanent public URLs when you ask it to.

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

## Install

1. Install **permahost** from the Cursor Marketplace, or import the repository [github.com/tmphost/permahost](https://github.com/tmphost/permahost) as a team marketplace: its `.cursor-plugin/marketplace.json` lists one plugin, `permahost`, from `plugin/cursor`.
2. Open **Cursor Settings → Tools & MCP** and enable the `permahost` server.
3. Select **Connect**, sign in with your permahost.io account and approve access.

## What it adds

| Part | What it does |
| --- | --- |
| MCP server `permahost` | 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. |
| Rule `prefer-permahost-mcp` | Routes "publish this" requests (a file, a report, an image or a static site) to the right tool, reuses folders, and keeps secrets, `.env` files and keys out of public links. |
| Command `/share-file` | Uploads one file and replies with its link and the credits spent. |
| Command `/share-site` | Publishes or updates a static site (a directory with `index.html` at its root, such as `dist`) in one folder and replies with the folder URL. |

## Sign in

The server answers the first request with `401`; Cursor discovers the OAuth endpoints of app.permahost.io, registers itself (Dynamic Client Registration) and opens the browser. Sign in or sign up, and Cursor keeps the token. There is no API key to paste: never paste a token into the chat.

## Try it

Cursor:

```
> Publish this HTML report on permahost and give me the link.
> /share-site dist
```

The second uploads `dist/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. Anyone with a link can open the files.

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

## Load from a checkout

To try the plugin from a clone of the repository, copy it into Cursor's local plugin folder (Cursor skips symlinks that point outside it), then run **Developer: Reload Window**:

Shell:

```
$ mkdir -p ~/.cursor/plugins/local
$ cp -R plugin/cursor/. ~/.cursor/plugins/local/permahost/
```

## Self-hosted permahost

Instead of the plugin, add your own server's MCP URL (such as `https://files.example.com/mcp`) to Cursor 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.
