| mcp_start | R Documentation |
Spawns an MCP server process and connects to it. Requires the server script to support –port argument.
mcp_start(command, args = character(), port = NULL, name = NULL,
startup_wait = 2)
command |
Character. Command to run the server (e.g., "r", "Rscript"). |
args |
Character vector. Arguments (path to server script). |
port |
Integer. Port for the server (default: random 7850-7899). |
name |
Character. Friendly name. |
startup_wait |
Numeric. Seconds to wait for server startup. |
An MCP connection object.
## Not run:
conn <- mcp_start("Rscript", args = "mcp_server.R", port = 7850)
mcp_close(conn)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.