helix-cli icon indicating copy to clipboard operation
helix-cli copied to clipboard

MCP Server

Open trieloff opened this issue 7 months ago • 3 comments

  • feat(mcp): add MCP command and logging tools
  • feat(mcp-logger): add resetLogs function and enhance logging tests
  • fix(stop-tool): handle string port values and improve error handling
  • test(mcp): bring test coverage up to 100%
  • docs(README): add section on using AEM as an MCP server

This PR adds a small MCP server that can be used to start, stop, and retrieve logs from a local AEM development server. Check the readme for details on running it, although to run it from a this branch, you'll need npx -y github:adobe/helix-cli#mcp mcp. Yep, that's mcp twice.

trieloff avatar Apr 24 '25 18:04 trieloff

Fun POC. The fact that the PR is not a draft worries me a little bit.

kptdobe avatar Apr 25 '25 07:04 kptdobe

This PR will trigger a minor release when merged.

github-actions[bot] avatar Apr 25 '25 09:04 github-actions[bot]

Screenshot 2025-04-25 at 13 53 25 Screenshot 2025-04-25 at 13 53 43 Screenshot 2025-04-25 at 13 54 01 Screenshot 2025-04-25 at 13 55 15

trieloff avatar Apr 25 '25 11:04 trieloff

so, what do we think?

trieloff avatar Sep 01 '25 12:09 trieloff

Closing this PR in favor of https://github.com/adobe/helix-cli/pull/2566 and https://github.com/adobe/aem-boilerplate/pull/532

Rationale: MCP servers for developers are easy to implement (as you can see from this implementation, no dependencies needed) and could be easy to set up if integrated into an existing CLI.

The benefits they offer against a traditional CLI are slim: somewhat better tool discovery at the price of consuming context window at every invocation. In my mind, this tradeoff is not worth it, as

  • coding agents are now competent in starting, stopping, and reading from background jobs
  • coding agents are reinforcement trained on standard CLIs, can explore options with --help and thanks to yargs our CLI is very standard
  • coding agents follow instructions provided in AGENTS.md and CLAUDE.md, so telling them to use and explore a tool at the project level is more powerful than a global installation

The things that would be helpful are:

  • better default instructions, hence adobe/aem-boilerplate#532
  • a consolidated place to see error messages, hence #2566

trieloff avatar Sep 12 '25 09:09 trieloff