Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 0 additions & 18 deletions cmd/gh-aw/main_entry_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -379,24 +379,6 @@ func TestMCPCommand(t *testing.T) {
}
})

t.Run("mcp command has serve subcommand", func(t *testing.T) {
mcpCmd, _, _ := rootCmd.Find([]string{"mcp"})
if mcpCmd == nil {
t.Fatal("mcp command not found")
}

found := false
for _, subCmd := range mcpCmd.Commands() {
if subCmd.Name() == "serve" {
found = true
break
}
}
if !found {
t.Error("mcp serve subcommand should be available")
}
})

t.Run("mcp inspect command help", func(t *testing.T) {
// Test help for nested command
mcpCmd, _, _ := rootCmd.Find([]string{"mcp"})
Expand Down
28 changes: 1 addition & 27 deletions docs/src/content/docs/tools/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -334,39 +334,13 @@ gh aw mcp add weekly-research server-name --registry https://custom.registry.com
- **Transport Selection**: Supports stdio, HTTP, and Docker transports
- **Custom Registries**: Can connect to private or custom MCP registries

#### MCP Server Development

```bash
# Launch MCP server exposing gh-aw CLI tools
gh aw mcp serve

# Serve with detailed logging
gh aw mcp serve -v

# Serve with only specific tools enabled
gh aw mcp serve --allowed-tools compile,logs,run
```

### MCP Server Development

The `mcp serve` command launches an MCP server that exposes gh-aw CLI functionality as MCP tools, making them available to AI assistants and other MCP clients:

**Available MCP Tools:**
- `compile` - Compile markdown workflow files to YAML
- `logs` - Download and analyze agentic workflow logs
- `mcp_inspect` - Inspect MCP servers and tools
- `mcp_list` - List MCP server configurations
- `mcp_add` - Add MCP tools to workflows
- `run` - Execute workflows on GitHub Actions
- `enable` - Enable workflow execution
- `disable` - Disable workflow execution
- `status` - Show workflow status

**Key Features:**
- **`mcp list`**: Quick overview of MCP servers across workflows with structured table output
- **`mcp inspect`**: Deep inspection with server connection testing and tool capability analysis
- **`mcp add`**: Registry-based MCP server addition with automatic workflow compilation
- **`mcp serve`**: Expose gh-aw functionality as MCP tools for AI assistants

- Server discovery and connection testing
- Tool and capability inspection
- Detailed tool information with `--tool` flag
Expand Down
4 changes: 1 addition & 3 deletions pkg/cli/mcp.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ MCP server configurations in your agentic workflows.
Available subcommands:
add - Add an MCP tool to an agentic workflow
list - List MCP servers defined in agentic workflows
inspect - Inspect MCP servers and list available tools, resources, and roots
serve - Launch an MCP server exposing CLI tools`,
inspect - Inspect MCP servers and list available tools, resources, and roots`,
Run: func(cmd *cobra.Command, args []string) {
_ = cmd.Help()
},
Expand All @@ -29,7 +28,6 @@ Available subcommands:
cmd.AddCommand(NewMCPAddSubcommand())
cmd.AddCommand(NewMCPListSubcommand())
cmd.AddCommand(NewMCPInspectSubcommand())
cmd.AddCommand(NewMCPServerSubcommand())

return cmd
}
Loading
Loading