Skip to content

feat(mcp): serve tools from the Ix CLI instead of shipping a server - #24

Open
KageBinary wants to merge 1 commit into
mainfrom
feat/mcp-delegate-to-ix-cli
Open

feat(mcp): serve tools from the Ix CLI instead of shipping a server#24
KageBinary wants to merge 1 commit into
mainfrom
feat/mcp-delegate-to-ix-cli

Conversation

@KageBinary

@KageBinary KageBinary commented Aug 12, 2026

Copy link
Copy Markdown
Collaborator

Replaces this plugin's own MCP server with the one the Ix CLI now ships.

What changed

mcp/server.py was a 468-line FastMCP server whose 23 tools each shelled out to the ix CLI. The CLI serves the same 23 tools itself as ix mcp, so this was a second implementation of one surface — maintained here, and drifting independently of the other five plugins' servers.

--mcp now registers the CLI's server instead of copying one, delegating to ix mcp install --host codex.

Tool parity is exact. ix mcp serves the same 23 names this server did, verified by diffing the two surfaces. Nothing an agent could call before is gone.

Windows

Registration goes through ix mcp install rather than a hand-built codex mcp add, so the launcher is resolved once in the CLI. npm ships no ix.exe — only ix.CMD — and a host spawning the bare name through CreateProcess never consults PATHEXT. That is the failure #13 fixed here; the CLI now makes the same fix once for all seven hosts it knows about.

Version floor

Gated on ix >= 0.9.3, the first release carrying ix mcp. Below that the installer says so and does nothing, rather than writing a registration that cannot start.

This PR cannot land before that release exists. It is opened now so the migration is reviewable, not because it is ready to merge.

Tests

Removed with the server:

  • tests/test_mcp_cli_invocation.py (431 lines, drove all 23 tools against a stub ix)
  • tests/test_llm_fastpath.py and mcp/ix_llm.py — added by feat(mcp): use --format llm where the installed CLI supports it #23 after this branch was cut. ix_llm.py was imported only by server.py; the CLI does its own --format llm selection internally, so the fast-path is not lost, just no longer this repo's to gate.
  • the test-local.sh checks that imported the module to count its tools

Replaced by checks that the installer copies nothing and that the version floor is not below the subcommand. bash test-local.sh passes, and CI is green on ubuntu and windows.

Not in scope

Agents, hooks and skills stay exactly as they are. MCP standardizes tools, not hooks or skills, so they cannot move — see docs/mcp-plugin-consolidation.md in the Ix repo for the full matrix.

This plugin installed `mcp/server.py`, a 468-line FastMCP server whose 23
tools each shelled out to the `ix` CLI. The CLI now serves the same 23
tools itself as `ix mcp`, so the copy here was a second implementation of
one surface, maintained separately and drifting independently of the other
five plugins' servers.

`--mcp` now registers the CLI's server rather than copying one, delegating
to `ix mcp install --host codex` so per-host detail lives in one place.
That includes resolving the launcher on Windows: npm ships no `ix.exe`,
only `ix.CMD`, and a host spawning the bare name through CreateProcess
never consults PATHEXT — the fix this repo made in #13, now made once in
the CLI for all seven hosts it knows about.

Registration is gated on `ix >= 0.9.3`, the first release carrying the
subcommand. Below that the installer says so and does nothing rather than
writing a registration that cannot start.

Tool parity is exact: the CLI serves the same 23 names this server did, so
nothing an agent could call before is gone.

Removed with the server: tests/test_mcp_cli_invocation.py, which drove all
23 tools against a stub `ix`, and the test-local.sh checks that imported
the module to count its tools. Replaced by checks that the installer
delegates and that the version floor is not below the subcommand.
@KageBinary
KageBinary force-pushed the feat/mcp-delegate-to-ix-cli branch from 90390f1 to e060586 Compare August 12, 2026 00:28
@KageBinary

Copy link
Copy Markdown
Collaborator Author

The version gate is satisfied — ix v0.9.3 is released.

ix mcp is in the published artifact; verified by extracting ix-0.9.3-linux-amd64.tar.gz and running ix mcp --help against it. The Homebrew formula is on v0.9.3 too (it had been stuck on v0.9.1), so brew install ix gets a CLI with the command as well.

Nothing further is needed here — the floor this PR gates on now exists. Ready to merge; the repo ruleset means it needs someone with bypass rights.

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