Skip to content

Add aexp install --dev for live editable-install MCP development#7

Merged
KadenMc merged 1 commit intomainfrom
add-install-dev-flag
Apr 23, 2026
Merged

Add aexp install --dev for live editable-install MCP development#7
KadenMc merged 1 commit intomainfrom
add-install-dev-flag

Conversation

@KadenMc
Copy link
Copy Markdown
Owner

@KadenMc KadenMc commented Apr 23, 2026

Summary

Closes the asymmetry between how aexp install routes CLI/Python/hooks (via the current interpreter — honours editable installs) vs how it routes the MCP server (via uvx --from agentic-experiments[mcp] — always fetches from PyPI). For consumers the asymmetry is invisible. For maintainers doing pip install -e work on aexp itself, it meant source edits reached every surface except MCP.

  • aexp install --dev (and install_limina(..., dev=True)) now writes an aexp MCP entry as {"command": sys.executable, "args": ["-m", "aexp.mcp_server"], ...} so editable installs flow through to MCP.
  • The dev-mode advisory prints whenever --dev is set, including under --yes, so users always see the "don't commit this .mcp.json" warning.
  • Docs (docs/mcp.md, docs/cli.md, CLI help) document the flag, its trade-offs, and that MCP-layer edits require a server restart.
  • Version bumped to 0.1.1; CHANGELOG entry added.

Default behaviour (no flag) is unchanged: the portable uvx/PyPI form remains the committable default for consumers.

Test plan

  • tests/test_install.py::test_install_dev_mcp_entry_uses_current_interpreter
  • tests/test_install.py::test_install_dev_flag_can_be_toggled_on_reinstall
  • tests/test_cli.py::test_cli_install_dev_flag_writes_current_interpreter_to_mcp_json
  • Existing MCP / CLI / install tests still pass (50 total in the two suites)
  • Ruff clean
  • CI green on 6-job matrix before merge

Closes a seam where four surfaces (CLI / Python API / hooks / MCP) were
routed through two different resolution paths:

- CLI, Python imports, and hooks already went through the current env's
  Python interpreter, so an editable ``pip install -e`` showed up
  immediately on those three surfaces.
- The MCP server, by contrast, was always wired via
  ``uvx --from agentic-experiments[mcp]`` — a PyPI fetch into uv's own
  cache that ignores the user's env. Consumers never noticed (their env
  and the uvx cache resolved to byte-identical PyPI snapshots), but
  maintainers editing ``src/aexp/mcp_server.py`` saw their edits land
  everywhere except MCP.

Rather than paper over it with a post-install hand-edit to ``.mcp.json``,
expose it as a first-class install option:

- ``install_limina(..., dev=True)`` and ``aexp install --dev`` write an
  ``aexp`` MCP entry of the form
  ``{"command": sys.executable, "args": ["-m", "aexp.mcp_server"], ...}``
  so whatever ``aexp`` is installed in the current interpreter is what
  runs on the MCP side — including editable installs.
- The dev-mode advisory is printed unconditionally when ``--dev`` is
  set, including under ``--yes``, so users are always warned that the
  resulting ``.mcp.json`` is machine-specific and must not be committed.
- Docs (``docs/mcp.md``, ``docs/cli.md``, and CLI help text) updated to
  document the flag, its trade-offs, and the restart requirement for
  MCP-layer edits.

Default behaviour (``dev=False``) is unchanged: the portable uvx/PyPI
form remains the committable default for consumers.

Bumps version to 0.1.1 and adds a CHANGELOG entry.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@KadenMc KadenMc merged commit c099f67 into main Apr 23, 2026
6 checks passed
@KadenMc KadenMc deleted the add-install-dev-flag branch April 23, 2026 00:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant