Sap Login
sap_loginStart a new SAP GUI or WebGUI session and return a session ID for addressing that login in subsequent tool calls.
Instructions
Log into SAP. On WebGUI: requires Chrome with --remote-debugging-port=9222 and VPN (if internal SAP). On Desktop: opens a NEW parallel session each call — re-login does NOT replace prior logins. You can be logged into the same SAP Logon entry as multiple distinct (client, user) tuples concurrently. The returned LoginResult.session_id is the registry ID ('s1', 's2', ...) you pass on subsequent tool calls to address THIS specific login. Concurrency note: sessions on one connection share one single-threaded COM engine; parallel scripting loops on that connection run sequentially (no speedup). For bulk work on one connection, prefer one large loop in a single script. Parallelism helps only across separate connections/systems. Use sap_session_list to see all currently active sessions. Credentials are read from ~/.config/sap-mcp/systems.json. Use system_key (dictionary key from systems.json) to select a non-default system. Call sap_list_connections first to see available system keys.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "sap_login"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | SAP Web GUI URL (WebGUI only). If not provided, derived from system host. | |
| client | No | SAP client/mandant (3-digit string, e.g. '200'). Overrides config value. | |
| system_key | No | Dictionary key from systems.json (e.g. "dev", "qa"). Use sap_list_connections to see available keys. Defaults to default_system. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | SAP URL that was accessed | |
| user | No | Logged in username | |
| error | No | Error message if success=False | |
| popup | No | Present when a popup dialog is active on screen | |
| success | No | Whether the operation succeeded | |
| guidance | No | Recommended next action after login (e.g., call sap_get_capabilities) | |
| session_id | No | Registry session ID assigned to the new login (e.g. 's1', 's2'). Pass this as the 'session' / 'session_id' parameter on subsequent tool calls to address this specific login when multiple parallel sessions are active. Desktop backend only — webgui currently runs a single session. | |
| active_window | No | Which window was operated on (e.g., 'wnd[0]', 'wnd[1]'). If 'wnd[1]' or higher, a modal dialog is open. | |
| already_logged_in | No | Was already logged in |