Repository navigation
Commit f7ec7c3
v0.48.2: morph setup writes absolute morph-mcp path
`morph setup cursor` (and the `claude-code` / `opencode` siblings, and
the `aoe` delegator) used to write `command: "morph-mcp"` (a bare name)
into the IDE integration JSON. Cursor on macOS is a GUI-launched app
and does NOT inherit the user's shell PATH, so the bare command failed
to spawn for Homebrew users on `/opt/homebrew/bin` — the agent saw the
`morph-record.mdc` rule but had no `morph_record_session` tool to call.
New `resolve_mcp_command()` helper in `morph-cli/src/setup.rs` resolves
`morph-mcp` to an absolute path at setup time. Resolution order, first
match wins:
1. `MORPH_MCP_PATH` env var (escape hatch)
2. `morph-mcp` sibling of the running `morph` binary via
`current_exe()` — common case for Homebrew, `cargo install`, AUR
3. Manual `PATH` walk
4. Bare-name fallback, with a stderr warning so the user knows they
may need to fix it manually
`SetupReport` / `OpenCodeSetupReport` / `ClaudeCodeSetupReport` carry
the resolved `mcp_command` string, and the CLI summary prints it as
`morph-mcp: <resolved path>` so a fresh setup immediately shows what
got written.
Tests:
- New spec `morph-cli/tests/specs/setup_cursor.yaml` (6 cases) pins
the contract end-to-end: file emission, absolute-path command, CLI
summary output, idempotency, existing-config preservation, missing
`.morph/` error.
- 2 new unit tests for `resolve_mcp_command()` covering env override
and bogus-override fallback.
- Existing setup_claude_code spec relaxes `'"morph-mcp"'` assertion
to `'morph-mcp"'` so it accepts both bare name and absolute path.
Metrics: 1220 / 1220 workspace tests passing
(41 + 8 + 432 + 10 + 2 + 659 + 31 + 37). Cucumber 34 / 37 (3 skipped,
0 failed) — no change. `cargo build` clean.
Co-authored-by: Cursor <cursoragent@cursor.com>1 parent 94ea328 commit f7ec7c3
9 files changed
Lines changed: 469 additions & 119 deletions
File tree
- morph-cli
- src
- tests/specs
- site
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
19 | 75 | | |
20 | 76 | | |
21 | 77 | | |
| |||
1592 | 1648 | | |
1593 | 1649 | | |
1594 | 1650 | | |
1595 | | - | |
| 1651 | + | |
| 1652 | + | |
1596 | 1653 | | |
1597 | 1654 | | |
1598 | 1655 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2275 | 2275 | | |
2276 | 2276 | | |
2277 | 2277 | | |
| 2278 | + | |
| 2279 | + | |
| 2280 | + | |
| 2281 | + | |
| 2282 | + | |
| 2283 | + | |
| 2284 | + | |
| 2285 | + | |
2278 | 2286 | | |
2279 | 2287 | | |
2280 | 2288 | | |
| |||
2310 | 2318 | | |
2311 | 2319 | | |
2312 | 2320 | | |
| 2321 | + | |
2313 | 2322 | | |
2314 | 2323 | | |
2315 | 2324 | | |
| |||
2330 | 2339 | | |
2331 | 2340 | | |
2332 | 2341 | | |
| 2342 | + | |
2333 | 2343 | | |
2334 | 2344 | | |
2335 | 2345 | | |
| |||
0 commit comments