McpServerSpec class

Constructors

McpServerSpec({required String name, required McpServerTransport transport, String? command, List<String> args = const <String>[], String? url, Map<String, String> headers = const <String, String>{}, Map<String, String> env = const <String, String>{}})
const

Properties

args → List<String>
Process args (stdio transport). Ignored for HTTP / SSE.
final
command → String?
Process command (stdio transport). Ignored for HTTP / SSE.
final
env → Map<String, String>
Environment overrides handed to the child process (stdio transport).
final
hashCode → int
The hash code for this object.
no setterinherited
headers → Map<String, String>
Auth / context headers attached to the HTTP / SSE request.
final
name → String
Logical name. Becomes the key under mcpServers in the generated --mcp-config file.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
transport → McpServerTransport
final
url → String?
Endpoint URL (HTTP / SSE transport). Ignored for stdio.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toMcpConfigEntry() → Map<String, dynamic>
Render as a single mcpServers map entry suitable for --mcp-config consumption.
toMcpServersBlock() → Map<String, dynamic>
Render the full mcpServers block holding only this entry.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited