| mcp_connect | R Documentation |
Connects to an MCP server via TCP socket.
mcp_connect(host = "localhost", port, name = NULL, timeout = 30)
host |
Character. Server hostname (default: "localhost"). |
port |
Integer. Server port. |
name |
Character. Friendly name for this server. |
timeout |
Numeric. Connection timeout in seconds (default: 30). |
An MCP connection object (list with socket and tools).
## Not run:
# Start server first: r mcp_server.R --port 7850
conn <- mcp_connect(port = 7850, name = "codeR")
tools <- mcp_tools(conn)
result <- mcp_call(conn, "read_file", list(path = "README.md"))
mcp_close(conn)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.