MCP Server

Model Context Protocol for CRAN/E

Overview

CRAN/E provides a Model Context Protocol (MCP) server that enables programmatic access to our comprehensive R package database. AI assistants and tools can query packages, authors, and perform searches with real-time data.

The server is available at /api/mcp and follows the MCP specification for seamless integration.

Quick MCP config

{
  "cran-mcp": {
    "type": "http",
    "url": "https://crane.dev/api/mcp"
  }
}
Copy MCP URL
Endpoint:/api/mcpVersion:1.0.0

Resources

The MCP server exposes two main resources that provide structured access to CRAN data with enriched metadata and direct links to the CRAN/E web interface.

Package resource

Access detailed metadata for any CRAN package including dependencies, authors, download statistics, and release information.

cran://package/{name}
Author resource

Retrieve comprehensive author profiles with their associated packages and contributions to the R ecosystem.

cran://author/{name}

Tools

The MCP server provides three powerful tools for searching and querying the CRAN database with flexible options and real-time results.

search_packages

Search for R packages in the CRAN database. Returns name, title, description, and other metadata.

query (string) · limit (optional, default 20)
search_authors

Search for R package authors. Returns author names and their associated packages.

query (string) · limit (optional, default 8)
search_universal

Combined search for both packages and authors when intent is ambiguous or a full match list is desired.

query (string)

Usage

Configure your MCP client with the JSON above. The server will register all resources and tools for immediate use.

  • Add the MCP entry to your client configuration.
  • Connect to /api/mcp.
  • Call the resources and tools as needed.

Responses include enriched metadata with direct URLs to CRAN/E pages for quick reference.


Integration

This MCP integration makes CRAN/E's data seamlessly accessible to AI-powered development workflows, enabling:

  • Smarter package discovery and recommendation
  • Automated dependency analysis and management
  • Enhanced R development experiences with AI assistance
  • Real-time access to the latest CRAN package information
  • Seamless integration with development tools and IDEs