rpt-mcp
Provides tools for interacting with the SAP RPT Playground prediction API, enabling few-shot tabular prediction and classification, zero-shot time-series forecasting with confidence intervals and covariates, and structured decision-making through typed questions.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
SAP-RPT-Playground-MCP
Disclaimer: This is not an official SAP product or tool. It is an independent community project. This MCP server connects only to the SAP RPT Playground (rpt.cloud.sap) — a public sandbox environment. It does not provide access to SAP RPT production models, enterprise services, or any internal SAP systems. SAP, RPT, and related names are trademarks of SAP SE.
An MCP (Model Context Protocol) server that connects AI assistants — Claude, Joule, Cursor, Windsurf, and any MCP-compatible client — to the SAP RPT Playground prediction API.
Once installed, you talk to your AI assistant in plain language and it calls the right RPT tool automatically:
"I have 90 days of daily sales. Forecast the next 14 days with an 80% confidence interval."
"Classify these support tickets by urgency and department using my labeled examples."
No Python knowledge required after setup.
What this server provides
Endpoint | Capability |
| Few-shot tabular prediction — classify or fill in missing values using example rows |
| Zero-shot time-series forecasting with confidence intervals and covariates |
| Structured decisions — answer typed questions (yes/no, category, score) about any content |
Related MCP server: Super-MCP
Installation
Prerequisites
Python 3.11 or later — check with
python3 --versionAn SAP RPT API token — you will create one in step 3 below
Step 1 — Clone and install
Click the Code button on the repository page, copy the HTTPS URL, then run:
git clone https://github.com/GonzaloVegaSAP/SAP-RPT-Playground-MCP.git
cd SAP-RPT-Playground-MCP
pip install -r requirements.txtStep 2 — Add the server to your AI client
Choose the client you use and follow the instructions for it.
Claude Code
Add this block inside the "mcpServers" key of ~/.claude/settings.json:
"sap-rpt-playground": {
"type": "stdio",
"command": "python3",
"args": ["/absolute/path/to/SAP-RPT-Playground-MCP/server.py"]
}Replace /absolute/path/to/SAP-RPT-Playground-MCP with the actual path where you cloned the repo.
On macOS you can get it by running pwd from inside the cloned folder.
After saving the file, restart Claude Code (or run /mcp to reload servers).
Cursor
Add to .cursor/mcp.json in your home directory (create the file if it does not exist):
{
"mcpServers": {
"sap-rpt-playground": {
"command": "python3",
"args": ["/absolute/path/to/SAP-RPT-Playground-MCP/server.py"]
}
}
}Restart Cursor after saving.
Windsurf
Add to ~/.codeium/windsurf/mcp_config.json:
{
"mcpServers": {
"sap-rpt-playground": {
"command": "python3",
"args": ["/absolute/path/to/SAP-RPT-Playground-MCP/server.py"]
}
}
}HTTP mode (Joule Work Desktop, web clients)
python3 server.py --http
# Server is now listening on http://localhost:8020/mcpTo use a different port:
MCP_PORT=9000 python3 server.py --httpStep 3 — Get an SAP RPT API token
Go to https://rpt.cloud.sap/ and sign in with your SAP account.
Open Settings → API Tokens → Create new token.
Give it a name (e.g.
my-mcp) and copy the generated token.
Step 4 — Configure your token
With the server now registered in your AI client, ask your assistant:
Call setup_auth with my RPT token: <paste-your-token-here>The assistant calls setup_auth(token="…"), which saves the token to a local .env file inside the project folder. You only need to do this once — the token persists across restarts.
Alternatively, configure it manually without using the assistant:
cd SAP-RPT-Playground-MCP
cp .env.example .env
# Open .env in any editor and set: RPT_API_TOKEN=<your-token>Your token is stored only in the local
.envfile (which is git-ignored) and is sent exclusively tohttps://rpt.cloud.sapover HTTPS. It never leaves your machine.
Step 5 — Verify the connection
Ask your assistant:
Call test_connection to check that RPT is working.Expected output:
Connected to https://rpt.cloud.sap
HTTP 200 — OK ✓If you see HTTP 401, your token is invalid or expired — repeat step 3.
If you see a connection error, check your network or VPN.
Your first prediction
Once setup is complete, try this in your AI assistant:
I want to predict the sales group for a new product.
Context data (products I already know):
[
{"PRODUCT": "Laptop Pro", "CATEGORY": "Electronics", "SALESGROUP": "Enterprise"},
{"PRODUCT": "Standing Desk", "CATEGORY": "Furniture", "SALESGROUP": "Office"},
{"PRODUCT": "USB Hub", "CATEGORY": "Electronics", "SALESGROUP": "Enterprise"},
{"PRODUCT": "Office Chair", "CATEGORY": "Furniture", "SALESGROUP": "Office"}
]
Query (product to classify):
[{"PRODUCT": "Wireless Headset", "CATEGORY": "Electronics"}]
Target column: SALESGROUPThe assistant calls predict() and parse_predict_response() for you. You will see something like:
{
"num_predictions": 1,
"predictions": [
{
"SALESGROUP": {
"prediction": "Enterprise",
"confidence": 0.87
}
}
]
}Tools reference
Auth
Tool | Description |
| Save your API token to |
| Check that the configured token is valid and the service is reachable. |
Predict (/api/predict)
SAP RPT Predict is a few-shot in-context learner for tabular data. You provide context rows (with known target values) and query rows (without targets) — the model fills in the predictions without any training or fine-tuning step.
Works for: classification, regression, and multi-target prediction (up to 10 columns at once).
Tool | Description |
| Build and inspect the request body without sending it |
| Run a prediction and return the raw API response |
| Extract predictions and confidence scores into a readable summary |
Parameters:
Parameter | Type | Description |
| JSON array or CSV | Training rows with real target values. Min 2, max 100,000. |
| JSON array or CSV | Rows to predict. Max 512 per call. |
| string | Comma-separated column(s) to predict, e.g. |
|
|
|
| string (optional) | Column used as row identifier in the response |
| int 1–20 (0 = off) | Include feature importance per prediction |
| int 1–20 (0 = off) | Include the most similar context rows per prediction |
| HTTPS URL (optional) | Remote CSV instead of inline rows (e.g. a pre-signed S3 URL). When set, |
Example prompt:
I have customer records with a "churn" column (1 = churned, 0 = stayed).
Use the first 80 rows as context and predict churn for the last 20.
Show results with confidence scores.Forecast (/api/forecast)
SAP RPT Forecast is a zero-shot time-series model. It requires only historical values — no labels, no training pipeline. It detects trends, seasonality, and cyclical patterns automatically.
Tool | Description |
| Build and inspect the request body without sending it |
| Run a forecast and return the raw API response |
| Extract step-by-step forecasts and confidence intervals |
| Send a fully custom JSON payload (multiple series, multivariate, hierarchical) |
Parameters:
Parameter | Type | Description |
| JSON array or CSV | Historical values. Accepts flat |
| int 1–90 | Number of future steps to forecast |
| string | Column name if |
| float 0–1 | Width of the confidence band (default 0.8 = 80%) |
| JSON array (optional) | ISO-8601 timestamps matching the series length |
| JSON object (optional) | External variables known in the past, e.g. |
| JSON object (optional) | Variables known in the forecast window (length must equal |
| float (optional) | Bound the output, e.g. |
| bool | Enable enhanced mode for potentially better accuracy |
| bool | Enable cross-learning across series (useful when forecasting several related series together) |
Example prompt:
Here are 90 days of daily sales: [12, 14, 11, 15, 18, 13, ...].
Forecast the next 14 days with an 80% confidence interval.
Values cannot go below 0.Decisions (/api/systemone)
SAP RPT SystemOne answers structured typed questions about any content, learning from a small set of labeled examples. No training pipeline — provide 2–2,048 examples and the model generalises immediately.
Tool | Description |
| Build and inspect the request body without sending it |
| Run decisions and return the raw API response |
| Extract answers, confidence scores, and probability distributions |
Question types:
Type | Answer format | What the model returns |
|
| Probability of |
| Option key (string) | Winning option + full probability distribution |
| Level index as string ( | Expected score + per-level probabilities |
Important: For
"score"questions, every declared level must appear in at least one example. If level"0"is declared but no example uses it, the API returns a 400 error.
Parameters:
Parameter | Type | Description |
| string | The content to evaluate — free text, a JSON object, or an array |
| JSON object | Question definitions keyed by name. Max 10 per call. |
| JSON array | Labeled examples |
| string | Model to use (default: |
Example questions JSON:
{
"urgent": { "type": "noul", "instructions": "Is this message urgent?" },
"dept": { "type": "choice", "instructions": "Which department handles this?",
"criteria": { "billing": "Invoice issues", "delivery": "Shipping", "product": "Product defects" } },
"priority": { "type": "score", "instructions": "Priority level.",
"criteria": ["Low", "Medium", "High", "Critical"] }
}Example prompt:
I have 50 labeled customer support tickets with category, urgency, and priority score.
Classify this new ticket: "My order never arrived and I need it for a presentation tomorrow."Troubleshooting
Symptom | Likely cause | Fix |
| Token not set | Run |
| Token invalid or expired | Generate a new token at https://rpt.cloud.sap/ |
| Rate limit hit | Wait for the |
| A score level has no example | Add at least one example for every declared score level |
| The | |
Server not found in MCP client | Path wrong in config | Use the absolute path from |
| Python not in PATH | Use the full path, e.g. |
Environment variables
Variable | Required | Default | Description |
| Yes | — | Your SAP RPT API token |
| No |
| Override the API base URL |
| No |
| Default context mode for predict calls ( |
| No |
| Port for HTTP transport ( |
API limits
Limit | Value |
Query rows per predict call | 512 |
Context rows per predict call | 100,000 |
Target columns per predict call | 10 |
Forecast horizon | 1–90 steps |
Questions per decisions call | 10 |
Examples per decisions call | 2,048 |
Rate limit response | HTTP 429 with |
Project structure
SAP-RPT-Playground-MCP/
├── server.py # MCP server — all 12 tools defined here
├── .env # Your API token (git-ignored, created by setup_auth)
├── .env.example # Template — copy to .env and fill in your token
├── requirements.txt # Python dependencies
├── CHANGELOG.md # Version history
├── CONTRIBUTING.md # Contribution guidelines
└── README.md # This fileSecurity
The
.envfile is listed in.gitignoreand will never be committed.Tokens are sent only to
https://rpt.cloud.sapvia HTTPS.No credentials are logged, printed, or stored anywhere other than
.env.The server makes no outbound connections other than to
RPT_BASE_URL.
Contributing
Contributions are welcome! See CONTRIBUTING.md for guidelines.
License
This project is licensed under the Apache License 2.0.
It is not an official SAP product. SAP RPT is a service of SAP SE — see rpt.cloud.sap for terms of use.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
Related MCP Connectors
Build and run AI workflows, agents, data tables and 1000+ API integrations from any MCP client.
Connect Claude, ChatGPT or any MCP client to your Atwork sheets, tasks, pages and dashboards.
Connect any AI agent to 1,000+ apps and 27,000+ actions through one remote MCP server (OAuth).
CheckFlow’s own MCP server. Ask your AI assistant to start checklists, complete tasks, fill in fields, build templates from written procedures and update Data Sets in CheckFlow. Sign in with your CheckFlow account, or use an API key.
Related MCP Servers
- AlicenseNot gradedqualityAmaintenanceEnables AI assistants to securely connect with SAP ABAP and BTP services, allowing execution of function modules, BAPIs, table reads, and various BTP operations through MCP.1Apache 2.0
- AlicenseNot gradedqualityDmaintenanceDynamically generates MCP tools from any OData or OpenAPI spec, enabling natural-language queries via SAP AI Core.MIT
- FlicenseNot gradedqualityDmaintenanceConnects to SAP ABAP Development Tools (ADT) via MCP, enabling AI assistants to manage SAP systems through natural language.-
- AlicenseNot gradedqualityCmaintenanceConnects AI assistants to SAP systems through the ABAP Development Tools API, exposing 85 tools that cover the full ABAP development lifecycle — reading and writing source, creating and activating objects, managing transports, running syntax/ATC checks and unit tests, querying tables, refactoring, remote debugging, tracing, and executing code — all without SAP GUI. Supports single- or multi-system landscapes with credentials supplied by the MCP client at launch.MIT