Skip to content

Commit 6dcfa08

Browse files
authored
feat: generalize MCP agent targets and refresh app icon (#31)
* feat: refresh app icon to the Mimir monogram mark Replace the placeholder favicon with the black/purple Mimir square mark used across brand surfaces, in both the Tauri app and the landing package. * feat(core): support custom MCP agent targets in setup and install-skill Generalize the previously hardcoded Claude/Codex/Kimi/OpenCode/Cline MCP helper generation into a configurable agentHelpers list. Add --agents, --mcp-name, --mcp-command, and --mcp-arg to `mimir setup` and `mimir install-skill` so an arbitrary MCP-compatible agent can be targeted without a source change.
1 parent 522c503 commit 6dcfa08

31 files changed

Lines changed: 857 additions & 336 deletions

AGENTS.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,10 +233,14 @@ General principles (KISS, DRY, YAGNI, SOLID) as applied in this codebase. Match
233233
- `packages/mimir-core/skills/mimir-audio-summary/SKILL.md` is the optional bundled audio-summary skill.
234234
- `packages/mimir-core/skills/mimir-markdown-report/SKILL.md` is the optional bundled Markdown-report
235235
skill.
236-
- `mimir setup` must keep generating agent-specific MCP helpers for easy local use:
236+
- `mimir setup` must keep generating agent-specific MCP helpers for easy local use by default:
237237
`.mimir/claude-mcp-server.json` for `claude mcp add-json`, `.mimir/codex-mcp.toml` for Codex
238238
config layers, `.mimir/kimi-mcp.json` for Kimi, `.mimir/opencode.jsonc` for OpenCode, and
239-
`.mimir/cline-mcp.json` for Cline.
239+
`.mimir/cline-mcp.json` for Cline. Keep `--agents` available on setup/install-skill so a target
240+
repository can generate only the helpers it uses and remove stale unselected helpers.
241+
- Keep `--mcp-name`, `--mcp-command`, and repeatable `--mcp-arg` available on setup/install-skill
242+
so repositories can generate MCP helper files for a stable server name or local wrapper script
243+
without post-processing `.mimir/`.
240244
- `mimir install-agent` owns native skill discovery for the main supported coding agents. Keep
241245
`--agents claude|codex|kimi|opencode|cline` targeted so a user can install only the agent they use,
242246
with project scope by default and user scope available through `--scope user`.

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,12 @@ Fresh setup keeps local state under one ignored `.mimir/` folder:
269269

270270
It detects the repository package manager and writes the MCP helper files with the right command:
271271
`pnpm exec mimir serve-mcp`, `npx mimir serve-mcp`, `yarn exec mimir serve-mcp`, or `bunx mimir serve-mcp`.
272+
When a repository needs a wrapper script or only a subset of agent helpers, make that explicit during
273+
setup:
274+
275+
```bash
276+
pnpm exec mimir setup --agents claude,codex --mcp-name project-docs --mcp-command ./scripts/serve-mcp.sh
277+
```
272278

273279
For the usual agent-first workflow, expose Mimir to the coding assistants used in the repository:
274280

@@ -467,6 +473,7 @@ Use `mimir setup` for the normal path, or install only the agent layer later:
467473

468474
```bash
469475
pnpm exec mimir install-skill
476+
pnpm exec mimir install-skill --agents claude,codex --mcp-command ./scripts/serve-mcp.sh
470477
pnpm exec mimir install-agent --agents claude,codex,kimi,opencode,cline
471478
```
472479

docs/agent-integration.md

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,21 @@ If `mimir setup` was not used, install the agent kit into a repository:
88
pnpm exec mimir install-skill
99
```
1010

11+
By default this writes helper files for every supported agent. To keep a repository focused on only
12+
the agents it uses, pass a comma-separated target list:
13+
14+
```bash
15+
pnpm exec mimir setup --agents claude,codex
16+
pnpm exec mimir install-skill --agents claude,codex
17+
```
18+
19+
If an agent must launch Mimir through a repository wrapper, generate the MCP helpers with that
20+
command:
21+
22+
```bash
23+
pnpm exec mimir setup --agents claude,codex --mcp-name project-docs --mcp-command ./scripts/serve-mcp.sh
24+
```
25+
1126
This creates:
1227

1328
```plain text
@@ -25,6 +40,10 @@ This creates:
2540
.mimir/README.md
2641
```
2742

43+
When `--agents` is used, Mimir keeps `.mimir/mcp.json`, the skill folders, and the shared guides, but
44+
only writes the selected agent helper files. Previously generated unselected helper files are
45+
removed from `.mimir/`.
46+
2847
Agents that support skill folders can load `.mimir/skills/mimir/` for deep local RAG usage. Load
2948
`.mimir/skills/mimir-audio-summary/` only when an optional spoken summary is needed. Load
3049
`.mimir/skills/mimir-markdown-report/` when the user asks for a cited Markdown report, dossier,
@@ -85,7 +104,7 @@ usage summaries and uses the returned citations.
85104
From the target repository root:
86105

87106
```bash
88-
pnpm exec mimir setup
107+
pnpm exec mimir setup --agents claude
89108
pnpm exec mimir install-agent --agents claude
90109
claude mcp add-json --scope local mimir "$(cat .mimir/claude-mcp-server.json)"
91110
```
@@ -100,7 +119,7 @@ config.
100119
From the target repository root:
101120

102121
```bash
103-
pnpm exec mimir setup
122+
pnpm exec mimir setup --agents codex
104123
pnpm exec mimir install-agent --agents codex
105124
cat .mimir/codex-mcp.toml
106125
```
@@ -114,7 +133,7 @@ skills.
114133
From the target repository root:
115134

116135
```bash
117-
pnpm exec mimir setup
136+
pnpm exec mimir setup --agents kimi
118137
pnpm exec mimir install-agent --agents kimi
119138
kimi --mcp-config-file .mimir/kimi-mcp.json
120139
```
@@ -129,7 +148,7 @@ Kimi's global MCP file if you intentionally want a global setup. If you prefer n
129148
From the target repository root:
130149

131150
```bash
132-
pnpm exec mimir setup
151+
pnpm exec mimir setup --agents opencode
133152
pnpm exec mimir install-agent --agents opencode
134153
cat .mimir/opencode.jsonc
135154
```
@@ -141,7 +160,7 @@ Copy or merge the generated snippet into the OpenCode config layer you use for t
141160
From the target repository root:
142161

143162
```bash
144-
pnpm exec mimir setup
163+
pnpm exec mimir setup --agents cline
145164
pnpm exec mimir install-agent --agents cline
146165
cat .mimir/cline-mcp.json
147166
```

docs/api-reference.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,18 @@ import { setupProject } from "@jcode.labs/mimir"
5757
const result = await setupProject({ cwd: "/path/to/workspace", ingest: true })
5858
```
5959

60+
Use `agents`, `mcpServerName`, `mcpCommand`, and `mcpArgs` when setup should generate only selected
61+
agent helpers or launch MCP through a repository wrapper:
62+
63+
```ts
64+
await setupProject({
65+
cwd: "/path/to/workspace",
66+
agents: ["claude", "codex"],
67+
mcpServerName: "project-docs",
68+
mcpCommand: "./scripts/serve-mcp.sh",
69+
})
70+
```
71+
6072
Useful result fields:
6173

6274
| Field | Meaning |
@@ -294,6 +306,9 @@ import { installSkill } from "@jcode.labs/mimir"
294306
const result = await installSkill({ cwd: "/path/to/workspace" })
295307
```
296308

309+
Pass the same `agents`, `mcpServerName`, `mcpCommand`, and `mcpArgs` options to refresh a targeted
310+
agent kit without re-running full setup.
311+
297312
The installed skills are:
298313

299314
- `mimir`

docs/cli-reference.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ Mimir ships two CLIs:
3232
| Command | Use it when |
3333
| --- | --- |
3434
| `mimir install-skill` | Copy portable agent skills and an MCP config snippet into `.mimir/`. |
35+
| `mimir install-agent --agents <list>` | Expose Mimir skills in native Claude, Codex, Kimi, OpenCode, or Cline discovery folders. |
3536
| `mimir skill-path` | Print the package-bundled skill path for agents that load installed package skills. |
3637
| `mimir serve-mcp` | Start the MCP stdio server for compatible agents. |
3738

@@ -58,6 +59,10 @@ Mimir ships two CLIs:
5859
| Option | Applies to | Meaning |
5960
| --- | --- | --- |
6061
| `--project-root <path>` | all project-scoped `mimir` commands | Run against a specific local workspace instead of the current directory. |
62+
| `--agents <list>` | `setup`, `install-skill`, `install-agent` | Select agent helpers or native skill folders: `all`, `claude`, `codex`, `kimi`, `opencode`, `cline`, or a comma-separated list. |
63+
| `--mcp-name <name>` | `setup`, `install-skill` | Set the MCP server name used in generated helper files. |
64+
| `--mcp-command <command>` | `setup`, `install-skill` | Use a repository wrapper or custom executable as the generated MCP stdio command. |
65+
| `--mcp-arg <arg>` | `setup`, `install-skill` | Add one argument to `--mcp-command`; repeat for multiple arguments. Use `--mcp-arg=--flag` for dash-prefixed values. |
6166
| `--top-k <number>` | `search`, `ask`, `research`, `evaluate` | Number of passages to return or keep. |
6267
| `--fail-under <recall>` | `evaluate` | Exit non-zero only when recall is below a threshold from `0` to `1`; without this option evaluation remains strict and fails on any miss. |
6368
| `--days <number>` | `usage-report` | Number of recent days to include in the metadata-only usage summary. |
Lines changed: 6 additions & 4 deletions
Loading

packages/mimir-core/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@ cat .mimir/opencode.jsonc
6060
cat .mimir/cline-mcp.json
6161
```
6262

63+
Use `pnpm exec mimir setup --agents claude,codex --mcp-command ./scripts/serve-mcp.sh` when a
64+
repository should generate only selected MCP helpers or launch through a local wrapper.
65+
6366
By default, Mimir keeps local config, raw documents, generated indexes, access logs, models, reports,
6467
audio, and agent helper files under a single ignored `.mimir/` project folder. It reports
6568
unsupported/skipped files during ingestion and reports supported files that produced no extractable

packages/mimir-core/dist/cli.js

Lines changed: 37 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/mimir-core/dist/cli.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/mimir-core/dist/doctor.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)