What rpt-mcp (SAP Crystal Reports) MCP server does
The rpt-mcp (SAP Crystal Reports) MCP server provides MCP tools for working with SAP Crystal Reports .rpt files. It can inspect report structure, apply edits, compare two reports, verify database compatibility, and run exports. Inspection covers page settings, tables, SQL commands, connections, parameters, formulas, selection formulas, groups, sorting, sections, report objects, and conditional formatting formulas.
The server supports both targeted changes and larger report transformations. Available operations include creating or removing formulas, parameters, groups, sorts, running totals, sections, tables, subreports, lines, boxes, pictures, text objects, and field objects. Existing text, field formatting, object properties, section properties, page setup, data sources, SQL command text, and subreport links can also be changed.
How it works
Because .rpt is a binary format, the server uses the SAP Crystal Reports .NET runtime instead of treating the report as editable text. MCP clients invoke structured tools, and the runtime loads, changes, and saves the report. All tools accept a subreport option for operations inside a subreport.
Edits normally replace the source file only after the original has been copied to an _rptmcp_backup directory beside it. Supplying output_path writes the result elsewhere. batch_edit groups several operations into one load, backup, and save cycle and provides all-or-nothing behavior. Deletion operations are guarded when formulas, parameters, tables, or other objects are still referenced; force can remove dependent bound objects.
export_report can render reports to PDF, Excel, Word, CSV, and other supported formats, or to PNG and JPG pages. Inline row data is supported for DataSet/XML-based reports and quick previews that do not use a database.
Setup and configuration
The rpt-mcp (SAP Crystal Reports) MCP server runs on Windows with .NET Framework 4.8 and requires the SAP Crystal Reports runtime for .NET Framework version 13, 64-bit, or SAP Crystal Reports for Visual Studio SP20 or later. The SAP runtime is proprietary and must be installed separately. Prebuilt Windows x64 releases can be unzipped and registered with an MCP client, and MCP Bundle packages are available for clients that support them.
Claude Code can register the executable with claude mcp add. Other supported clients can use an mcpServers entry whose command points to rpt-mcp.exe. Building from source requires .NET SDK 6 or later. The project expects Crystal assemblies in the Global Assembly Cache; CrGacMsil can override that location, and PlatformTarget=x86 supports a 32-bit Crystal runtime.
Database access is optional for editing, but is generally needed for exporting, changing data sources, and replacing SQL command text. add_table requires a database connection to read columns. Connection details can be passed directly or stored in connections.json; RPTMCP_CONNECTIONS can point to an alternate file. Credentials should not be committed to source control.
Tools and capabilities
- Inspect reports and produce structural diffs.
- Edit formulas, selection formulas, parameters, groups, sorts, and running totals.
- Add, remove, or repoint tables and database connections.
- Change text, fields, formatting, conditional formulas, sections, and page layout.
- Insert or replace pictures, add lines and boxes, and move objects between sections.
- Add subreports and connect their parameters or fields.
- Verify database columns, types, providers, and logon problems without saving.
- Export rendered reports or page images for layout review.
Positions and dimensions use Crystal Reports twips: 1,440 twips equal one inch and approximately 567 twips equal one centimeter.