MCPR
About
Expose R functions through the Model Context Protocol (MCP) for seamless integration with AI assistants.
Details
- Author
- chi2labs
- Categories
- Developer Tools
Jump to
Setup
Install MCPR in your MCP client (Claude Desktop, Cursor, Windsurf, and others).
Repository: https://github.com/chi2labs/mcpr
Follow the installation instructions in the repository README, then restart your MCP client.
mcpr exposes R functions through the Model Context Protocol (MCP), enabling seamless integration with AI assistants like Claude Desktop.
# install.packages("devtools") devtools::install_github("chi2labs/mcpr")
library(mcpr) # Create and configure server server <- mcp_http("My R Analysis Server", "1.0.0", port = 8080) # Add tools server$mcp_tool( name = "calculate_mean", fn = function(numbers) mean(numbers), description = "Calculate the mean of a numeric vector" ) # Run server server$mcp_run()
# analysis-tools.R # @mcp_tool # @description Calculate summary statistics for a numeric vector # @param x numeric vector to analyze # @param na.rm logical whether to remove NA values (default: TRUE) calculate_stats <- function(x, na.rm = TRUE) { list( mean = mean(x, na.rm = na.rm), median = median(x, na.rm = na.rm), sd = sd(x, na.rm = na.rm), min = min(x, na.rm = na.rm), max = max(x, na.rm = na.rm) ) }
server <- mcp("Analysis Server", "1.0.0") server$mcp_source("analysis-tools.R") server$mcp_run(transport = "http", port = 8080)
Add to Claude Desktop's configuration:
{ "mcpServers": { "r-analysis": { "url": "http://localhost:8080/mcp" } } }
server <- mcp_http("Stats Server", "1.0.0") server$mcp_tool( name = "t_test", fn = t.test, description = "Perform t-test" ) server$mcp_tool( name = "cor_test", fn = cor.test, description = "Correlation test" )
server <- mcp_http( name = "Production Server", version = "1.0.0", host = "0.0.0.0", # Listen on all interfaces port = 8080, log_file = "mcp-server.log", log_level = "info" )
FROM rocker/r-ver:4.3.0 RUN install.packages(c("mcpr", "plumber", "jsonlite")) COPY server.R /app/ WORKDIR /app EXPOSE 8080 CMD ["Rscript", "server.R"]
- basic-server.R- Simple server with basic tools
- stats-server.R- Statistical analysis tools
- data-server.R- Data manipulation and visualization
This is a web browser that enables your coding agent, such as Claude Code, to visit websites on your behalf and assist you in identifying bugs or creating UI test cases.
Create crafted UI components inspired by the best 21st.dev design engineers.
Bring agent evaluations, observability, and synthetic test set generation directly into your IDE for free with Galileo's new MCP server
An MCP server to help AI assistants to answer questions and generate AccelByte Extend SDK code more effectively .
MCP server for AI Diagram Maker — generate beautiful software engineering diagrams directly inside Cursor, Claude Desktop, Claude Code, or any MCP-compatible AI agent
ALAPI MCP Tools,Call hundreds of API interfaces via MCP
AI-powered SVG animation generator that transforms static files into animated SVG components using the Allyson platform
MCP server that gives AI assistants on-demand access to 1,500+ amCharts docs, ~300 code examples, and 1000+ class API references.
APIMatic MCP Server is used to validate OpenAPI specifications using APIMatic. The server processes OpenAPI files and returns validation summaries by leveraging APIMatic’s API.
One shared context layer for AI agents and humans — live API specs, DB schemas, and versioned contracts across repos so every agent and teammate works from the same source of truth.
Build and deploy full-stack Next.js apps with 98 tools for React, AWS, and MongoDB
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.





