Extending AI Capabilities: Diving Deeper with the MCP Trading Partner Management Server
Following up on my previous article, “Using Integration Suite with the Power of AI,” where I showcased how to extend Integration Suite development with AI and the ModelContextProtocol (MCP), I’m excited to introduce a specialized enhancement: the **MCP Trading Partner Management (TPM) Server**.
While the initial MCP Integration Suite Server provides broad tools for general CPI functions like Integration Flows and Message Mappings, many enterprise integration scenarios heavily rely on managing B2B relationships. This new server is purpose-built to give AI chat clients direct access to and control over the rich capabilities of SAP Integration Suite’s Trading Partner Management. It makes sense to install both servers together to have access to both tools combined.
What Can You Do With It? A Comprehensive Toolset
The MCP Trading Partner Management Server empowers AI assistants with a wide array of tools to manage your B2B integration aspects. Here’s an overview of its core capabilities:
Trading Partner Management: Create, retrieve, and manage trading partners, their systems, identifiers, communication channels, and even signature verification configurations.Agreement Management: Work with B2B agreements, including creation from templates, retrieving details, and managing their associated technical B2B scenarios and deployments.Message Implementation Guideline (MIG) Management: Access and manipulate MIGs, including inspecting nodes and fields, applying proposals, and creating new MIG drafts.Mapping Guideline (MAG) Management: Create mapping guidelines and test them with example dataMonitoring: Search for interchanges, retrieve payload data, download specific payloads, and access error details for TPM message monitoring.Other Utilities: Get details on type systems, messages within them, create custom messages, and retrieve master data like business process roles, countries, and product classifications.
Setup and Configuration
As with the previous server, I highly recommend using this tool with Cline, the VSCode extension, or any other MCP-compatible client.
This server requires **Java (version 17 or higher)** and **Gradle (version 8 or higher)** to be installed on your machine. Once you have these prerequisites, get started by cloning the project and building it:
git clone https://github.com/1nbuc/mcp-is-tpm.git
cd mcp-is-tpm
./gradlew build
Next, you’ll need to add the MCP Trading Partner Management Server to your AI Client’s MCP configuration. This is typically done alongside your existing `mcp-is` configuration to provide the full spectrum of tools. The `env` variables below should be configured with your SAP Integration Suite URL and user credentials.
Note on Credentials: If your S or P user is associated with a Universal ID, ensure you provide your Universal ID password and email (`CPI_UNIVERSAL_MAIL`). If you have a standalone S-User, simply omit the `CPI_UNIVERSAL_MAIL` variable.
{
“mcpServers”: {
“mcp-is”: {
“command”: “node”,
“args”: [
“<project path for mcp-integration-suite>/dist/index.js”
],
“autoApprove”: []
},
“mcp-is-tpm”: {
“command”: “java”,
“args”: [
“-Dlogging.pattern.console=”,
“-Dspring.main.web-application-type=none”,
“-Dspring.ai.mcp.server.stdio=true”,
“-jar”,
“<project path for mcp-is-tpm>/app/build/libs/app-0.0.1-SNAPSHOT.jar”
],
“autoApprove”: [],
“env”: {
“CPI_URL”: “https://your.cpi.url.hana.ondemand.com”,
“CPI_USER”: “S001234567”,
“CPI_PASSWORD”: “myPass123”,
“CPI_UNIVERSAL_MAIL”: “mail@company.de”
}
}
}
}
Remember to replace `<project path for mcp-integration-suite>` and `<project path for mcp-is-tpm>` with the actual local paths to your cloned repositories.
For optimal interaction and to guide the AI effectively, I highly recommend starting each chat session with a custom prompt, similar to the approach outlined in my previous blog post.
What Can You Actually Do With It? (Conceptual Examples)
With the comprehensive toolset provided by the MCP Trading Partner Management Server, you can instruct your AI assistant to handle intricate TPM tasks. Here are a few conceptual examples:
Example 1: Create new Partners and Communication with them
You are a fishing shop with SAP ERP and SAP Integration suite
Here is a list of trading partners, look if they exist already otherwise create them.
Rod Supplier rody
Fishermans port LLC
Here is a list of transactions I do with partners. For every partnertransaction find a suitable Agreement template and create an agreement based on it.
All partners use AS2. If there is no fitting System with communication please create it. Deploy the agreements afterwards
Send orders D01B to rody
Receive D01B invoices from rody
Send TRADACOMS invoices to fishermans port
This could also be done if a list of 100+ User is provided e.g. if you would have an excel sheet with some partners and want to save time by not having to click create such many times.
Example 2: Analyzing an Existing Trading Partner Configuration
“Get details about Partner XY and list all their configured systems and communication channels.”
This is also usefull for summerizing or finding stuff.
“Find all Partners that use a SOAP Channel”
Example 3: Creating a New MIG for an Inbound PO
“Create a new Message Implementation Guideline for an inbound Purchase Order (PO) based on the EDIFACT D.96A standard. Then, get the proposal and select all fields which have over 50% probability.”
This highlights the ability to automate the creation of structured message guidelines, which are foundational for B2B document exchange.
Example 4: Troubleshooting an Inbound B2B Message
“Search for all interchanges with errors in the last day from partner ‘XYSolutions’. For the latest error message, get the interchange payloads and identify the root cause from the last error details.”
This scenario leverages the monitoring tools to quickly pinpoint and diagnose issues in B2B message processing.
If you are interested do not hesitate to check out the project on github for more details. I look forward to hearing your thoughts and experiences in the comments, also let me know if you have any features or promps you would like to see! Also thanks to figaf for providing an API for lots of TPM Capabilities.
Extending AI Capabilities: Diving Deeper with the MCP Trading Partner Management ServerFollowing up on my previous article, “Using Integration Suite with the Power of AI,” where I showcased how to extend Integration Suite development with AI and the ModelContextProtocol (MCP), I’m excited to introduce a specialized enhancement: the **MCP Trading Partner Management (TPM) Server**.While the initial MCP Integration Suite Server provides broad tools for general CPI functions like Integration Flows and Message Mappings, many enterprise integration scenarios heavily rely on managing B2B relationships. This new server is purpose-built to give AI chat clients direct access to and control over the rich capabilities of SAP Integration Suite’s Trading Partner Management. It makes sense to install both servers together to have access to both tools combined. What Can You Do With It? A Comprehensive ToolsetThe MCP Trading Partner Management Server empowers AI assistants with a wide array of tools to manage your B2B integration aspects. Here’s an overview of its core capabilities:Trading Partner Management: Create, retrieve, and manage trading partners, their systems, identifiers, communication channels, and even signature verification configurations.Agreement Management: Work with B2B agreements, including creation from templates, retrieving details, and managing their associated technical B2B scenarios and deployments.Message Implementation Guideline (MIG) Management: Access and manipulate MIGs, including inspecting nodes and fields, applying proposals, and creating new MIG drafts.Mapping Guideline (MAG) Management: Create mapping guidelines and test them with example dataMonitoring: Search for interchanges, retrieve payload data, download specific payloads, and access error details for TPM message monitoring.Other Utilities: Get details on type systems, messages within them, create custom messages, and retrieve master data like business process roles, countries, and product classifications. Setup and ConfigurationAs with the previous server, I highly recommend using this tool with Cline, the VSCode extension, or any other MCP-compatible client.This server requires **Java (version 17 or higher)** and **Gradle (version 8 or higher)** to be installed on your machine. Once you have these prerequisites, get started by cloning the project and building it:git clone https://github.com/1nbuc/mcp-is-tpm.git
cd mcp-is-tpm
./gradlew buildNext, you’ll need to add the MCP Trading Partner Management Server to your AI Client’s MCP configuration. This is typically done alongside your existing `mcp-is` configuration to provide the full spectrum of tools. The `env` variables below should be configured with your SAP Integration Suite URL and user credentials.Note on Credentials: If your S or P user is associated with a Universal ID, ensure you provide your Universal ID password and email (`CPI_UNIVERSAL_MAIL`). If you have a standalone S-User, simply omit the `CPI_UNIVERSAL_MAIL` variable.{
“mcpServers”: {
“mcp-is”: {
“command”: “node”,
“args”: [
“<project path for mcp-integration-suite>/dist/index.js”
],
“autoApprove”: []
},
“mcp-is-tpm”: {
“command”: “java”,
“args”: [
“-Dlogging.pattern.console=”,
“-Dspring.main.web-application-type=none”,
“-Dspring.ai.mcp.server.stdio=true”,
“-jar”,
“<project path for mcp-is-tpm>/app/build/libs/app-0.0.1-SNAPSHOT.jar”
],
“autoApprove”: [],
“env”: {
“CPI_URL”: “https://your.cpi.url.hana.ondemand.com”,
“CPI_USER”: “S001234567”,
“CPI_PASSWORD”: “myPass123”,
“CPI_UNIVERSAL_MAIL”: “mail@company.de”
}
}
}
}Remember to replace `<project path for mcp-integration-suite>` and `<project path for mcp-is-tpm>` with the actual local paths to your cloned repositories.For optimal interaction and to guide the AI effectively, I highly recommend starting each chat session with a custom prompt, similar to the approach outlined in my previous blog post. What Can You Actually Do With It? (Conceptual Examples)With the comprehensive toolset provided by the MCP Trading Partner Management Server, you can instruct your AI assistant to handle intricate TPM tasks. Here are a few conceptual examples:Example 1: Create new Partners and Communication with themYou are a fishing shop with SAP ERP and SAP Integration suite Here is a list of trading partners, look if they exist already otherwise create them.Rod Supplier rodyFishermans port LLCHere is a list of transactions I do with partners. For every partnertransaction find a suitable Agreement template and create an agreement based on it.All partners use AS2. If there is no fitting System with communication please create it. Deploy the agreements afterwardsSend orders D01B to rodyReceive D01B invoices from rodySend TRADACOMS invoices to fishermans portThis could also be done if a list of 100+ User is provided e.g. if you would have an excel sheet with some partners and want to save time by not having to click create such many times. Example 2: Analyzing an Existing Trading Partner Configuration”Get details about Partner XY and list all their configured systems and communication channels.”This is also usefull for summerizing or finding stuff.”Find all Partners that use a SOAP Channel”Example 3: Creating a New MIG for an Inbound PO”Create a new Message Implementation Guideline for an inbound Purchase Order (PO) based on the EDIFACT D.96A standard. Then, get the proposal and select all fields which have over 50% probability.”This highlights the ability to automate the creation of structured message guidelines, which are foundational for B2B document exchange.Example 4: Troubleshooting an Inbound B2B Message”Search for all interchanges with errors in the last day from partner ‘XYSolutions’. For the latest error message, get the interchange payloads and identify the root cause from the last error details.”This scenario leverages the monitoring tools to quickly pinpoint and diagnose issues in B2B message processing. If you are interested do not hesitate to check out the project on github for more details. I look forward to hearing your thoughts and experiences in the comments, also let me know if you have any features or promps you would like to see! Also thanks to figaf for providing an API for lots of TPM Capabilities. Read More Technology Blog Posts by Members articles
#SAP
#SAPTechnologyblog