Inspect and edit SAP Crystal Reports .rpt files (Windows; needs the Crystal runtime).
An MCP server for SAP Crystal Reports .rpt files.
An MCP server that lets AI assistants (Claude Code, Claude Desktop, Cursor, …) read and edit SAP Crystal Reports .rpt files.
.rpt is a binary format, so an AI cannot edit it as text. This server wraps the official Crystal Reports .NET runtime (Engine + in-process Report Application Server) and exposes safe, structured edit operations as MCP tools.
| Tool | What it does |
|---|---|
list_reports | List .rpt files in a folder |
inspect_report | Page setup, tables / SQL commands / connections, links, parameters, formulas, selection formulas, groups, sorts, sections and every object (position, text, bound field, font), including conditional formulas hidden in formatting (suppress, color, number format…) |
batch_edit | Run several edit operations with one load, one backup and one save; all-or-nothing |
diff_reports | Structural diff between two reports (e.g. backup vs. edited) |
set_formula / delete_formula | Edit, create or delete formula fields |
set_selection_formula | Record or group selection formula |
add_parameter / delete_parameter | Report parameters |
set_command_sql | Replace the SQL of an existing SQL Command table (experimental) |
set_datasource | Repoint tables to another server/database, optionally switching OLE DB provider (persisted) |
remove_table | Remove a table / command (guarded: refuses while its fields are used unless force) |
set_text | Change a text object's text |
set_object_props | Position/size, font, color, alignment, suppress, can-grow; for lines/boxes also end point, line style/thickness/color and box fill |
add_line / add_box | Horizontal/vertical lines and boxes (fill, rounded corners), optionally spanning into a later section |
add_picture / replace_picture | Insert an image, or swap a picture (e.g. a logo) keeping its name, position and size |
set_field_format | Number/date/time/boolean format of a field: decimals, thousands & decimal symbols, negatives, currency, zero text, date order/separator, 12/24h… or a custom pattern (#,##0.00, yyyy-MM-dd HH:mm) |
set_condition_formula | Set/clear conditional formulas (suppress, font color, display string, border, number format…) |
set_section_props | Section height, suppress, page breaks, keep-together, background |
add_text_object / add_field_object / delete_object | Add or remove report objects |
export_report | Run the report and export to PDF/Excel/Word/CSV/… (useful to visually verify edits). Rows can be passed inline (data) for DataSet/XML-based reports or quick previews without a database |
Positions and sizes are in twips (1440 = 1 inch, 567 ≈ 1 cm), Crystal's native unit.
All tools accept subreport to work inside a subreport.
Safety
_rptmcp_backup/<name>_<timestamp>.rpt next to it. Pass output_path to write to a new file instead.delete_formula, delete_parameter and remove_table refuse while the field is still used (field objects, fields embedded in text objects, formulas, selection/conditional formulas, groups, sorts, SQL commands) and list where it is used. force: true deletes the bound objects too. Without this guard, Crystal silently drops every object bound to a deleted formula.net48).rpt-mcp-<version>-win-x64.zip from Releases, unzip it anywhere (e.g. C:\Tools\rpt-mcp), then register rpt-mcp.exe with your MCP client (see below).rpt-mcp-<version>.mcpb from Releases in a client that supports MCP Bundles, such as Claude Desktop.io.github.ashafizullah/rpt-mcp.cd src
dotnet build -c Release
# -> src\bin\Release\rpt-mcp.exe
The project references the Crystal assemblies from the GAC (C:\Windows\assembly\GAC_MSIL). If yours are elsewhere, override with dotnet build -p:CrGacMsil=<folder>.
For a 32-bit Crystal runtime, build with -p:PlatformTarget=x86.
Run the tests with dotnet test RptMcp.sln -c Release. See CONTRIBUTING.md for the report tests.
Claude Code:
claude mcp add rpt-mcp -- "C:\path\to\rpt-mcp.exe"
Claude Desktop / other clients (mcpServers config):
{
"mcpServers": {
"rpt-mcp": { "command": "C:\\path\\to\\rpt-mcp.exe" }
}
}
Editing does not need a database. export_report, set_command_sql and set_datasource usually do.
Pass server / database / user / password / integrated directly, or create connections.json next to the exe (or point RPTMCP_CONNECTIONS at it) and pass connection: "<name>":
{
"dev": { "server": "localhost\\SQLEXPRESS", "database": "Northwind", "integrated": true }
}
connections.json is git-ignored; never commit credentials.
C:\reports\Invoice.rpt and change the title to Tax Invoice, bold 14pt."{@FullName} = first + last name and put it in the detail section next to the customer code."C:\reports to server SQL02, database SalesProd."OrderNo = 1001 so I can check the layout."SQLOLEDB provider, which cannot connect to LocalDB or TLS 1.2-only servers. Use set_datasource with provider: "MSOLEDBSQL" (Microsoft OLE DB Driver for SQL Server) to fix that.set_command_sql can only edit a command that already exists, and it has not yet been verified against a report containing one.double, and draws dashed/dotted lines as hairlines. Pictures are stored as bitmaps (transparency is flattened to white).set_command_sql and set_datasource go through Crystal's table-location API, which connects to the database to validate the schema.JSON-RPC 2.0 over stdio (newline-delimited). This is implemented by hand because the Crystal runtime only runs on .NET Framework. Logs go to stderr.
This listing does not have a supported local package template. Use the maintainer’s documentation for its hosted endpoint, authentication, and client-specific setup. No install command has been inferred.
https://github.com/ashafizullah/rpt-mcp/releases/download/v0.1.6/rpt-mcp-0.1.6.mcpbotherrpt-mcp (SAP Crystal Reports) works with any MCP-compatible client. Copy the config snippet from the Configuration section above and add it to the file shown for your client, then restart the application.
~/Library/Application Support/Claude/claude_desktop_config.jsonRestart Claude Desktop completely for changes to take effect.~/.cursor/mcp.jsonRestart Cursor for changes to take effect..vscode/mcp.jsonReload VS Code window for changes to take effect.~/.codeium/windsurf/mcp_config.jsonRestart Windsurf for changes to take effect..mcp.jsonSave at the project root, then start Claude Code in that project and review the MCP server approval prompt. Keep real credentials out of shared files.