SAP RCA MCP Server
Provides Root Cause Analysis for SAP systems by querying Azure Log Analytics data, with tools to retrieve table schemas, execute validated KQL queries, classify SAP errors, and run an automated 8-step RCA workflow.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@SAP RCA MCP ServerInvestigate short dumps for SID CHA in the last 4 hours"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
SAP RCA MCP Server
Python MCP server that enables AI agents to perform Root Cause Analysis on SAP systems by querying Azure Log Analytics data.
Architecture
AI Agent (Azure AI Foundry / Claude / Copilot Studio)
│ MCP Tool Calls
▼
FastMCP Server (server.py)
├── get_schema → schema_registry.py (table/column metadata)
├── execute_query → la_client.py (validated KQL execution)
├── analyze_results → domain_knowledge.py (SAP error classification)
└── run_full_rca → rca_orchestrator.py (8-step automated workflow)
│
▼
Azure Log Analytics (read-only KQL queries via Managed Identity)Related MCP server: CloudWatch Log Analyst MCP
The 4 Tools
Tool | Purpose |
| Returns exact column names, types, time column, SID column, and KQL hints for registered tables. Call this first. |
| Validates an agent-generated KQL query (read-only guard) then executes it. |
| Applies SAP domain knowledge to classify raw rows: error categories, severity, recommendations. |
| Executes all 8 RCA steps automatically and returns a consolidated JSON report. |
Prerequisites
Python 3.11+
Azure CLI (
az) installedAccess to the Azure Log Analytics workspace (Workspace ID needed)
Role
Log Analytics Readerassigned to your account (or Managed Identity)
Setup
# 1. Clone / navigate to this folder
cd C:\Users\padmajat\Documents\AMS-Agentic-RCA\MCP
# 2. Create virtual environment
python -m venv .venv
.venv\Scripts\activate # Windows
# source .venv/bin/activate # Linux/macOS
# 3. Install dependencies
pip install -r requirements.txt
# 4. Configure
copy .env.example .env
# Edit .env and fill in AZURE_LOG_ANALYTICS_WORKSPACE_ID and AZURE_TENANT_ID
# 5. Authenticate (local development)
az loginConfiguration (.env)
AZURE_LOG_ANALYTICS_WORKSPACE_ID=<your-workspace-guid>
AZURE_TENANT_ID=<your-tenant-id>On Azure with Managed Identity, only the workspace ID is needed — leave all
AZURE_CLIENT_* fields blank.
Running
stdio mode (Claude Desktop, MCP Inspector, Azure AI Foundry local)
python server.py
# or:
mcp dev server.pySSE/HTTP mode (Azure App Service deployment)
pip install uvicorn
uvicorn server:mcp --host 0.0.0.0 --port 8000The SSE endpoint will be: http://localhost:8000/sse
Connect to Claude Desktop
Add to claude_desktop_config.json:
{
"mcpServers": {
"sap-rca": {
"command": "python",
"args": ["C:/Users/padmajat/Documents/AMS-Agentic-RCA/MCP/server.py"],
"env": {
"AZURE_LOG_ANALYTICS_WORKSPACE_ID": "<your-workspace-id>",
"AZURE_TENANT_ID": "<your-tenant-id>"
}
}
}
}Connect to Azure AI Foundry
In Azure AI Foundry, add an MCP connection pointing to:
https://<your-app-service>.azurewebsites.net/sse
Example Agent Conversation
Focused query workflow:
Agent → get_schema(["SapNetweaver_ShortDumps_CL"])
Agent → execute_query("SapNetweaver_ShortDumps_CL | where serverTimestamp_t > ago(4h) | where SID_s == 'CHA' | take 100")
Agent → analyze_results(results, "short_dumps", context="SID=CHA, last 4h")Full automated RCA:
Agent → run_full_rca(sid="CHA", time_range_hours=4, issue_description="Multiple batch job failures")
← Returns complete 8-step RCA reportRegistered Tables
Currently registered (1 of 7):
Table | SAP Source | Status |
| ST22 ABAP Short Dumps | ✅ Registered |
| SM21 System Log | ⏳ Awaiting schema CSV |
| SM37 Batch Jobs | ⏳ Awaiting schema CSV |
| Instance Availability | ⏳ Awaiting schema CSV |
| Process Availability | ⏳ Awaiting schema CSV |
| OS Metrics | ⏳ Awaiting schema CSV |
| HA Cluster | ⏳ Awaiting schema CSV |
Adding a New Table Schema
Provide the schema CSV (columns + description) — same format as
SchemaforMCP-Details.csv.Add a new entry to
schema_registry.pyfollowing the existingSapNetweaver_ShortDumps_CLentry as a template.If the table needs domain-specific analysis logic, add a
_analyze_<type>()function totools/analyze_results.py.Add a KQL template to
_KQL_TEMPLATESintools/rca_orchestrator.py.Restart the server — no other changes needed.
Security Notes
execute_queryblocks all KQL management commands (.ingest,.drop,.set, etc.)run_full_rcauses parameterised KQL templates — SID values are validated before substitutionAll credentials are loaded from environment variables — no secrets in code
On Azure, use Managed Identity; do not store
AZURE_CLIENT_SECRETin App Service config
⚠ Outstanding Questions (Action Required)
Before the server can connect to your workspace, you need to provide:
# | What | Where to find it | File to update |
1 | Log Analytics Workspace ID | Azure Portal → Log Analytics workspace → Overview → Workspace ID |
|
2 | Azure Tenant ID | Azure Portal → Microsoft Entra ID → Overview → Tenant ID |
|
3 | Time column for | The CSV you provided shows |
|
4 | SID_s column presence | Is |
|
5 | Remaining 6 table schemas | Provide schema CSVs (same format as |
|
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables querying and managing Azure Log Analytics workspaces using KQL (Kusto Query Language). Supports executing queries, managing saved queries, and exploring workspace tables and schemas with Service Principal authentication.
- AlicenseNot gradedqualityDmaintenanceEnables LLMs to autonomously query AWS CloudWatch Logs and perform structured root-cause analysis via natural language prompts, using MCP tools for log group listing and Insights queries.MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to investigate backend incidents by executing runbooks that gather evidence from observability and storage systems.59MIT
- FlicenseNot gradedqualityDmaintenanceEnables AI-powered analysis of exceptions using vector similarity search and Azure OpenAI for operations teams.
Related MCP Connectors
AI agent run monitoring with incident replay and SLA receipts.
Find relevant security data from Sentinel data lake for building effective agents. More:aka.ms/s/de
Debug, build, and manage Power Automate cloud flows with AI agents
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/vchinnu/AMS-MCPV2'
If you have feedback or need assistance with the MCP directory API, please join our Discord server