MCPServer class

Main MCP server implementation

Constructors

MCPServer({required MCPTransport transport, required MCPServerConfig config, McpToolRegistry? toolRegistry, McpResourceRegistry? resourceRegistry, McpPromptRegistry? promptRegistry, McpLogger? logger})

Properties

config → MCPServerConfig
Get server config
no setter
hashCode → int
The hash code for this object.
no setterinherited
isInitialized → bool
Check if server is initialized
no setter
isRunning → bool
Check if server is running
no setter
prompts → McpPromptRegistry
Get the prompt registry for adding prompts
no setter
resources → McpResourceRegistry
Get the resource registry for adding resources
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
tools → McpToolRegistry
Get the tool registry for adding tools
no setter

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
start() → Future<void>
Start the MCP server
stop() → Future<void>
Stop the MCP server
toString() → String
A string representation of this object.
inherited

Operators

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