sapient-mcp logo

sapient-mcp

Community
toni-ramchandani

Intelligent SAP GUI automation for AI agents, MCP server powered by RoboSAPiens

Publishertoni-ramchandani
Repositorysapient-mcp
LanguagePython
Forks
4
Stars
13
Available tools
0
Transport typestdio
Categories
Links
  • Connect tools to AI workflows

    sapient-mcp exposes MCP capabilities that can be used by compatible AI clients and agents.

  • 0 available tools

    Browse the callable actions below, including names and descriptions when provided by the server.

  • Ready-to-copy setup

    Use the installation snippets to configure this server in your preferred MCP client.

  • Open source signals

    13 stars and 4 forks from the linked repository.

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

ClientModeNotes
Claude DesktopstdioFull support
Claude CodestdioFull support
Cursorstdio or SSEFull support
VS Code (GitHub Copilot)stdio or SSERequires Copilot agent mode
Windsurfstdio or SSEFull support
Any MCP clientSSE/HTTPVia --port flag

Prerequisites

RequirementDetails
OSWindows 10/11 only (SAP GUI is Windows-only)
Python3.10 or newer
SAP GUISAP GUI for Windows installed
SAP ScriptingMust be enabled on server (RZ11: sapgui/user_scripting=TRUE) AND in SAP Logon client settings

Enable SAP GUI Scripting (one-time setup)

  1. Open SAP Logon → Customize Local Layout (Alt+F12) → Options
  2. Go to Accessibility & Scripting → Scripting
  3. ✅ Enable scripting
  4. ❌ Disable "Notify when a script attaches to a running SAP GUI session"
  5. ❌ Disable "Notify when a script opens a connection"
  6. Ask BASIS admin to run transaction RZ11 → set sapgui/user_scripting = TRUE

Installation

bash
# 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:

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)

bash
claude mcp add sapient python -m sapient_mcp \
  -- --caps screenshot,codegen,advanced

Or edit ~/.claude/mcp.json / .claude/mcp.json in your project root:

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"
      }
    }
  }
}

Cursor

Go to Cursor Settings → MCP → Add new MCP Server → type command, then enter:

python -m sapient_mcp --caps screenshot,codegen,advanced

Or edit ~/.cursor/mcp.json:

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:

bash
code --add-mcp '{"name":"sapient","command":"python","args":["-m","sapient_mcp","--caps","screenshot,codegen,advanced"]}'

Or add to .vscode/mcp.json in your workspace:

