McpAddCommand class
The /mcp add command — registers MCP servers in Neomage configuration.
Supports three transport types:
- stdio: subprocess-based MCP servers (default)
- sse: Server-Sent Events over HTTP
- http: Standard HTTP transport
Options:
-s, --scope <scope> Configuration scope (local, user, project)
-t, --transport <transport> Transport type (stdio, sse, http)
-e, --env <KEY=val> Environment variables for stdio servers
-H, --header <Header: val> Headers for HTTP/SSE servers
--client-id <id> OAuth client ID for HTTP/SSE servers
--client-secret Prompt for OAuth client secret
--callback-port <port> Fixed OAuth callback port
--xaa Enable XAA (SEP-990) authentication
- Inheritance
-
- Object
- Command
- LocalCommand
- McpAddCommand
Constructors
- McpAddCommand({required String getCwd()})
Properties
-
aliases
→ List<
String> -
Alternative names for the command.
no setterinherited
- argumentHint → String?
-
Hint text for arguments.
no setteroverride
- description → String
-
User-visible description.
no setteroverride
- displayName → String
-
Human-facing display name.
no setterinherited
- getCwd → String Function()
-
Callback to get the current working directory.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- immediate → bool
-
Whether to execute immediately without waiting for stop point.
no setterinherited
- isEnabled → bool
-
Whether this command is enabled (feature flags, etc).
no setterinherited
- isHidden → bool
-
Whether this command is hidden from help/typeahead.
no setterinherited
- name → String
-
Command name (without the
/prefix).no setteroverride - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- source → CommandSource
-
Where this command was loaded from.
no setterinherited
- supportsNonInteractive → bool
-
Whether this command can run in non-interactive mode.
no setteroverride
- type → CommandType
-
Execution type.
no setterinherited
- whenToUse → String?
-
When to use this command (for skills discovery).
no setterinherited
Methods
-
execute(
String args, ToolUseContext context) → Future< CommandResult> -
Execute the command.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited