Merge remote-tracking branch 'origin/main' into feat/pi-extension

# Conflicts:
#	README.md
#	src/cli/src/commands/config.ts
#	src/cli/src/commands/skills.ts
This commit is contained in:
Michal
2026-08-08 16:35:51 +01:00
13 changed files with 1849 additions and 39 deletions

View File

@@ -113,7 +113,64 @@ This writes a `.mcp.json` that tells Claude Code to connect through mcplocal. Re
mcpctl console monitoring # Preview what Claude sees
```
### 7. Use mcpctl with pi (no MCP client, no Claude)
### Connect prime-agent
Prime-agent (Claude's open-source counterpart) talks to the same proxy MCP
gateway over HTTP rather than stdio. Register a project and sync its skills
into `~/.prime/agent/`:
```bash
mcpctl config prime-agent --project monitoring
```
This:
1. Provisions the project's bearer credential in `~/.prime/agent/auth.json`
(`mcp:monitoring`, written 0600) — either from `--token <pat>`, an existing
entry that is still active server-side, or a freshly minted project token.
This happens first: if no credential can be provisioned the command stops
here with a non-zero exit and leaves `settings.json` alone, so the project
you are currently on keeps working.
2. Registers the proxy MCP gateway in `~/.prime/agent/settings.json` as
`mcpServers.monitoring = { "type": "http", "url": "https://mcp.ad.itaz.eu/projects/monitoring/mcp" }`
(merging with any existing servers and preserving all other settings), and
unmounts the previously active mcpctl project so exactly one is live.
Servers you configured by hand are never touched.
3. Writes a `.mcpctl-project` marker (only if none exists higher up, and never
from `$HOME`) so later syncs resolve the project. Skip with `--skip-marker`.
4. Syncs the project's skills into `~/.prime/agent/skills/<name>/` as markdown
skills. The shared tree is ownership-tracked per project: it never deletes
another project's skills or an untracked hand-authored skill.
5. Installs a `/mcpctl` project-switcher extension into
`~/.prime/agent/extensions/` so you can switch mcpctl projects from inside
the prime-agent UI (skip with `--skip-extension`).
Re-sync later with:
```bash
mcpctl skills sync --agent prime-agent --project monitoring
```
Skip individual steps as needed:
```bash
mcpctl config prime-agent --project monitoring --token mcpctl_pat_xxx # provide token, don't mint
mcpctl config prime-agent --project monitoring --skip-skills # don't sync skills
mcpctl config prime-agent --project monitoring --skip-extension # don't install /mcpctl switcher
mcpctl config prime-agent --project monitoring --skip-marker # don't touch .mcpctl-project here
```
The `/mcpctl` switcher runs with `--skip-extension --skip-marker`, so switching
projects from inside prime-agent never re-scopes whichever repository
prime-agent happened to be started in.
Preview the change without writing anything:
```bash
mcpctl config prime-agent --project monitoring --dry-run
```
### Connect pi
[pi](https://github.com/earendil-works/pi) does not support MCP, but it supports
**extensions** and **skills**. mcpctl ships a native pi integration that talks
@@ -134,6 +191,7 @@ Inside pi:
- `/mcpctl` — status, **switch project** (from the GUI), refresh tools, sync skills
- gated projects auto-ungate: call `begin_session` once and the full tool set opens
- re-sync with `mcpctl skills sync --agent pi --project monitoring`
See [docs/pi-extension.md](docs/pi-extension.md) for full details.