mcp.Rd
Functions for interacting with MCP servers, which provide a standardized interface for agents to access tools, resources and prompts.
connect_mcp(server)
start_mcp(command, args = character())
tools(x, ...)
resources(x, ...)
prompts(x, ...)
A specification of an MCP server. For local servers, this is typically a commandline. For remote servers, it should be a URL, typically just a hostname.
Name of command to execute. If this is a Python script (with
extension .py), it is run via reticulate and uv
to
ensure proper dependency resolution.
List of string arguments to pass to command
The MCP session returned by connect_mcp
Additional arguments for methods.
connect_mcp
returns an MCP session object. tools
,
resources
, and prompts
return lists of functions that can
be called to interact with the server.
if (FALSE) { # \dontrun{
session <- connect_mcp(wizrd:::start_test_mcp())
mcp_tools <- tools(session)
result <- mcp_tools$add(1L, 2L)
} # }