Convenience function to create an MCP server with HTTP transport. This function creates a server instance and configures it for HTTP.
Usage
mcp_http(
name = NULL,
version = NULL,
host = "127.0.0.1",
port = 8080,
log_file = NULL,
log_level = "info"
)
Examples
if (FALSE) { # \dontrun{
# Create an HTTP MCP server
server <- mcp_http("My Server", "1.0.0", port = 3000)
# Add a tool
server$mcp_tool(
name = "greet",
fn = function(name) paste("Hello,", name),
description = "Greet someone"
)
# Start the server
server$mcp_run()
} # }