Skip to content

Research: CLI interface for standalone usage #94

@jongalloway

Description

@jongalloway

Description

pptx-mcp was designed exclusively as an MCP server for AI assistants, but Phase 4 has produced several tools with strong standalone value — particularly the optimization tools (file size analysis, unused layout removal, media deduplication, image compression). These are useful as one-off operations or in scripted workflows outside of an LLM coding agent scenario.

Research Questions

  1. CLI interface design: What would a CLI look like? Options include:

    • \dotnet run\ with command-line arguments (e.g., \pptx-mcp optimize --file presentation.pptx --dpi 150)
    • A separate \pptx-cli\ project that references PresentationService directly
    • A \dotnet tool\ global/local tool package
  2. Dual-mode architecture: Can the same binary serve as both MCP server (stdio) and CLI tool (args)? Pattern: if args are present, run CLI mode; if no args, run MCP stdio mode.

  3. Candidate commands for CLI exposure:

    • \pptx optimize \ — run all optimizations (compress images, deduplicate media, remove unused layouts)
    • \pptx analyze \ — file size analysis + media analysis report
    • \pptx compress-images --dpi 150 --quality 85\ — image optimization only
    • \pptx deduplicate \ — media deduplication only
    • \pptx cleanup \ — remove unused layouts + masters
  4. Distribution: \dotnet tool install\ via NuGet? Single-file publish? Both?

  5. Impact on MCP server: Would adding CLI mode affect the MCP server's behavior, startup, or dependencies?

Acceptance Criteria

  • Research viable CLI patterns for .NET MCP servers
  • Propose CLI command structure
  • Evaluate dual-mode (MCP + CLI) vs separate project tradeoffs
  • Prototype preferred approach
  • Document decision

Notes

  • This is a research/spike issue — output is a decision document, not necessarily a shipped feature
  • Current PresentationService methods are already well-factored for reuse (thin MCP tools, business logic in service)
  • Magick.NET dependency (added in P4-6: Compress/optimize images #85) increases binary size — relevant for distribution decisions

Metadata

Metadata

Assignees

No one assigned

    Labels

    go:needs-researchNeeds investigationsquadSquad triage inbox — Lead will assign to a membersquad:cherittoAssigned to Cheritto (Backend Dev)squad:mccauleyAssigned to McCauley (Lead)type:featureNew capability

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions