diff --git a/examples/mpc/inspector/README.md b/examples/mpc/inspector/README.md new file mode 100644 index 00000000..10b36413 --- /dev/null +++ b/examples/mpc/inspector/README.md @@ -0,0 +1,38 @@ +# 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 + +```v +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 + +1. `bash example.sh` +2. `open localhost:5173` +3. Configure inspector: + - Transport type: `STDIO` + - Command: `v` + - Arguments: `-w -n run /Users/timurgordon/code/github/freeflowuniverse/herolib/lib/mcp/v_do/vdo.v` +4. Connect + +## Output + +Expected output: +![Inspector Screenshot](inspector_screenshot.png) \ No newline at end of file diff --git a/examples/mpc/inspector/example.sh b/examples/mpc/inspector/example.sh new file mode 100644 index 00000000..281d6319 --- /dev/null +++ b/examples/mpc/inspector/example.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +npx @modelcontextprotocol/inspector node build/index.js \ No newline at end of file diff --git a/examples/mpc/inspector/inspector_screenshot.png b/examples/mpc/inspector/inspector_screenshot.png new file mode 100644 index 00000000..1dcfcbcb Binary files /dev/null and b/examples/mpc/inspector/inspector_screenshot.png differ