XRootD MCP Server

XRootD MCP Server

An MCP server providing access to XRootD file systems, allowing LLMs to browse directories, read file metadata, and access contents via the root:// protocol. It supports advanced features like campaign discovery, file searching, and ROOT file analysis for scientific data management.

Category
Visit Server

README

XRootD MCP Server

A Model Context Protocol (MCP) server that provides access to XRootD file systems. This server allows LLMs to interact with XRootD servers to list directories, read file metadata, access file contents, and more.

📚 View Full Documentation

Features

  • List directories: Browse XRootD file system hierarchy
  • File metadata: Get detailed information about files (size, modification time, permissions)
  • Read file contents: Access file data from XRootD servers with byte-range support
  • File operations: Check file existence, calculate directory sizes
  • Search & filtering: Find files by pattern (glob/regex), filter by size/date
  • Statistics & analytics: Comprehensive directory statistics and usage reports
  • Campaign discovery: List available production campaigns and datasets
  • Recent changes: Track newly added files and monitor production progress
  • ROOT file analysis: Inspect ROOT file structure, extract metadata, analyze events and collections
  • Dataset aggregation: Aggregate event statistics across multiple ROOT files
  • Protocol support: Connect to XRootD servers via root:// protocol

Installation

Using Docker (Recommended)

docker pull ghcr.io/eic/xrootd-mcp-server:latest

docker run -i --rm \
  -e XROOTD_SERVER="root://dtn-eic.jlab.org" \
  -e XROOTD_BASE_DIR="/volatile/eic/EPIC" \
  ghcr.io/eic/xrootd-mcp-server:latest

See Docker Usage Guide for detailed instructions.

From Source

npm install
npm run build

Configuration

Set the XRootD server URL using the XROOTD_SERVER environment variable:

export XROOTD_SERVER="root://dtn-eic.jlab.org"

Optionally, set a base directory to restrict access and simplify paths:

export XROOTD_BASE_DIR="/volatile/eic/EPIC"

When XROOTD_BASE_DIR is set:

  • Relative paths are resolved relative to the base directory
  • Absolute paths must be within the base directory (access control)
  • For example, with base /volatile/eic/EPIC, the path EVGEN refers to /volatile/eic/EPIC/EVGEN

Caching

Directory listing results are cached for improved performance:

export XROOTD_CACHE_ENABLED=true      # default: true
export XROOTD_CACHE_TTL=60            # minutes, default: 60
export XROOTD_CACHE_MAX_SIZE=1000     # max entries, default: 1000

The cache uses a time-based expiration strategy (TTL):

  • Directory listings are cached in memory
  • Cache entries expire after the configured TTL
  • Automatic cleanup removes expired entries every 15 minutes
  • LRU eviction when cache size exceeds 1000 entries

Note: Cached data may be up to TTL minutes old. For production data that changes infrequently, a 60-minute TTL provides good performance with acceptable staleness.

Usage

With MCP Client

Add to your MCP client configuration:

{
  "mcpServers": {
    "xrootd": {
      "command": "node",
      "args": ["/path/to/xrootd-mcp-server/build/index.js"],
      "env": {
        "XROOTD_SERVER": "root://dtn-eic.jlab.org",
        "XROOTD_BASE_DIR": "/volatile/eic/EPIC",
        "XROOTD_CACHE_ENABLED": "true",
        "XROOTD_CACHE_TTL": "60"
      }
    }
  }
}

Available Tools

Basic File Operations:

  • list_directory: List contents of an XRootD directory
  • get_file_info: Get detailed metadata about a file
  • read_file: Read contents of a file (with optional byte range)
  • check_file_exists: Check if a file or directory exists
  • get_directory_size: Calculate total size of a directory

Advanced Search & Analysis:

  • search_files: Search for files by glob pattern or regex
  • list_directory_filtered: List directory with advanced filtering (size, date, extension, pattern)
  • find_recent_files: Find files modified within a time period
  • get_statistics: Get comprehensive statistics about files in a directory

Campaign & Dataset Discovery:

  • list_campaigns: List available production campaigns
  • list_datasets: List datasets within a specific campaign
  • summarize_recent_changes: Summarize files added in a time period with detailed statistics

Development

# Build
npm run build

# Watch mode
npm run watch

Requirements

  • Node.js 18 or higher
  • Access to an XRootD server
  • xrdfs command-line tool installed (from xrootd-client package)

License

MIT

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured