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.
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.
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 pathEVGENrefers 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 directoryget_file_info: Get detailed metadata about a fileread_file: Read contents of a file (with optional byte range)check_file_exists: Check if a file or directory existsget_directory_size: Calculate total size of a directory
Advanced Search & Analysis:
search_files: Search for files by glob pattern or regexlist_directory_filtered: List directory with advanced filtering (size, date, extension, pattern)find_recent_files: Find files modified within a time periodget_statistics: Get comprehensive statistics about files in a directory
Campaign & Dataset Discovery:
list_campaigns: List available production campaignslist_datasets: List datasets within a specific campaignsummarize_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
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。