Add aexp install --dev for live editable-install MCP development#7
Merged
Add aexp install --dev for live editable-install MCP development#7
aexp install --dev for live editable-install MCP development#7Conversation
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>
This was referenced Apr 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes the asymmetry between how
aexp installroutes CLI/Python/hooks (via the current interpreter — honours editable installs) vs how it routes the MCP server (viauvx --from agentic-experiments[mcp]— always fetches from PyPI). For consumers the asymmetry is invisible. For maintainers doingpip install -ework onaexpitself, it meant source edits reached every surface except MCP.aexp install --dev(andinstall_limina(..., dev=True)) now writes anaexpMCP entry as{"command": sys.executable, "args": ["-m", "aexp.mcp_server"], ...}so editable installs flow through to MCP.--devis set, including under--yes, so users always see the "don't commit this.mcp.json" warning.docs/mcp.md,docs/cli.md, CLI help) document the flag, its trade-offs, and that MCP-layer edits require a server restart.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_interpretertests/test_install.py::test_install_dev_flag_can_be_toggled_on_reinstalltests/test_cli.py::test_cli_install_dev_flag_writes_current_interpreter_to_mcp_json