Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 32 additions & 16 deletions skills/rustgis/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ which project the user wants to operate on **before** starting the server.
| User's goal | Entry point |
| --- | --- |
| Install RustGIS or make its CLI available to the agent | Read [install-from-agent](references/install-from-agent.md); detect the user's platform, install the app and CLI, verify the CLI, then register MCP. |
| Manage the map already open in the desktop app | Start **MCP Relay** in the app's Command Search (Ctrl+K), confirm `127.0.0.1:8767`, then register `rustgis-cli mcp --attach`. |
| Manage the map already open in the desktop app | Start **MCP Relay** in the app's Command Search (Ctrl+K), confirm the status bar shows it, then register `rustgis-cli mcp --attach`. |
| Work in a separate headless project | Register `rustgis-cli mcp --sample`, `--project file.rgis`, or repeatable `--data file.geojson`. This is the agent's own project, not the desktop app. |
| Use the browser app | Open <https://web.rustgis.app>. The desktop loopback relay is not a browser-management interface. |

**For the open app, `--attach` is mandatory.** Do not silently fall back to a
**For the open app, `--attach` (or MCP over HTTP) is mandatory.** Do not silently fall back to a
private project if the relay is unavailable. Do not combine `--attach` with
`--sample`, `--project` or `--data`; the CLI rejects that combination.

Expand All @@ -31,8 +31,11 @@ private project if the relay is unavailable. Do not combine `--attach` with
Control RustGIS** in the AI Assistant's settings (it also lets attached
agents use files and the network), or open Command Search (Ctrl+K) and run
**MCP Relay** (`ui.mcpRelay`). Confirm the status bar says
`MCP relay listening on 127.0.0.1:8767`. The listener is off until started
and remains active until the app closes.
`MCP relay · n attached` (0 until an agent connects; with Full access on,
`MCP relay · full access · n attached`). The listener is off
until started, and runs until the user clicks that status bar text or the
app closes.
Ticking the box is remembered: the relay then starts with the app.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The remembered choice is also cleared by the stop that the line above describes. Clicking the status bar text calls ui.mcpRelay {"stop": true}, which runs connectui::stopped (crates/ui-egui/src/lib.rs:4712, crates/ui-egui/src/connectui.rs:155). That saves the agents preference as off, so the relay does not start with the app next launch. The skill should say so, so an agent does not tell the user that a stopped relay will come back.

Suggested wording: "Ticking the box is remembered: the relay then starts with the app. Stopping the relay (clicking the status bar text) also forgets that choice, so tick the box again to keep it."

Category: quality

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed in connectui::stopped: a stop also clears the remembered choice. Left for the release quality pass.

3. Register the attached server in the agent, for example:

```sh
Expand All @@ -41,8 +44,10 @@ private project if the relay is unavailable. Do not combine `--attach` with
codex mcp add rustgis-app -- rustgis-cli mcp --attach
```

The MCP client launches the stdio process; do not start a separate HTTP
server. Add `--yes` only when the user's task authorizes file/network access.
The MCP client launches the stdio process; do not start it yourself. Add
`--yes` only when the user's task authorizes file/network access. A client
that speaks MCP over HTTP can connect without `rustgis-cli mcp`: see the
install reference.
4. Call `list_layers` and `view_map` to establish that this is the user's open
map before changing it. If connection fails, check that the app is still
open, MCP Relay is active, and the selected port matches. Do not claim
Expand Down Expand Up @@ -73,16 +78,27 @@ port, start the app command with `ui.mcpRelay {"port": 9000}` and use

## Access and project boundaries

- File and network commands **still require `--yes` when attached**, just as
in a private server, unless the user ticked **Let your Agents Control
RustGIS**, which allows them for attached agents. It also permits plugin commands and opening project
text, which can bring in web layers. Do not enable it to conceal a refusal.
- Plugin management, scripts, tasks, models and the GeoLibre runner are not
available through this MCP surface; `--yes` does not unlock them.
- In attached mode, opening, replacing, undoing and saving act on the user's
open project. Inspect first and preserve their work; do not overwrite it
merely to create an example. In private mode, the project belongs to the
agent and stays in memory until saved.
- File and network commands, and commands that plugins add, **still require
`--yes` when attached**, just as in a private server, unless the user ticked
**Let your Agents Control RustGIS**, which allows them for attached agents
even without `--yes`. Do not ask for either to get around a refusal.
- Installing, removing and listing plugins, scripts, tasks, models and the GeoLibre runner are
reserved to the user, though `search_commands` lists them; `--yes` does not
unlock them.
- In attached mode the project is the user's. Creating, opening or otherwise
replacing it is refused, and `edit.undo` and `edit.redo` work only on this
agent's own steps (agents attached with `--attach` or over HTTP count as one
agent). Saving, with file access, saves the user's project, and
saving to a path (`project.saveAs`, or `project.save` with one) makes that
file their open project. For a copy, use `project.package` with a `.rgispkg`
path, which leaves it where it is. Inspect first and preserve their work.
- **Full access** is a separate box under **Let your Agents Control RustGIS**
that the user ticks for that session. It lifts every refusal above for
`--attach` and HTTP agents, so it is more than a refused undo or project
change needs: ask the user to do that step in the app instead. Ask for Full
access only when the task needs a reserved command.
- In private mode the project belongs to the agent, which may replace and undo
in it, and it stays in memory until saved.
- `view_map` can fetch tiles for web tile layers already in the project.
Do not describe the default access policy as a complete offline guarantee.

Expand Down
67 changes: 50 additions & 17 deletions skills/rustgis/references/install-from-agent.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,10 @@ Get-Command rustgis-cli, winget -ErrorAction SilentlyContinue
The documented Windows release assets are x64 (`windows-x86_64`) and, where a
release has them, ARM64 (`windows-aarch64`). On ARM64, use the ARM64 asset when
the release has one (winget installs x64 only). If an existing CLI works, keep
it; also check that the desktop app is installed. Prefer a package manager
already present. Do not install a package manager just to avoid a release
download, and do not silently elevate privileges.
it unless the user wants a newer version (section 2); also check that the
desktop app is installed. Prefer a package manager already present. Do not
install a package manager just to avoid a release download, and do not silently
elevate privileges.

## 2. Install the desktop app and CLI

Expand All @@ -59,6 +60,15 @@ winget's default is the per-user installer; use
If elevation needs the user's password, leave that interaction to the user;
the portable route below does not require system-wide installation.

