mcptools icon indicating copy to clipboard operation
mcptools copied to clipboard

Refactor main.go to modular subcommands in commands/ directory

Open ayakutt opened this issue 1 year ago • 1 comments

The current main.go in cmd/mcptools is becoming large and harder to maintain, as it contains the logic for all MCP subcommands. To improve readability, maintainability, and testability, we should refactor the code into smaller chunks by moving each subcommand into its own file under a new commands/ directory.

Proposed structure:

cmd/mcptools/
    - main.go
    - main_test.go
    commands/
      - tools.go
      - prompts.go
      .
      .
      .

@f wdyt? Since it's a fairly big refactor, I wanted to open an issue before sending a PR — I also have a proof of concept commit (fully generated by Claude, though I haven’t reviewed it yet).

ayakutt avatar Apr 03 '25 22:04 ayakutt

That would be awesome.

f avatar Apr 04 '25 06:04 f