Skip to content
Closed
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
2 changes: 1 addition & 1 deletion cmd/gh-aw/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ func init() {
rootCmd.AddCommand(enableCmd)
rootCmd.AddCommand(disableCmd)
rootCmd.AddCommand(cli.NewLogsCommand())
rootCmd.AddCommand(cli.NewMCPInspectCommand())
rootCmd.AddCommand(cli.NewMCPCommand())
rootCmd.AddCommand(versionCmd)
}

Expand Down
22 changes: 11 additions & 11 deletions docs/src/content/docs/guides/mcps.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ tools:

> [!TIP]
> You can inspect test your MCP configuration by running <br/>
> `gh aw mcp-inspect <workflow-file>`
> `gh aw mcp inspect <workflow-file>`


### Engine Compatibility
Expand Down Expand Up @@ -168,7 +168,7 @@ When using an agentic engine that allows tool whitelisting (e.g. Claude), this g

> [!TIP]
> You can inspect the tools available for an Agentic Workflow by running <br/>
> `gh aw mcp-inspect <workflow-file>`
> `gh aw mcp inspect <workflow-file>`

### Wildcard Access

Expand Down Expand Up @@ -236,23 +236,23 @@ The compiler enforces these network permission rules:

### MCP Server Inspection

Use the `mcp-inspect` command to analyze and troubleshoot MCP configurations:
Use the `mcp inspect` command to analyze and troubleshoot MCP configurations:

```bash
# List all workflows with MCP servers configured
gh aw mcp-inspect
gh aw mcp inspect

# Inspect all MCP servers in a specific workflow
gh aw mcp-inspect my-workflow
gh aw mcp inspect my-workflow

# Inspect a specific MCP server in a workflow
gh aw mcp-inspect my-workflow --server trello-server
gh aw mcp inspect my-workflow --server trello-server

# Enable verbose output for debugging connection issues
gh aw mcp-inspect my-workflow --verbose
gh aw mcp inspect my-workflow --verbose
```

# Launch official MCP inspector web interface
gh aw mcp-inspect my-workflow --inspector
The `mcp inspect` command automatically generates MCP server configurations using the Claude agentic engine and displays them along with the inspection results.

### Common Issues and Solutions

Expand All @@ -278,13 +278,13 @@ Error: Tool 'my_tool' not found

**Solutions**:
1. Add tool to `allowed` list
2. Check tool name spelling (use `gh aw mcp-inspect` to see available tools)
2. Check tool name spelling (use `gh aw mcp inspect` to see available tools)
3. Verify MCP server is running correctly

## Related Documentation

- [Tools Configuration](../reference/tools/) - Complete tools reference
- [CLI Commands](../tools/cli/) - CLI commands including `mcp-inspect`
- [CLI Commands](../tools/cli/) - CLI commands including `mcp inspect`
- [Include Directives](../reference/include-directives/) - Modularizing workflows with includes
- [Frontmatter Options](../reference/frontmatter/) - All configuration options
- [Workflow Structure](../reference/workflow-structure/) - Directory organization
Expand Down
2 changes: 1 addition & 1 deletion docs/src/content/docs/reference/tools.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ All tools declared in included components are merged into the final workflow.

> [!TIP]
> You can inspect the tools available for an Agentic Workflow by running <br/>
> `gh aw mcp-inspect <workflow-file>`
> `gh aw mcp inspect <workflow-file>`

## GitHub Tools (`github:`)

Expand Down
15 changes: 6 additions & 9 deletions docs/src/content/docs/tools/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -189,28 +189,25 @@ gh aw logs --format json -o ./exports/

## 🔍 MCP Server Inspection

The `mcp-inspect` command allows you to analyze and troubleshoot Model Context Protocol (MCP) servers configured in your workflows.
The `mcp inspect` command allows you to analyze and troubleshoot Model Context Protocol (MCP) servers configured in your workflows.

> **📘 Complete MCP Guide**: For comprehensive MCP setup, configuration examples, and troubleshooting, see the [MCPs](../guides/mcps/).

```bash
# List all workflows that contain MCP server configurations
gh aw mcp-inspect
gh aw mcp inspect

# Inspect all MCP servers in a specific workflow
gh aw mcp-inspect workflow-name
gh aw mcp inspect workflow-name

# Filter inspection to specific servers by name
gh aw mcp-inspect workflow-name --server server-name
gh aw mcp inspect workflow-name --server server-name

# Show detailed information about a specific tool (requires --server)
gh aw mcp-inspect workflow-name --server server-name --tool tool-name
gh aw mcp inspect workflow-name --server server-name --tool tool-name

# Enable verbose output with connection details
gh aw mcp-inspect workflow-name --verbose

# Launch the official @modelcontextprotocol/inspector web interface
gh aw mcp-inspect workflow-name --inspector
gh aw mcp inspect workflow-name --verbose
```

**Key Features:**
Expand Down
24 changes: 24 additions & 0 deletions pkg/cli/mcp.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package cli

import (
"github.com/spf13/cobra"
)

// NewMCPCommand creates the mcp command with subcommands
func NewMCPCommand() *cobra.Command {
cmd := &cobra.Command{
Use: "mcp",
Short: "Model Context Protocol (MCP) server management",
Long: `Manage Model Context Protocol (MCP) servers used by agentic workflows.

This command provides subcommands for inspecting, configuring, and launching MCP servers.`,
Run: func(cmd *cobra.Command, args []string) {
_ = cmd.Help()
},
}

// Add subcommands
cmd.AddCommand(NewMCPInspectSubCommand())

return cmd
}
Loading
Loading