AgentStack
MCP verified Apache-2.0 Self-run

Cap Agentic Engineered

mcp-sap-samples-cap-agentic-engineered · by SAP-samples

Reference CAP + Fiori Elements application showing how AI coding agents produce higher-quality SAP applications when grounded by SAP MCP servers (CAP, Fiori, UI5). Includes a reusable AGENTS.md, MCP skills, and a working Financial Risk Analyzer built entirely by Claude Code.

No reviews yet
0 installs
14 views
0.0% view→install

Install

$ agentstack add mcp-sap-samples-cap-agentic-engineered

✓ scanned · ✓ verified — works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets Used
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README — it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/mcp-sap-samples-cap-agentic-engineered)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
2mo ago

Declared compatibility

Claude CodeClaude DesktopCursorWindsurf

Compatibility is declared by the source manifest. End-to-end runtime verification is coming — see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps — measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Cap Agentic Engineered? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

MCP-Grounded SAP Development -- CAP + Fiori Elements Reference Application

[](https://api.reuse.software/info/github.com/SAP-samples/cap-agentic-engineered)

A reference application showing how AI coding agents produce higher-quality SAP applications when grounded by SAP MCP servers. The app was built entirely by Claude Code following specs generated by GSD, a spec-driven development tool. The [AGENTS.md](AGENTS.md) and [skills/](skills/) provided the SAP-specific guardrails, routing the agent to the right MCP server (CAP, Fiori, UI5) for each task.

What you get:

  • A working Financial Risk Analyzer as concrete evidence of the methodology
  • A reusable [AGENTS.md](AGENTS.md) and [skills](skills/) that tell AI coding agents which MCP server to query for each SAP artifact — portable across Claude Code, Cursor, Copilot, and other MCP-capable tools
  • The [spec/](spec/) folder with the specs that drove the build — project roadmap, phased requirements, success criteria, and execution logs
  • Test suite covering service behavior, annotations, i18n, and manifest correctness

The Application

The Financial Risk Analyzer classifies General Ledger transactions as normal or anomalous using 24 engineered financial features. It exposes an OData V4 service with a Fiori Elements List Report and an unbound action that triggers batch ML inference via SAP AI Core.

Key capabilities:

  • CDS data model with 24 feature columns for ML risk scoring
  • Unbound OData action (analyzeRisks) for batch inference across all transactions
  • Fiori Elements List Report with custom toolbar action and criticality-based highlighting
  • SAP AI Core integration for XGBoost model predictions, with a built-in mock predictor for local development
  • Role-based access control (RiskAnalyst role for analysis actions)

Prerequisites

  • Node.js >= 18
  • SAP CAP (@sap/cds-dk) installed globally: npm i -g @sap/cds-dk
  • (Optional) SAP AI Core instance for live ML predictions -- the app runs fully locally with the mock predictor

Setup and Run

npm ci
cds watch

Open http://localhost:4004/risk/webapp/index.html in your browser.

Log in with user test-analyst / password pass (mocked authentication in development profile).

Environment Variables (Optional)

To connect to SAP AI Core for live predictions instead of the mock predictor, copy .env.example to .env and fill in your BTP service key credentials:

cp .env.example .env
# Edit .env with your SAP AI Core credentials

Set AI_CORE_MOCK=true (the default) to use the built-in mock predictor without any external services.

Running Tests

npm test

The test suite includes:

| Test | What it verifies | |------|-----------------| | test/integration/risk-service.test.js | OData service behavior, CRUD, action execution | | test/integration/annotations.test.js | CDS annotation correctness | | test/unit/feature-extractor.test.js | Feature engineering logic | | test/unit/ai-core-client.test.js | AI Core client with mocked responses | | test/unit/i18n.test.js | All i18n keys used in code exist in properties file | | test/unit/manifest.test.js | Manifest.json structure and route configuration | | test/unit/risk-labels.test.js | Risk classification label mappings | | test/feature-columns.test.js | Feature column definitions and ML contract |

Repository Structure

cap-agentic-engineered/
+-- AGENTS.md                  # MCP routing rules and SAP development patterns (reusable)
+-- db/
|   +-- schema.cds             # GLTransactions entity with 24 ML feature columns
|   +-- data/                  # Sample GL transaction data (CSV)
+-- srv/
|   +-- risk-service.cds       # OData V4 service definition with unbound action
|   +-- risk-service.js        # Service handler with AI Core integration
|   +-- lib/
|       +-- ai-core-client.js  # SAP AI Core inference client
|       +-- mock-predictor.js  # Local mock predictor (no AI Core needed)
|       +-- feature-extractor.js  # 24-feature engineering pipeline
|       +-- feature-columns.js # ML contract: CDS field  model feature mapping
|       +-- risk-labels.js     # Risk classification labels and criticality
+-- app/
|   +-- services.cds           # Service binding for Fiori app
|   +-- risks/
|       +-- annotations.cds    # UI annotations (LineItem, SelectionFields, etc.)
|       +-- webapp/
|           +-- manifest.json  # Fiori Elements List Report configuration
|           +-- ext/controller/ListReportExt.controller.js  # Custom action handler
+-- test/                      # Unit and integration tests
+-- spec/                     # GSD specs: roadmap, phased requirements, execution logs
+-- skills/                    # SAP MCP skills (auto-trigger on file patterns)

Reusing the AGENTS.md and Skills

The [AGENTS.md](AGENTS.md) defines which MCP server to query for each type of SAP artifact — CDS models, Fiori annotations, UI5 controllers — so the generated code is grounded in live API documentation rather than stale training data. The skills in [skills/](skills/) enforce those rules automatically: when the agent touches a file matching a skill's path pattern (e.g., srv/**/*.cds), the skill fires and instructs it to query the correct MCP server before writing code.

Copy AGENTS.md and skills/ into your own CAP + Fiori Elements project, configure the MCP servers in .claude/settings.json (instructions inside the file), and your AI coding agent will automatically query the right server for each task.

Scope

This application is designed for local development only. It demonstrates the MCP-grounded methodology and the resulting application quality — not a production ready app. For a comprehensive CAP reference covering BTP deployment, HANA, XSUAA, draft editing, compositions, and multi-app frontends, see SAP-samples/cap-sflight.

How to Obtain Support

This repository is provided as-is. For questions about SAP CAP, Fiori Elements, or AI Core, use the SAP Community.

For questions about Claude Code or MCP, see the Claude Code documentation.

Contributing

If you wish to contribute code, offer fixes or improvements, please send a pull request. Due to legal reasons, contributors will be asked to accept a DCO when they create the first pull request to this project. This happens in an automated fashion during the submission process. SAP uses the standard DCO text of the Linux Foundation.

License

Copyright (c) 2026 SAP SE or an SAP affiliate company and cap-agentic-engineered contributors. This project is licensed under the Apache Software License, version 2.0 except as noted otherwise in the [LICENSE](LICENSES/Apache-2.0.txt) file.

Source & license

This open-source MCP server is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet — be the first.

Versions

  • v0.1.0 Imported from the upstream source.