# sap-abap-sql

Checks and prepares ABAP Open SQL for SAP ADT’s data-preview console. Useful when an agent needs to query an on-premise SAP system.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 1
- Author: daslabhq
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/daslabhq/sap-abap-sql-mcp
- Updated: 2026-08-08
- HTML: https://affpapa.org/en/nevibecode/mcp/sap-abap-sql

## What it does

This server checks SQL written for the SAP ADT data-preview console. `abap_sql_prepare` returns a corrected statement or explains what needs changing; `abap_sql_explain` interprets console errors, and `abap_sql_rules` lists dialect constraints. You can also run prepared queries with `abap_sql_query` after configuring a SAP connection.

Three tools work on the supplied statement without connecting to a system or requiring configuration. Running queries requires the system address and credentials in the server’s environment. This targets the ADT console, not SQL embedded in ABAP programs. The console allows up to 255 characters per statement and 5,000 result rows; results at the row cap are marked as truncated. That limit shapes what a single query can return.

## Requirements
- Needs: Node.js (commands run via npx)

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add sap-abap-sql -- npx -y sap-abap-sql-mcp
```

### Codex

**Platform CLI**
```bash
codex mcp add sap-abap-sql -- npx -y sap-abap-sql-mcp
```

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "sap-abap-sql": {
            "command": "npx",
            "args": [
                "-y",
                "sap-abap-sql-mcp"
            ]
        }
    }
}
```

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "sap-abap-sql": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "sap-abap-sql-mcp"
            ]
        }
    }
}
```

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add sap-abap-sql npx -y sap-abap-sql-mcp
```

## When to use it
- correct spacing around parentheses in aggregates and conditions
- identify why the ADT console rejected a statement
- check a query against the console’s dialect rules
- run a prepared query against a configured SAP system

## Example prompts
- Check `SELECT COUNT(DISTINCT kunnr) FROM vbak` for the SAP ADT data-preview console.
- Explain why the ADT console rejected this query: `SELECT a FROM t WHERE (x = '1' OR y = '2')`.
- Run a prepared query against the configured SAP system and return its rows.

## Similar
- [World Monitor](https://affpapa.org/en/nevibecode/mcp/world-monitor.md) — MCP server · ★ 89609
- [Scrapling MCP Server](https://affpapa.org/en/nevibecode/mcp/scrapling-mcp-server.md) — MCP server · ★ 89899
- [MCP Toolbox for Databases](https://affpapa.org/en/nevibecode/mcp/googleapis-mcp-toolbox-for-databases.md) — MCP server · ★ 16730
- [PostHog MCP Server](https://affpapa.org/en/nevibecode/mcp/posthog-mcp-server.md) — MCP server · ★ 40459
- [dbx](https://affpapa.org/en/nevibecode/mcp/dbx.md) — MCP server · ★ 27844
- [Metabase](https://affpapa.org/en/nevibecode/mcp/metabase.md) — MCP server · ★ 49863

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
