MCPR

MCPR is an MCP server that exposes R functions and statistical scripts to AI assistants via the Model Context Protocol. Built as an R package, it connects local or containerized R runtime environments with clients such as Claude Desktop over HTTP transport. Data scientists, statisticians, and software developers use MCPR to enable language models to execute native R routines, run statistical tests, calculate descriptive metrics, and process data structures directly within analysis workflows. Users can register functions programmatically using server tool methods or automatically expose them via roxygen-style decorators in R script files. MCPR allows users to configure host interfaces, ports, and logging levels, making it suitable for both local development setups and production environments deployed via Docker containers. By bridging the gap between conversational AI interfaces and the R ecosystem, the server provides direct access to R packages, mathematical algorithms, and custom analytics pipelines.

Category: Data & Analytics

Tags: data-science, programming, r, statistics

Visit MCPR

How to install and configure MCPR

  1. Install the package in your R environment using devtools: r devtools::install_github("chi2labs/mcpr") 2. Create and run an R script defining your server and tools: r library(mcpr) server <- mcp_http("My R Analysis Server", "1.0.0", port = 8080) server$mcp_tool(name = "calculate_mean", fn = function(numbers) mean(numbers), description = "Calculate mean") server$mcp_run() 3. Add the server URL to your Claude Desktop configuration file: json { "mcpServers": { "r-analysis": { "url": "http://localhost:8080/mcp" } } } 4. Restart Claude Desktop to use the registered R tools.

What you can do with MCPR

  • Running standard statistical evaluations, such as t-tests or correlation tests, directly from conversational prompts in Claude Desktop. - Calculating summary statistics and descriptive data metrics across custom numerical vectors provided by an AI assistant. - Exposing custom analytics pipelines and proprietary algorithms from internal R scripts using roxygen-style code decorators. - Executing R-based data manipulation routines in containerized environments by deploying the server inside Docker with Rocker images. - Serving domain-specific mathematical functions and data modeling libraries to autonomous coding agents and interactive development environments.

Key facts

  • Open Source
  • https://github.com/chi2labs/mcpr
  • Data & Analytics, Developer Tools & Code Intelligence
  • data-science, programming, r, statistics

Part of MCP Servers

Related MCP servers

  • MCP KQL Server — MCP KQL Server is an MCP server that connects AI assistants to Azure Data Explorer clusters using Azure CLI authentication.…
  • MCP LaTeX Server — MCP LaTeX Server is an MCP server that provides tools for creating, editing, validating, and compiling LaTeX documents directly through…
  • MCP JSON — MCP JSON is an MCP server collection that bundles tools for file system operations, Google search, browser-based web automation, and…
  • MCP Jupyter Complete — MCP Jupyter Complete is an MCP server that provides tools for manipulating Jupyter notebook files through position-based cell operations and…
  • MCP LSP Go — MCP LSP Go is an MCP server that connects AI assistants to the official Go Language Server Protocol implementation, gopls,…
  • MCP Manager — MCP Manager is an MCP server management tool that connects directly to your Claude Desktop environment, enabling users to discover,…

How do I install MCPR?

MCPR can be installed directly inside an R environment from GitHub using the devtools package with the command devtools::install_github("chi2labs/mcpr"). Once installed, you can load the library and initialize the HTTP server using R scripts.

What can MCPR do?

MCPR allows AI assistants to invoke native R functions over HTTP using the Model Context Protocol. It supports registering custom functions, importing annotated R scripts with tool decorators, and executing statistical routines like t-tests, correlation analyses, and numerical aggregations.

Which MCP clients work with MCPR?

MCPR works with any client supporting HTTP-based Model Context Protocol connections, including Claude Desktop configured with a remote server URL, as well as development tools and agent frameworks compatible with MCP specifications.

Is MCPR open source?

Yes, MCPR is an open source project distributed under the MIT license with an accompanying LICENSE file in its official GitHub repository.

  • AI Tools
  • Categories
  • Industries
  • CLI Coding Agents
  • MCP Servers
  • MCP Categories