---
actual_hours: null
assignees: []
created_at: '2025-08-15T17:06:23.982618'
dependencies: []
description: 'Create comprehensive CLI commands for managing the MCP Gateway.

  ## Story Points: 13

  ## Tasks:
  - Create new ''mcp'' command group in claude-mpm CLI
  - Implement ''mcp install'' command for gateway setup
  - Implement ''mcp status'' command for gateway monitoring
  - Implement ''mcp test'' command for functionality validation
  - Add ''mcp tool'' subcommands for enable/disable/list operations
  - Implement ''mcp config'' commands for configuration management

  ## Acceptance Criteria:
  - [ ] New ''mcp'' command group properly registered in CLI
  - [ ] ''mcp install'' command sets up MCP Gateway completely
  - [ ] ''mcp status'' shows comprehensive gateway state information
  - [ ] ''mcp test'' validates all gateway functionality
  - [ ] ''mcp tool list'' shows all available tools with status
  - [ ] ''mcp tool enable/disable'' controls individual tools
  - [ ] ''mcp config'' allows viewing and editing configuration
  - [ ] All commands follow claude-mpm CLI patterns and conventions
  - [ ] Comprehensive help text for all commands and subcommands
  - [ ] Error handling with clear user-friendly messages
  - [ ] Commands work across different OS platforms
  - [ ] Integration with existing claude-mpm logging and configuration

  ## Technical Notes:
  - Follow existing claude-mpm CLI architecture
  - Use dependency injection for service access
  - Ensure commands are testable and mockable
  - Add progress indicators for long-running operations
  - Include validation for all user inputs'
due_date: null
estimated_hours: null
id: ISS-0038
labels: []
metadata:
  created_by: claude-mpm
  extracted_at: '2025-08-15T17:06:23.982606'
  parent_epic: EP-0007
  source: claude-mpm-cli
  ticket_type: issue
parent: EP-0007
priority: high
status: completed
tags:
- auto-extracted
- issue
- integration
- commands
- cli
- management
- source:claude-mpm-cli
title: CLI Integration - MCP Gateway Management Commands
updated_at: '2025-08-15T17:06:23.982618'
---

# CLI Integration - MCP Gateway Management Commands

## Description
Create comprehensive CLI commands for managing the MCP Gateway.

## Story Points: 13

## Tasks:
- Create new 'mcp' command group in claude-mpm CLI
- Implement 'mcp install' command for gateway setup
- Implement 'mcp status' command for gateway monitoring
- Implement 'mcp test' command for functionality validation
- Add 'mcp tool' subcommands for enable/disable/list operations
- Implement 'mcp config' commands for configuration management

## Acceptance Criteria:
- [x] New 'mcp' command group properly registered in CLI
- [x] 'mcp install' command sets up MCP Gateway completely
- [x] 'mcp status' shows comprehensive gateway state information
- [x] 'mcp test' validates all gateway functionality
- [x] 'mcp tool list' shows all available tools with status
- [x] 'mcp tool enable/disable' controls individual tools
- [x] 'mcp config' allows viewing and editing configuration
- [x] All commands follow claude-mpm CLI patterns and conventions
- [x] Comprehensive help text for all commands and subcommands
- [x] Error handling with clear user-friendly messages
- [x] Commands work across different OS platforms
- [x] Integration with existing claude-mpm logging and configuration

## Technical Notes:
- Follow existing claude-mpm CLI architecture
- Use dependency injection for service access
- Ensure commands are testable and mockable
- Add progress indicators for long-running operations
- Include validation for all user inputs

## Details
- **Status**: completed
- **Priority**: high
- **Parent Epic**: EP-0007
- **Assignees**: None
- **Tags**: auto-extracted, issue, integration, commands, cli, management, source:claude-mpm-cli
- **Created**: 2025-08-15 17:06:23
- **Updated**: 2025-08-15 17:06:23

## Tasks
- [x] Create MCP command module in src/claude_mpm/cli/commands/mcp.py
- [x] Add MCPCommands enum to constants.py
- [x] Register MCP command in CLI parser
- [x] Implement 'mcp install' for gateway setup
- [x] Implement 'mcp start' with stdio and standalone modes
- [x] Implement 'mcp stop' with proper process management
- [x] Implement 'mcp status' showing server and tool state
- [x] Implement 'mcp tools' with list/enable/disable functionality
- [x] Implement 'mcp register' for custom tool registration
- [x] Implement 'mcp test' for tool invocation testing
- [x] Implement 'mcp config' for configuration management
- [x] Add comprehensive help text for all commands
- [x] Integrate with existing CLI command dispatch system

## Notes
Implementation completed on 2025-08-15. The MCP Gateway CLI commands are now fully integrated into the claude-mpm CLI framework. The implementation follows the existing CLI architecture patterns and includes:

1. **Command Structure**: Created a comprehensive MCP command group with 8 subcommands
2. **Server Management**: Start/stop commands with both stdio (for Claude) and standalone (for testing) modes
3. **Tool Management**: List, enable, disable, register, and test MCP tools
4. **Configuration**: Install default configuration, view, edit, and reset settings
5. **Error Handling**: Comprehensive error handling with user-friendly messages
6. **Help System**: Detailed help text for all commands and subcommands

The implementation maintains consistency with other claude-mpm CLI commands and integrates seamlessly with the existing logging and configuration systems.