xl2times-mcp-server

dlg0/xl2times-mcp-server

3.1

If you are the rightful owner of xl2times-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

The XL2TIMES MCP Server allows LLM agents to interact with VEDA-TIMES energy system models using the xl2times tool.

Tools
2
Resources
0
Prompts
0

XL2TIMES MCP Server

A Model Context Protocol (MCP) server that enables LLM agents to interact with VEDA-TIMES energy system models through the xl2times tool.

About

VEDA-TIMES is an energy system modeling framework that uses Excel for model specification. This MCP server allows LLMs to convert these Excel models to GAMS format for optimization solving, with detailed logging and file tracking optimized for AI agent consumption.

Prerequisites

  • uv package manager
  • xl2times (automatically installed when needed via uvx xl2times)

Claude Desktop Configuration

Add to ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "xl2times": {
      "command": "uvx",
      "args": ["--from", "xl2times-mcp-server @ git+https://github.com/dlg0/xl2times-mcp-server", "xl2times-mcp-server"]
    }
  }
}

Available Tools

xl2times_run

Converts VEDA-TIMES Excel models to GAMS format with detailed logging.

JSON Schema for LLM:

{
  input: string;           // Required: Path to VEDA model directory or Excel files
  output_dir?: string;     // Output directory for generated files (default: current dir)
  dd_files?: string[];     // List of DD files to process
  regions?: string[];      // List of regions to include
  verbose?: number;        // Verbosity level (forced to minimum 2 for LLM optimization)
  no_cache?: boolean;      // Disable caching
  timestamps?: boolean;    // Create output folder with timestamp
  use_gams_date_time?: boolean;  // Use GAMS date/time functions
  threads?: number;        // Number of threads to use
  debug?: boolean;         // Enable debug mode
}

Returns:

{
  "success": true,
  "return_code": 0,
  "log_file": "/tmp/xl2times-mcp/xl2times_run_1234567890.log",
  "output_files": [
    "/path/to/output/COM_output.csv",
    "/path/to/output/DEMAND_output.csv"
  ],
  "files_processed": [
    "model.xlsx",
    "settings.xlsx"
  ],
  "warnings": ["Warning messages if any"],
  "execution_time": 2.45,
  "message": "Successfully processed 4 Excel files, generated 41 output files. Check log file for details."
}

xl2times_info

Returns information about xl2times installation and server capabilities.

JSON Schema for LLM:

{
  // No parameters required
}

Returns:

{
  "version": "0.1.0",
  "xl2times_available": true,
  "xl2times_command": "uvx xl2times",
  "capabilities": ["convert", "validate", "process"]
}

Key Features for LLMs

  • Forced Verbosity: Always runs with -vv flag for detailed output
  • Persistent Logs: Creates timestamped log files in /tmp/xl2times-mcp/
  • Full Path Returns: All file paths are absolute for easy access
  • Structured Errors: Clear error messages with actionable information
  • File Tracking: Complete inventory of processed and generated files

License

MIT License - see for details.