SAPient MCP
Provides tools for automating SAP GUI, allowing AI agents to perform transactions, fill forms, navigate menus, and interact with SAP systems programmatically.
Click on "Deploy 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., "@SAPient MCPRun transaction VA03 to show sales order 12345."
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.
SAPient MCP
Intelligent SAP GUI automation for AI agents
A production-ready Model Context Protocol (MCP) server that enables LLMs (Claude, Copilot, Cursor, etc.) to automate SAP GUI using the RoboSAPiens library.
Compatible MCP Clients
Client | Mode | Notes |
Claude Desktop | stdio | Full support |
Claude Code | stdio | Full support |
Cursor | stdio or SSE | Full support |
VS Code (GitHub Copilot) | stdio or SSE | Requires Copilot agent mode |
Windsurf | stdio or SSE | Full support |
Any MCP client | SSE/HTTP | Via |
Prerequisites
Requirement | Details |
OS | Windows 10/11 only (SAP GUI is Windows-only) |
Python | 3.10 or newer |
SAP GUI | SAP GUI for Windows installed |
SAP Scripting | Must be enabled on server (RZ11: |
Enable SAP GUI Scripting (one-time setup)
Open SAP Logon →
Customize Local Layout (Alt+F12)→OptionsGo to
Accessibility & Scripting→Scripting✅ Enable scripting
❌ Disable "Notify when a script attaches to a running SAP GUI session"
❌ Disable "Notify when a script opens a connection"
Ask BASIS admin to run transaction
RZ11→ setsapgui/user_scripting=TRUE
Related MCP server: MCP SAP GUI Server
Installation
# Clone the repo
git clone https://github.com/yourorg/sapient-mcp.git
cd sapient-mcp
# Install (using pip or uv)
pip install -e .
# Or with uv (recommended)
uv pip install -e .Quick Start
Option A — stdio mode (local clients)
SAPient MCP works with any MCP-compatible client. Pick yours below.
Claude Desktop
Edit %APPDATA%\Claude\claude_desktop_config.json:
{
"mcpServers": {
"sapient": {
"command": "python",
"args": ["-m", "sapient_mcp"],
"env": {
"SAPIENT_MCP_SAPLOGON_PATH": "C:\\Program Files (x86)\\SAP\\FrontEnd\\SAPgui\\saplogon.exe",
"SAPIENT_MCP_CAPS": "screenshot,codegen,advanced",
"SAPIENT_MCP_OUTPUT_DIR": "C:\\sapient_output"
}
}
}
}Claude Code (CLI)
claude mcp add sapient python -m sapient_mcp \
-- --caps screenshot,codegen,advancedOr edit ~/.claude/mcp.json / .claude/mcp.json in your project root:
{
"mcpServers": {
"sapient": {
"command": "python",
"args": ["-m", "sapient_mcp", "--caps", "screenshot,codegen,advanced"],
"env": {
"SAPIENT_MCP_SAPLOGON_PATH": "C:\\Program Files (x86)\\SAP\\FrontEnd\\SAPgui\\saplogon.exe",
"SAPIENT_MCP_OUTPUT_DIR": "C:\\sapient_output"
}
}
}
}Cursor
Go to Cursor Settings → MCP → Add new MCP Server → type command, then enter:
python -m sapient_mcp --caps screenshot,codegen,advancedOr edit ~/.cursor/mcp.json:
{
"mcpServers": {
"sapient": {
"command": "python",
"args": ["-m", "sapient_mcp", "--caps", "screenshot,codegen,advanced"],
"env": {
"SAPIENT_MCP_SAPLOGON_PATH": "C:\\Program Files (x86)\\SAP\\FrontEnd\\SAPgui\\saplogon.exe",
"SAPIENT_MCP_OUTPUT_DIR": "C:\\sapient_output"
}
}
}
}VS Code (GitHub Copilot)
Install the MCP server via VS Code CLI:
code --add-mcp '{"name":"sapient","command":"python","args":["-m","sapient_mcp","--caps","screenshot,codegen,advanced"]}'Or add to .vscode/mcp.json in your workspace:
{
"servers": {
"sapient": {
"type": "stdio",
"command": "python",
"args": ["-m", "sapient_mcp", "--caps", "screenshot,codegen,advanced"],
"env": {
"SAPIENT_MCP_SAPLOGON_PATH": "C:\\Program Files (x86)\\SAP\\FrontEnd\\SAPgui\\saplogon.exe",
"SAPIENT_MCP_OUTPUT_DIR": "C:\\sapient_output"
}
}
}
}Windsurf
Edit ~/.codeium/windsurf/mcp_config.json:
{
"mcpServers": {
"sapient": {
"command": "python",
"args": ["-m", "sapient_mcp", "--caps", "screenshot,codegen,advanced"],
"env": {
"SAPIENT_MCP_SAPLOGON_PATH": "C:\\Program Files (x86)\\SAP\\FrontEnd\\SAPgui\\saplogon.exe",
"SAPIENT_MCP_OUTPUT_DIR": "C:\\sapient_output"
}
}
}
}Note: In stdio mode, SAPient MCP never writes to stdout or stderr — all logs go to the log file only. This is required for clean JSON-RPC communication across all clients.
Option B — SSE/HTTP mode (remote / CI / multi-user)
Best when the SAP machine is separate from where the AI client runs, or when multiple developers want to share one SAPient instance.
Run the server on your Windows SAP machine:
python -m sapient_mcp --port 8765 --caps screenshot,codegen,advancedThen point any MCP client at the HTTP endpoint:
{
"mcpServers": {
"sapient": {
"url": "http://sap-windows-machine:8765/mcp"
}
}
}This works identically in Claude Desktop, Claude Code, Cursor, VS Code, Windsurf, and any other MCP-compatible client.
Option C — Config file
python -m sapient_mcp --config C:\sap_config.jsonEnvironment Variables
All settings can be provided as env vars with the ROBOSAP_MCP_ prefix:
Variable | Default | Description |
|
| Path to SAP Logon executable |
|
| Server description for auto-connect |
|
| SAP client for auto-login |
|
| SAP user for auto-login |
|
| SAP password (never logged) |
|
| Port for SSE mode |
|
| Comma-separated caps: screenshot,codegen,advanced |
|
| Screenshots and logs directory |
|
| Auto-screenshot on tool failures |
Available Tools
Core (always loaded)
Tool | Description |
| Launch SAP Logon |
| Connect to SAP server |
| Attach to running SAP session |
| Read-only: current state & title |
| Close SAP |
| Run a transaction code |
| Click a tab by label |
| Read-only: current window title |
| Navigate menu bar |
| Send keyboard key (Enter, F3, etc.) |
| Fill a field by its label |
| Clear a field |
| Check a checkbox |
| Uncheck a checkbox |
| Select a radio button |
| Click a button by label |
| Read-only: check if button exists |
| Read-only: read field value |
| Read-only: read any text element |
| Read-only: SAP status bar message |
| Read-only: table row count |
| Select a table row |
| Read-only: read a cell value |
| Fill a table cell |
| Double-click a table cell |
| Scroll table up/down |
--caps screenshot
Tool | Description |
| Capture SAP window screenshot |
--caps codegen
Tool | Description |
| Get accumulated Robot Framework script |
| Clear script buffer |
--caps advanced
Tool | Description |
| Structured JSON snapshot of current window |
Example LLM Conversation
You: Create a purchase order for vendor 100001, company code 1000, with 50 units of material ABC-001
SAPient will guide the LLM to:
Call
sap_execute_transaction("/nME21N")Call
sap_get_window_title()→ "Create Purchase Order"Call
sap_fill_text_field("Vendor", "100001")Call
sap_fill_text_field("Company Code", "1000")Call
sap_send_key("Enter")to accept headerCall
sap_activate_tab("Item Overview")Call
sap_fill_cell("1", "Material", "ABC-001")Call
sap_fill_cell("1", "Quantity", "50")Call
sap_push_button("Save")Call
sap_read_status_bar()→ "Purchase order 4500001234 created"
Project Structure
sapient-mcp/
├── pyproject.toml
├── README.md
├── sap_config.json # Example config file
├── claude_desktop_config.json # Example Claude Desktop config
└── src/
└── sapient_mcp/
├── __init__.py
├── __main__.py # Entry point + CLI arg parsing
├── config.py # Pydantic settings (env/file/CLI)
├── session.py # SAPSessionManager singleton
└── server.py # FastMCP server + all 27 tool definitionsLogs
Logs are written to {output_dir}/sapient_mcp.log.
In stdio mode, logs never go to stdout/stderr (would break JSON-RPC). In SSE mode, logs also appear on stderr.
This server cannot be deployed
Maintenance
Related MCP Connectors
MCP server unifying ERPs, CRMs, APIs and knowledge base for Claude, ChatGPT and Gemini.
An MCP server that provides an API to LLMs to manage their JumpCloud resources.
Remote MCP server for supportsheep: run AI interviews and manage support content for your blog.
- ZapierOAuthcom.zapier
Hosted MCP server connecting AI assistants to 9,000+ apps and 40,000+ actions via Zapier.
Related MCP Servers
- AlicenseNot gradedqualityNot gradedmaintenanceAn enterprise-grade MCP server that enables AI agents to execute SAP RFC functions and read business data securely through the Model Context Protocol.MIT
- AlicenseAqualityAmaintenanceAn MCP server that enables AI assistants to interact with SAP GUI for Windows through the SAP GUI Scripting API.45732MIT
- AlicenseNot gradedqualityDmaintenanceA config-driven MCP server that exposes OData and REST APIs as MCP tools, enabling AI assistants to query, manage, and monitor SAP backends through natural language.37 npm29MIT
- FlicenseNot gradedqualityCmaintenanceAn MCP server over Streamable HTTP that exposes two SAP help-desk operations to an AI agent: sap_reset_password and sap_unlock_users.-