Creates a complete MCP server package with Node.js wrapper and R server implementation
Usage
generate_mcp_server(
name,
title,
description,
version = "0.1.0",
path = ".",
tools = NULL,
resources = NULL,
prompts = NULL,
template = "full",
author = NULL,
overwrite = FALSE
)Arguments
- name
Server name (used in package naming and configuration)
- title
Human-readable server title
- description
Server description
- version
Server version (default: "0.1.0")
- path
Directory to create the server in (default: current directory)
- tools
List of tool definitions (optional)
- resources
List of resource definitions (optional)
- prompts
List of prompt definitions (optional)
- template
Which template to use: "full" or "minimal" (default: "full")
Author name (optional)
- overwrite
Whether to overwrite existing directory (default: FALSE)
Examples
if (FALSE) { # \dontrun{
# Generate a simple server
generate_mcp_server("my-analyzer", "My Data Analyzer",
"Analyzes data using R functions")
# Generate with tools
tools <- list(
analyze = list(
description = "Analyze a dataset",
parameters = list(
data = list(type = "string", description = "Data to analyze")
)
)
)
generate_mcp_server("analyzer", "Data Analyzer", "Analyzes data",
tools = tools)
} # }