A package manager can lag behind the releases. **Before** installing, compare
the version it offers (`winget show`, `brew info`, …) with the
[latest release](https://github.com/opengeos/RustGIS/releases/latest); if it is
older, use a checked download below instead, so that two versions aren't
installed side by side. If an older one is already installed and the user wants
the new one, ask whether to remove the old one first. If it stays, open the new
app and register its CLI by their full paths: the Start menu entry, shortcuts
and PATH can still lead to the old one.
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Resolved

Package managers handle their package integrity checks. For direct downloads,
verify each downloaded asset against that same release's `SHA256SUMS` before
running or extracting it. A checksum verifies the asset against the published
Expand Down Expand Up @@ -175,7 +185,8 @@ retrying if Apple cannot verify an old release; do not routinely strip quarantin

### Checked release downloads: Windows x64 and ARM64

On x64, prefer winget when present. On ARM64, winget installs the x64 build (run
On x64, prefer winget when it offers the latest release
(`winget show OpenGeos.RustGIS`). On ARM64, winget installs the x64 build (run
under emulation), so prefer the ARM64 zip below when the release has one. The
portable zip needs no administrator rights and includes both the app and CLI.
On ARM64 Windows the script takes the ARM64 zip when the release has one, else
Expand Down Expand Up @@ -266,13 +277,16 @@ Get-Command rustgis-cli
rustgis-cli commands
```

If an older CLI stays on PATH, run the new one by its full path here instead of
`rustgis-cli`, and register that path: the bare name would test the old one.

Require successful command discovery and a successful command listing. A GUI
app alone is not enough, especially on macOS. Restart terminals after installer
PATH changes; use the resolved full executable path if the agent still cannot
find it.

MCP uses **stdio**, not an HTTP endpoint. The client launches the following
command; do not run a second detached server process:
MCP over **stdio** works for both private and attached sessions. The client
launches one of the following commands; do not run a detached server process:

```sh
rustgis-cli mcp --sample # a private World Atlas project
Expand Down Expand Up @@ -332,25 +346,46 @@ append `--yes` to the registration command. For a private sample, replace
`"--attach"` with `"--sample"` rather than adding both. Reload the client's
MCP configuration or start a new session, as that client requires.

### MCP over HTTP, for the open app only

While **Let your Agents Control RustGIS** is ticked, the app also serves MCP at
`http://127.0.0.1:8768/mcp`; a relay started with the **MCP Relay** command
alone does not. For Claude Code:

```sh
rustgis-cli mcp-register --client claude # registers it as rustgis-live
```

This passes the app's bearer token to `claude mcp add` as an argument, which
other users of the computer can see while it runs; on a shared computer, use
stdio instead.

Without `--client`, `rustgis-cli mcp-register` prints a configuration for other
clients. **That output contains the token, which lasts across launches**: do
not run it where the output reaches a transcript or a shared log. Have the user
run it, or use stdio.

## 4. Manage the already-open desktop app

1. Launch the installed RustGIS desktop app in the user's graphical session,
or keep the existing window and project. On Linux use `rustgis`; on macOS
open RustGIS.app; on Windows use its Start menu entry or `rustgis.exe`.
2. In RustGIS, open **Command Search (Ctrl+K)** and run **MCP Relay**
(`ui.mcpRelay`). If the agent cannot operate the UI, ask the user to perform
this one action; an unattached MCP server cannot start the app's listener.
Confirm the status bar says `MCP relay listening on 127.0.0.1:8767`.
(`ui.mcpRelay`), or tick **Let your Agents Control RustGIS** in the AI
Assistant's settings, which also allows file and network access. If the
agent cannot operate the UI, ask the user to perform this one action; an
unattached MCP server cannot start the app's listener. Confirm the status
bar says `MCP relay · n attached` (or `MCP relay · full access · n attached`).
3. Have the MCP client launch the attached command:

```sh
rustgis-cli mcp --attach # the open app on 127.0.0.1:8767
rustgis-cli mcp --attach --yes # also allow file and network access
```

The listener binds `127.0.0.1` only, on port **8767**, and remains active
until the desktop app closes. This is local external-agent management,
not an internet-facing service or an HTTP bridge. The agent must run on
The listener binds `127.0.0.1` only, on port **8767**, and runs until the
user stops it (a click on that status bar text) or the app closes. This is local external-agent
management, not an internet-facing service. The agent must run on
the desktop machine. To use another port, start the app command with
`ui.mcpRelay {"port": 9000}` and connect with
`rustgis-cli mcp --attach 9000 --yes`.
Expand All @@ -359,11 +394,9 @@ MCP configuration or start a new session, as that client requires.
`search_tools`/`describe_tool`; execute with `run_command`/`run_tool`.
Inspect `layersAdded`, `notices` and the resulting map before claiming
success. Each run is one undo step on the actual open project.
5. Save/export only to the user's intended destination. Opening, replacing,
undoing and saving now act on **the user's open project**, not a private
agent project. File and network commands **still require `--yes`**;
attaching does not bypass the MCP access policy. Plugin management,
scripts, tasks, models and the GeoLibre runner remain unavailable.
5. Save/export only to the user's intended destination: these act on **the
user's open project**, not a private agent project. What an attached agent
may do is in [SKILL.md](../SKILL.md#access-and-project-boundaries).

If connection fails, check the window is open, the status bar confirms the
relay, the port matches, and both installed executables support this feature.
Expand Down
Loading