You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: add Choice provider for system selection (#592)
* feat: add Choice provider for system selection and integration tests
- Add fastmcp[apps] Choice provider so the LLM presents clickable
system options to the user before calling sap_login
- Server instructions dynamically list available system keys and
guide the LLM to use the choose tool
- Update README getting-started section: dict keys are arbitrary,
connection_name field matches SAP Logon entry
- Add unit tests for connection_name resolution (both backends)
- Add MCP protocol integration tests via FastMCP Client
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: recompile requirements.txt with fastmcp[apps] and fix formatting
requirements.txt was missing prefab-ui (needed by fastmcp.apps.choice),
causing CI import failures.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: bump fastmcp minimum to 3.2.0 (fastmcp.apps added in 3.2.0)
fastmcp.apps.choice.Choice doesn't exist in 3.1.1 — the apps
subpackage was introduced in 3.2.0.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: narrow exception catch to satisfy pylint broad-exception-caught
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: rename connection_name→system_key on sap_login, expose configured systems without passwords (#594)
Disambiguate the two meanings of "connection_name":
- sap_login parameter renamed to system_key (the systems.json dict key)
- configured_systems response uses sap_logon_entry (the SAP Logon pad description)
Also: sap_list_connections now returns configured_systems from systems.json
(key, sap_logon_entry, host, client, language — no passwords/users).
Unknown system_key returns an error instead of silently falling back to default.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: README.md
+21-13Lines changed: 21 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -93,20 +93,28 @@ On **Windows**, open Windows Explorer and paste this into the address bar:
93
93
94
94
Create the folder if it doesn't exist, then create a file called `systems.json` inside it. On **macOS/Linux**, the path is `~/.config/sap-mcp/systems.json`.
95
95
96
-
**System key = SAP Logon description, NOT the SID.** The key in `"systems"` (e.g. `"HF S/4"`) must match the **description** shown in SAP Logon — the bold text in the connection list. It is _not_ the 3-character System ID (SID) like `HFQ` or `DEV`.
96
+
There are two distinct identifiers per system — don't mix them up:
97
97
98
-
|What you see in SAP Logon | Use as system key | NOT this (SID)|
If the `connection_name` doesn't match exactly, you'll get _"SAP Logon connection entry not found"_.
104
111
105
112
```json
106
113
{
107
-
"default_system": "HF S/4",
114
+
"default_system": "dev",
108
115
"systems": {
109
-
"HF S/4": {
116
+
"dev": {
117
+
"connection_name": "HF S/4",
110
118
"host": "https://your-sap-system:44300",
111
119
"client": "100",
112
120
"user": "your_username",
@@ -157,10 +165,10 @@ Multi-system support is built into `systems.json` — add multiple systems and t
157
165
158
166
**How it works:**
159
167
160
-
1.`sap_list_connections`reads your SAP Logon entries (from `SAPUILandscape.xml`) to show which systems are available.
161
-
2.`sap_login(connection_name="qa")` logs into a specific system using credentials from `systems.json`.
168
+
1.`sap_list_connections`returns both configured systems (from `systems.json`) and SAP Logon entries (from `SAPUILandscape.xml`).
169
+
2.`sap_login(system_key="qa")` logs into a specific system using credentials from `systems.json`.
162
170
163
-
**Configuration:** Add multiple systems to your `systems.json`. The dictionary key (e.g. `"dev"`, `"qa"`) is used for config lookup. The `connection_name` field must match the SAP Logon entry description:
171
+
**Configuration:** Add multiple systems to your `systems.json`. The **dictionary key** (e.g. `"dev"`, `"qa"`) is the `system_key` you pass to `sap_login`. The `connection_name` field must match the SAP Logon entry description exactly:
164
172
165
173
```json
166
174
{
@@ -186,7 +194,7 @@ Multi-system support is built into `systems.json` — add multiple systems and t
186
194
}
187
195
```
188
196
189
-
When `sap_login(connection_name="qa")` is called, it looks up the system in `systems.json`and uses the `connection_name` field to open the SAP Logon entry. If not found, it falls back to `default_system`.
197
+
When `sap_login(system_key="qa")` is called, it looks up `"qa"`in `systems.json`, reads the credentials, and uses the `connection_name` field (`"QA System"`) to open the matching SAP Logon entry. If the system key is not found, an error is returned listing the available keys.
- Check `SAP_URL` is correct and accessible from your browser
734
742
- If using auto-login, verify credentials are configured in `systems.json` (see [Configuration Reference](#configuration-reference))
735
-
-**Desktop backend:** Make sure the `connection_name` field in `systems.json` matches the SAP Logon **description** exactly (not the SID). Open SAP Logon and compare.
743
+
-**Desktop backend:** Make sure the `connection_name` field in `systems.json` matches the SAP Logon pad **description** exactly (the bold text, not the SID). Open SAP Logon and compare.
736
744
- Try logging in manually first to verify credentials
737
745
738
746
### Transaction input field (OK-Code field) not visible
0 commit comments