834 B
834 B
Inspector Example
This is a simple example of how to use the MCP module to create a server that handles JSON-RPC requests and responses.
Usage
import freeflowuniverse.herolib.mcp
// Define custom handlers if needed
handlers := {
'custom_method': my_custom_handler
}
// Create server configuration
config := mcp.ServerConfiguration{
// Configure server capabilities as needed
}
// Create and start the server
mut server := mcp.new_server(handlers, config)!
server.start()!
Running Example
bash example.shopen localhost:5173- Configure inspector:
- Transport type:
STDIO - Command:
v - Arguments:
-w -n run /Users/timurgordon/code/github/freeflowuniverse/herolib/lib/mcp/v_do/vdo.v
- Transport type:
- Connect