json
{
  "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:

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:

bash
python -m sapient_mcp --port 8765 --caps screenshot,codegen,advanced

Then point any MCP client at the HTTP endpoint:

json
{
  "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

bash
python -m sapient_mcp --config C:\sap_config.json

Environment Variables

All settings can be provided as env vars with the ROBOSAP_MCP_ prefix:

VariableDefaultDescription
ROBOSAP_MCP_SAPLOGON_PATHC:\...\saplogon.exePath to SAP Logon executable
ROBOSAP_MCP_SAP_SERVERnullServer description for auto-connect
ROBOSAP_MCP_SAP_CLIENTnullSAP client for auto-login
ROBOSAP_MCP_SAP_USERnullSAP user for auto-login
ROBOSAP_MCP_SAP_PASSWORDnullSAP password (never logged)
ROBOSAP_MCP_PORTnull (stdio)Port for SSE mode
ROBOSAP_MCP_CAPS""Comma-separated caps: screenshot,codegen,advanced
ROBOSAP_MCP_OUTPUT_DIR./sap_outputScreenshots and logs directory
ROBOSAP_MCP_SCREENSHOT_ON_ERRORtrueAuto-screenshot on tool failures

Available Tools

Core (always loaded)

ToolDescription
sap_openLaunch SAP Logon
sap_connect_to_serverConnect to SAP server
sap_connect_to_runningAttach to running SAP session
sap_get_session_infoRead-only: current state & title
sap_closeClose SAP
sap_execute_transactionRun a transaction code
sap_activate_tabClick a tab by label
sap_get_window_titleRead-only: current window title
sap_select_menu_itemNavigate menu bar
sap_send_keySend keyboard key (Enter, F3, etc.)
sap_fill_text_fieldFill a field by its label
sap_clear_text_fieldClear a field
sap_set_checkboxCheck a checkbox
sap_unset_checkboxUncheck a checkbox
sap_select_radio_buttonSelect a radio button
sap_push_buttonClick a button by label
sap_button_existsRead-only: check if button exists
sap_read_text_fieldRead-only: read field value
sap_read_textRead-only: read any text element
sap_read_status_barRead-only: SAP status bar message
sap_count_table_rowsRead-only: table row count
sap_select_table_rowSelect a table row
sap_read_table_cellRead-only: read a cell value
sap_fill_cellFill a table cell
sap_double_click_cellDouble-click a table cell
sap_scroll_tableScroll table up/down

--caps screenshot

ToolDescription
sap_take_screenshotCapture SAP window screenshot

--caps codegen

ToolDescription
sap_get_generated_scriptGet accumulated Robot Framework script
sap_clear_scriptClear script buffer

--caps advanced

ToolDescription
sap_get_snapshotStructured 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:

  1. Call sap_execute_transaction("/nME21N")
  2. Call sap_get_window_title() → "Create Purchase Order"
  3. Call sap_fill_text_field("Vendor", "100001")
  4. Call sap_fill_text_field("Company Code", "1000")
  5. Call sap_send_key("Enter") to accept header
  6. Call sap_activate_tab("Item Overview")
  7. Call sap_fill_cell("1", "Material", "ABC-001")
  8. Call sap_fill_cell("1", "Quantity", "50")
  9. Call sap_push_button("Save")
  10. 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 definitions

Logs

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.

Use sapient-mcp MCP with multiple AI models

TypingMind connects MCP tools at the workspace level, so once sapient-mcp is connected, you can use it with different AI models in TypingMind instead of setting it up separately for each model. This MCP runs locally through the TypingMind MCP connector on your device.

Setup guide to use the local connector

Use this when the MCP server needs access to local files, apps, or private resources on your computer.

1

Open the MCP settings

In TypingMind, go to Settings, Advanced Settings, then Model Context Protocol and choose Setup Connector.

  1. Open TypingMind in your browser.
  2. Click the Settings icon.
  3. Go to Advanced Settings.
  4. Open the Model Context Protocol section.
  5. Click Setup Connector and choose This Device.
TypingMind MCP connector setup screen with This Device selected
2

Run the connector command

Choose This Device, copy the command from TypingMind, and run it in Terminal. Keep the process running while you use MCP.

  1. Copy the setup command shown by TypingMind.
  2. Open Terminal on macOS or Windows Terminal on Windows.
  3. Paste and run the command.
  4. Approve the package install if Terminal asks you to proceed.
  5. Keep the Terminal window running while using MCP tools.
3

Add sapient-mcp as a server

When the connector status is Ready, click Edit Servers and paste the MCP server configuration.

  1. Wait until the connector status shows Ready.
  2. Click Edit Servers.
  3. Paste the sapient-mcp MCP server configuration.
  4. Save the server list.
  5. Refresh if you want to confirm the connector is still ready.
TypingMind MCP settings showing active server and Edit Servers button
{
  "mcpServers": {
    "sapient-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

Use it across models

Save the server list, open Plugins, enable the sapient-mcp MCP tools, then select any supported AI model in TypingMind and use the tools in chat or assign them to an AI agent.

  1. Open the Plugins page in TypingMind.
  2. Enable the sapient-mcp MCP tools.
  3. Start a chat and choose the AI model you want to use.
  4. Use the MCP tools in chat or assign them to an AI agent.
  5. Switch to another AI model whenever needed without reconnecting MCP.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use sapient-mcp to help me with this task?
sapient-mcp
Sure. I read it.
Here is what I found using sapient-mcp.

Frequently asked questions

What is the sapient-mcp MCP server used for?

sapient-mcp is an MCP server that lets compatible AI clients connect to external tools and context. In TypingMind, you can add this MCP server once and make its tools available in your AI workspace.

Can I use sapient-mcp MCP with multiple AI models in TypingMind?

Yes. TypingMind connects MCP tools at the workspace level, so you can use sapient-mcp with different AI models such as Claude, ChatGPT, Gemini, or other models you have configured in TypingMind without setting up the MCP server separately for each model.

Why use sapient-mcp MCP with TypingMind?

TypingMind is one of the best frontends for LLM chat because it brings multiple AI models, prompts, plugins, AI agents, API keys, and MCP tools into one workspace. With sapient-mcp connected, you can use its MCP tools across your preferred models while keeping your chat workflow organized in TypingMind.

How do I connect sapient-mcp MCP to TypingMind?

sapient-mcp runs through the TypingMind local MCP connector. This is best when the MCP server needs access to local files, desktop apps, command-line tools, or private resources on your computer.

What tools does sapient-mcp MCP provide in TypingMind?

sapient-mcp exposes MCP capabilities that can be enabled from the TypingMind Plugins page and used in chat or assigned to AI agents.

Do I need to share my API keys with TypingMind to use sapient-mcp MCP?

No. TypingMind is local-first and lets you keep your model providers, API keys, prompts, and MCP configuration under your control. If sapient-mcp requires authentication, add the required headers, OAuth settings, or local configuration for that MCP server when you create the connection.

Related MCP Servers

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