This function starts a simple MCP server with a single "hello" tool
that demonstrates the mcpr package is working correctly.
Usage
mcp_hello_world(host = "127.0.0.1", port = 8080)
Arguments
- host
Character string specifying the host to bind to (default: "127.0.0.1")
- port
Integer specifying the port to listen on (default: 8080)
Value
Invisible NULL. The function starts the server which runs
until interrupted.
Examples
if (FALSE) { # \dontrun{
# Start the hello world server
mcp_hello_world()
# To use with Claude Desktop, add to your config:
# {
# "mcpServers": {
# "r-hello": {
# "url": "http://localhost:8080/mcp"
# }
# }
# }
} # }