feat(cli): add mcpctl config prime-agent — proxy MCP + skills sync for prime-agent #93

Merged
michal merged 1 commits from feat/config-prime-agent into main 2026-08-08 09:19:33 +00:00
Owner

Summary

Adds mcpctl config prime-agent — a mirror of mcpctl config claude that wires a project's proxy MCP gateway and skills sync into prime-agent (Claude's open-source counterpart, which talks to the same mcpctl gateway over HTTP instead of stdio).

mcpctl config prime-agent --project X:

  1. Registers the proxy MCP gateway in ~/.prime/agent/settings.json as mcpServers.X = { type: "http", url: <gateway>/projects/X/mcp }, merging with any existing servers (e.g. the bundled sre project) and preserving all other settings.
  2. Writes a .mcpctl-project marker so later syncs resolve the project scope.
  3. Syncs the project's skills into ~/.prime/agent/skills/<name>/ as markdown skills (prime-agent auto-discovers them at session start).

Also adds mcpctl skills sync --agent prime-agent to re-sync the tree later, regenerated shell completions, README documentation, and unit tests.

What changed

  • src/cli/src/config/prime-agent.ts — prime-agent settings.json read/merge/write helpers
  • src/cli/src/utils/prime-agent-skills.ts — prime-agent skill sync (reuses atomic install + hash-pinned state; skips Claude-only hooks/postInstall)
  • src/cli/src/commands/config.ts / skills.ts — command wiring (--agent prime-agent, prime-agent / prime-agent-generate aliases)
  • completions/* regenerated; completions.test.ts hardened (anchored the create agent regex)
  • Tests: tests/commands/prime-agent.test.ts, tests/utils/prime-agent-skills.test.ts

Validation

  • tsc --build passes; full CLI test suite 525/525 green
  • Live-verified against the deployed gateway: initializebegin_sessiontools/list (121 tools) → real tools/call round-trip
## Summary Adds `mcpctl config prime-agent` — a mirror of `mcpctl config claude` that wires a project's proxy MCP gateway and skills sync into prime-agent (Claude's open-source counterpart, which talks to the same mcpctl gateway over HTTP instead of stdio). `mcpctl config prime-agent --project X`: 1. Registers the proxy MCP gateway in `~/.prime/agent/settings.json` as `mcpServers.X = { type: "http", url: <gateway>/projects/X/mcp }`, merging with any existing servers (e.g. the bundled `sre` project) and preserving all other settings. 2. Writes a `.mcpctl-project` marker so later syncs resolve the project scope. 3. Syncs the project's skills into `~/.prime/agent/skills/<name>/` as markdown skills (prime-agent auto-discovers them at session start). Also adds `mcpctl skills sync --agent prime-agent` to re-sync the tree later, regenerated shell completions, README documentation, and unit tests. ## What changed - `src/cli/src/config/prime-agent.ts` — prime-agent settings.json read/merge/write helpers - `src/cli/src/utils/prime-agent-skills.ts` — prime-agent skill sync (reuses atomic install + hash-pinned state; skips Claude-only hooks/postInstall) - `src/cli/src/commands/config.ts` / `skills.ts` — command wiring (`--agent prime-agent`, `prime-agent` / `prime-agent-generate` aliases) - `completions/*` regenerated; `completions.test.ts` hardened (anchored the `create agent` regex) - Tests: `tests/commands/prime-agent.test.ts`, `tests/utils/prime-agent-skills.test.ts` ## Validation - `tsc --build` passes; full CLI test suite 525/525 green - Live-verified against the deployed gateway: `initialize` → `begin_session` → `tools/list` (121 tools) → real `tools/call` round-trip
michal added 1 commit 2026-08-08 08:51:13 +00:00
feat(cli): add mcpctl config prime-agent — proxy MCP + skills sync for prime-agent
Some checks failed
CI/CD / lint (pull_request) Successful in 1m6s
CI/CD / typecheck (pull_request) Successful in 2m10s
CI/CD / test (pull_request) Successful in 1m19s
CI/CD / smoke (pull_request) Failing after 1m53s
CI/CD / build (pull_request) Successful in 4m14s
CI/CD / publish (pull_request) Has been skipped
582f6f185b
Mirror `mcpctl config claude` for prime-agent (which talks to the same mcpctl
proxy MCP gateway over HTTP instead of stdio):

`mcpctl config prime-agent --project X`:
- registers the proxy MCP gateway in ~/.prime/agent/settings.json as
  mcpServers.X = { type: "http", url: <gateway>/projects/X/mcp }, merging with
  any existing servers (e.g. the bundled `sre` project) and preserving all other
  settings
- writes a .mcpctl-project marker so later syncs resolve the project
- syncs the project's skills into ~/.prime/agent/skills/<name>/ as markdown
  skills (prime-agent auto-discovers them at session start)

New `mcpctl skills sync --agent prime-agent` target re-syncs the tree later.

- src/cli/src/config/prime-agent.ts: settings.json read/merge/write helpers
- src/cli/src/utils/prime-agent-skills.ts: prime-agent sync (reuses
  installSkillAtomic + skills-state; skips Claude-only hooks/postInstall)
- completes config.ts/skills.ts wiring; regenerated shell completions
- tests: commands/prime-agent.test.ts + utils/prime-agent-skills.test.ts
michal merged commit d56a074733 into main 2026-08-08 09:19:33 +00:00
michal deleted branch feat/config-prime-agent 2026-08-08 09:19:33 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: michal/mcpctl#93