home / mcp / rdl mcp server

RDL MCP Server

A Python MCP server that lets AI assistants read, modify, and validate RDL reports through simple commands.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "bethmaloney-rdl-mcp": {
      "command": "uvx",
      "args": [
        "rdl-mcp"
      ]
    }
  }
}

You can use this MCP server to read, modify, and validate RDL reports with AI assistants. It provides structured, machine-friendly commands that simplify complex XML edits, improves accuracy with automatic validation, and runs with Python 3.8+ without extra dependencies beyond the standard library.

How to use

You run the MCP server locally and connect your AI assistant through an MCP client. The server exposes read operations to inspect RDL files and editing operations to apply changes such as updating column headers, adding or removing columns, changing formats, swapping stored procedures, managing dataset fields, and handling parameters. After sending a natural language request like describing the report structure or updating a column, your AI assistant translates it into MCP tool calls, ensuring changes are validated before saving.

How to install

Prerequisites: You need Python 3.8 or higher. You also require a way to run the MCP server that can execute Python scripts. The server uses the uv tool runner for local execution.

# Install uv (alternative: install via platform-specific scripts)
curl -LsSf https://astral.sh/uv/install.sh | sh
# Or install uvx via Python package manager if you prefer
pip install uv

Enable optional debugging by setting environment variables if you want verbose logs. You can set them in your shell before starting the server.

export RDL_MCP_LOG_LEVEL=DEBUG
export RDL_MCP_LOG_FILE=/path/to/logfile.log

Additional notes

Quick start shows how to configure the MCP client connections. For Claude Desktop, you place a config entry that routes the MCP server under a named alias using uvx. For GitHub Copilot in VSCode, you add a stdio server configuration pointing to uvx with the RDL MCP package. After installation, restart your AI assistant and begin with a simple query like describing the report structure to verify the setup.

Security and maintenance

Keep Python up to date and review any generated JSON or XML outputs for unexpected changes. Use the validate operation after edits to catch issues before saving. If you enable debug logging, monitor the log file for any abnormal behavior and disable verbose logging in production.

Troubleshooting

If the MCP server does not start, confirm Python 3.8+ is installed and that the runtime command is accessible from your shell. Ensure the environment variables for debugging are set only when needed and that the log file path is writable.

If you encounter permission errors, make the server script executable on Unix-like systems or run the command prompt with elevated permissions on Windows.

Releasing a new version

When preparing a new release, update version numbers in the configuration files, commit changes, create a git tag, and push. Automated workflows may build and publish to the MCP Registry and PyPI, validating the server configuration and registering it for client discovery.

Available tools

describe_rdl_report

Describe the structure and overview of a given RDL report, including its main sections and layout.

get_rdl_datasets

List datasets, their fields, and stored procedures, with optional field limiting and filtering.

get_rdl_parameters

List all report parameters and their configurations.

get_rdl_columns

Show column headers, widths, and data bindings.

update_column_header

Update the text of a specific column header.

update_column_width

Change the width of a specified column.

add_column

Add a new column with header text, binding, width, and optional formatting.

remove_column

Remove a column by its position.

update_column_format

Change the formatting of a column, such as numeric or date formats.

update_stored_procedure

Swap the stored procedure used by a dataset.

add_dataset_field

Add a new field to a dataset.

remove_dataset_field

Remove a field from a dataset.

add_parameter

Add a new report parameter.

update_parameter

Update an existing report parameter, including its prompt and default value.

validate_rdl

Validate the RDL XML after changes to ensure structural correctness.