MCPServer class

MCP Server implementation following the Model Context Protocol

Constructors

MCPServer({required String serverName, required String serverVersion})

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

getToolInfo(String name) MCPToolInfo?
Get tool info
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
registerResource(String uri, MCPResourceHandler handler) → void
Register a resource
registerTool(String name, MCPToolHandler handler, MCPToolInfo info) → void
Register a tool
start() Future<void>
Start the MCP server (stdio mode)
toString() String
A string representation of this object.
inherited

Operators

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