Mcp
Category: Commands
Source: mcp.dart
Classes
McpSlashCommand
/mcp — inspect MCP server state inside a running Glue session.
Forms: • /mcp → opens a status panel (visual table) • /mcp list → prints a text table inline (greppable)
Action sub-commands (toggle, reconnect, call, auth) land in B7.
Constructor
dart
McpSlashCommand(this.ctx)Properties
| Property | Type | Description |
|---|---|---|
ctx | SlashCommandContext | |
name | String get | |
description | String get | |
argCompleter | SlashArgCompleter? get | |
name | String get | |
description | String get | |
argCompleter | SlashArgCompleter? get |
Methods
String execute(List<String> args)
Functions
`List<String> resolveMcpAuthActions({
required McpServerSpec spec, required McpConnectionState state, required bool hasAccessToken, })`
Returns the auth-related action labels for a server, in display order. Pure helper — exposed at top-level for testability.
stdio servers always return an empty list. For HTTP/WS servers: • 'Authenticate' when no access token is stored OR the server is in [McpAwaitingAuth]. • 'Re-authenticate' + 'Sign out' when an access token is stored.