# How to integrate Sap successfactors MCP with Autogen

```json
{
  "title": "How to integrate Sap successfactors MCP with Autogen",
  "toolkit": "Sap successfactors",
  "toolkit_slug": "sap_successfactors",
  "framework": "AutoGen",
  "framework_slug": "autogen",
  "url": "https://composio.dev/toolkits/sap_successfactors/framework/autogen",
  "markdown_url": "https://composio.dev/toolkits/sap_successfactors/framework/autogen.md",
  "updated_at": "2026-05-12T10:24:40.837Z"
}
```

## Introduction

This guide walks you through connecting Sap successfactors to AutoGen using the Composio tool router. By the end, you'll have a working Sap successfactors agent that can show your current employee profile details, check your job title and department info, display your contact information in successfactors through natural language commands.
This guide will help you understand how to give your AutoGen agent real control over a Sap successfactors account through Composio's Sap successfactors MCP server.
Before we dive in, let's take a quick look at the key ideas and tools involved.

## Also integrate Sap successfactors with

- [ChatGPT](https://composio.dev/toolkits/sap_successfactors/framework/chatgpt)
- [OpenAI Agents SDK](https://composio.dev/toolkits/sap_successfactors/framework/open-ai-agents-sdk)
- [Claude Agent SDK](https://composio.dev/toolkits/sap_successfactors/framework/claude-agents-sdk)
- [Claude Code](https://composio.dev/toolkits/sap_successfactors/framework/claude-code)
- [Claude Cowork](https://composio.dev/toolkits/sap_successfactors/framework/claude-cowork)
- [Codex](https://composio.dev/toolkits/sap_successfactors/framework/codex)
- [Cursor](https://composio.dev/toolkits/sap_successfactors/framework/cursor)
- [VS Code](https://composio.dev/toolkits/sap_successfactors/framework/vscode)
- [OpenCode](https://composio.dev/toolkits/sap_successfactors/framework/opencode)
- [OpenClaw](https://composio.dev/toolkits/sap_successfactors/framework/openclaw)
- [Hermes](https://composio.dev/toolkits/sap_successfactors/framework/hermes-agent)
- [CLI](https://composio.dev/toolkits/sap_successfactors/framework/cli)
- [Google ADK](https://composio.dev/toolkits/sap_successfactors/framework/google-adk)
- [LangChain](https://composio.dev/toolkits/sap_successfactors/framework/langchain)
- [Vercel AI SDK](https://composio.dev/toolkits/sap_successfactors/framework/ai-sdk)
- [Mastra AI](https://composio.dev/toolkits/sap_successfactors/framework/mastra-ai)
- [LlamaIndex](https://composio.dev/toolkits/sap_successfactors/framework/llama-index)
- [CrewAI](https://composio.dev/toolkits/sap_successfactors/framework/crew-ai)

## TL;DR

Here's what you'll learn:
- Get and set up your OpenAI and Composio API keys
- Install the required dependencies for Autogen and Composio
- Initialize Composio and create a Tool Router session for Sap successfactors
- Wire that MCP URL into Autogen using McpWorkbench and StreamableHttpServerParams
- Configure an Autogen AssistantAgent that can call Sap successfactors tools
- Run a live chat loop where you ask the agent to perform Sap successfactors operations

## What is AutoGen?

Autogen is a framework for building multi-agent conversational AI systems from Microsoft. It enables you to create agents that can collaborate, use tools, and maintain complex workflows.
Key features include:
- Multi-Agent Systems: Build collaborative agent workflows
- MCP Workbench: Native support for Model Context Protocol tools
- Streaming HTTP: Connect to external services through streamable HTTP
- AssistantAgent: Pre-built agent class for tool-using assistants

## What is the Sap successfactors MCP server, and what's possible with it?

The Sap successfactors MCP server is an implementation of the Model Context Protocol that connects your AI agent and assistants like Claude, Cursor, etc directly to your Sap successfactors account. It provides structured and secure access to your HR data, so your agent can retrieve user information, access employee details, and drive workforce automation on your behalf.
- Current user profile retrieval: Instantly fetch the authenticated user's profile and access up-to-date information about their SAP SuccessFactors account.
- Employee data access: Allow your agent to securely obtain details about employees, enabling streamlined HR and workforce management workflows.
- Personalized onboarding support: Use user data to personalize onboarding experiences, helping new hires get up to speed faster with relevant, contextual information.
- Automated reporting: Enable your agent to pull user-related reports or summaries, supporting HR analytics and decision-making.
- Seamless integration with enterprise HR processes: Connect user data to other HR tools or workflows, making it easier to automate tasks like leave approvals or performance tracking.

## Supported Tools

| Tool slug | Name | Description |
|---|---|---|
| `SAP_SUCCESSFACTORS_APPROVE_CALIBRATION_SESSION` | Approve Calibration Session | Finalize a calibration session that is in the In Progress or Approving status. |
| `SAP_SUCCESSFACTORS_CREATE_A_FEEDBACK_REQUEST` | Create a Feedback Request | Create a feedback request in SAP SuccessFactors Continuous Feedback. Use when you need to request performance feedback from one employee about another. At least one question must be provided. |
| `SAP_SUCCESSFACTORS_CREATE_LEARNING_ACTIVITIES_BULK` | Create Learning Activities Bulk | Create learning activities and associate them with development goals in bulk (requires third-party LMS integration). |
| `SAP_SUCCESSFACTORS_CREATE_ONBOARDEE` | Create Onboardee | Creates a new onboardee in SAP SuccessFactors Onboarding 2.0 system. Use when initiating the onboarding process for a new hire or rehire. Requires admin create user permissions. |
| `SAP_SUCCESSFACTORS_CREATE_UPDATE_SUCCESSOR_NOMINATION` | Create or Update Successor Nomination | Create or update a successor nomination for a position or talent pool in succession planning. Use when you need to nominate or update a successor for a specific position or talent pool. |
| `SAP_SUCCESSFACTORS_DELETE_NOMINATION_POSITION_TALENT_POOL` | Delete Nomination | Delete a nomination for a position or talent pool in succession planning. Use when you need to remove a nominee from a position or talent pool nomination. |
| `SAP_SUCCESSFACTORS_GET_APPLICATION_INTERVIEW` | Get Application Interview | Retrieves interview information related to job applications from Interview Central. Use when you need to query interview schedules, statuses, or details for applicants. Note: This entity checks only the first 1000 records, so filtering by applicationId is recommended. |
| `SAP_SUCCESSFACTORS_GET_BACKGROUND_EDUCATION` | Get Background Education | Tool to retrieve background education records for employees from SAP SuccessFactors. Use when you need to query education history with support for filtering, field selection, and pagination via OData query options. Background entities use backgroundElementId as the unique key field. |
| `SAP_SUCCESSFACTORS_GET_BACKGROUND_MOBILITY` | Get Background Mobility | Retrieves mobility background records showing employee willingness to relocate. Use when you need to query employee geographic mobility preferences and location data. Results can be filtered and ordered by bgOrderPos to maintain screen display order. |
| `SAP_SUCCESSFACTORS_GET_CALIBRATION_SESSION_BY_ID` | Get Calibration Session By ID | Get a specific calibration session by session ID. |
| `SAP_SUCCESSFACTORS_GET_CALIBRATION_SESSIONS` | Get Calibration Sessions | Query all the calibration sessions that a user can access. |
| `SAP_SUCCESSFACTORS_GET_CALIBRATION_SUBJECT_BY_ID` | Get Calibration Subject By ID | Query a specific subject's competency ratings and ratings within a calibration session. |
| `SAP_SUCCESSFACTORS_GET_CALIBRATION_SUBJECT_RATINGS` | Get Calibration Subject Ratings | Query a subject's ratings, competency ratings, and comments by using session ID. |
| `SAP_SUCCESSFACTORS_GET_CDP_LEARNING_METADATA` | Get CDP Learning Metadata | Get metadata for Career Development Planning Learning service. |
| `SAP_SUCCESSFACTORS_GET_CURRENT_USER` | Get Current User | Retrieves the currently authenticated user's information from SAP SuccessFactors. |
| `SAP_SUCCESSFACTORS_GET_CUSTOM_MDF_OBJECT` | Get Custom MDF Object | Tool to retrieve custom MDF (Metadata Framework) objects from SAP SuccessFactors. Custom object names begin with cust_ prefix in the API. Use when you need to query custom business objects defined in the MDF framework. |
| `SAP_SUCCESSFACTORS_GET_EMP_EMPLOYMENT_TERMINATION` | Get Employee Employment Termination | Retrieves employee termination information records from SAP SuccessFactors. Contains details about employment terminations including termination date and reason. Use when you need to query termination records with support for filtering, field selection, expansion of related entities, and pagination via OData query options. |
| `SAP_SUCCESSFACTORS_GET_EMPLOYEE_TIME` | Get Employee Time | Retrieves employee time entries including time off records from SAP SuccessFactors. Use when you need to query approved leaves, time-off requests, or employee time tracking data. Supports filtering by userId, approvalStatus, timeType, and date ranges. |
| `SAP_SUCCESSFACTORS_GET_EMPLOYEE_TIMESHEET` | Get Employee Timesheet | Retrieves employee timesheet records for attendances, overtime, on-call times, and allowances. Use when you need to query employee timesheet data from SAP SuccessFactors. |
| `SAP_SUCCESSFACTORS_GET_EMP_PAY_COMP_NON_RECURRING` | Get Non-Recurring Pay Components | Tool to retrieve non-recurring pay component information including bonuses and one-time payments from SAP SuccessFactors. Use when you need data about employee bonuses, commissions, or other non-recurring compensation components. |
| `SAP_SUCCESSFACTORS_GET_EMP_PAY_COMP_RECURRING` | Get Recurring Pay Components | Tool to retrieve recurring pay component information including salary and benefits data from SAP SuccessFactors. Use when you need to query employee compensation data with recurring payments such as salary, allowances, or benefits. Supports filtering by userId and payComponent code. |
| `SAP_SUCCESSFACTORS_GET_FEEDBACK_RECORDS_SERVICE_AVAILABLE` | Get Feedback Records | Tool to retrieve continuous feedback records from SAP SuccessFactors Performance and Goals module using OData V4 protocol. Use when you need to query and retrieve feedback data with filtering, sorting, pagination, and field selection capabilities. Supports standard OData v4 query operations for flexible data retrieval. |
| `SAP_SUCCESSFACTORS_GET_FO_BUSINESS_UNIT` | Get FOBusinessUnit | Retrieves foundation object business unit records for organizational structure hierarchy. Use when querying business unit information with support for filtering, sorting, and pagination. |
| `SAP_SUCCESSFACTORS_GET_FO_COMPANY` | Get FOCompany Records | Retrieves foundation object company records from SAP SuccessFactors. Returns company information including display_name, legal_name, and entityOID for One Domain Model integration. |
| `SAP_SUCCESSFACTORS_GET_FO_COST_CENTER` | Get Foundation Object Cost Centers | Retrieves foundation object cost center records for organizational structure. Contains cost center information with entityOID for One Domain Model integration. Use standard OData query parameters to filter, sort, and paginate results. |
| `SAP_SUCCESSFACTORS_GET_FO_DEPARTMENT` | Get FODepartment Records | Tool to retrieve foundation object department records from SAP SuccessFactors. Use when you need to access organizational department structure information including team and group details. |
| `SAP_SUCCESSFACTORS_GET_FO_JOB_CODE` | Get Foundation Object Job Codes | Retrieves foundation object job code records containing job classification information. Use when you need to fetch job codes with their associated metadata for positions. |
| `SAP_SUCCESSFACTORS_GET_FO_JOB_FUNCTION` | Get Job Functions | Tool to retrieve foundation object job function records for categorizing job roles. Use when you need to query job function data with support for filtering, field selection, and pagination via OData query options. |
| `SAP_SUCCESSFACTORS_GET_FO_LOCATION` | Get Foundation Object Location | Tool to retrieve foundation object location records for work locations. Use when you need to query organizational location data including names, status, timezones, and address details. |
| `SAP_SUCCESSFACTORS_GET_FO_PAY_GROUP` | Get FOPayGroup | Retrieves foundation object pay group records for compensation and payroll groupings. Use when querying pay group data from SAP SuccessFactors. |
| `SAP_SUCCESSFACTORS_GET_FORM_CONTENT` | Get Form Content | Retrieves performance form content from SAP SuccessFactors. Use to query forms with filters like form template ID or modification date. |
| `SAP_SUCCESSFACTORS_GET_GOAL_PLAN_TEMPLATE` | Get Goal Plan Template | Retrieves goal plan template information from SAP SuccessFactors. Use when you need to fetch goal plan template configurations that define the structure of goals via DTD file. |
| `SAP_SUCCESSFACTORS_GET_GOALS_BY_PLAN` | Get Goals By Plan | Retrieves performance goals data using the goal plan ID. Use this to query goals for a specific plan (e.g., Goal_11) with optional filtering by userId or other fields. |
| `SAP_SUCCESSFACTORS_GET_INTERVIEW_OVERALL_ASSESSMENT` | Get Interview Overall Assessment | Tool to retrieve overall interview ratings and navigation for assessments from Interview Central. Use when you need to fetch overall interview assessment data including ratings, recommendations, and comments. |
| `SAP_SUCCESSFACTORS_GET_JOB_APPLICATION` | Get Job Application | Retrieves job application records linking candidates to job requisitions. Use when you need to query application data, filter by status, or retrieve candidate application information. |
| `SAP_SUCCESSFACTORS_GET_JOB_REQ_SCREENING_QUESTION` | Get Job Requisition Screening Questions | Tool to retrieve screening questions related to job requisitions from SAP SuccessFactors Recruiting. Use when you need to access screening questions for candidate assessment in the recruitment process. |
| `SAP_SUCCESSFACTORS_GET_JOB_REQUISITION` | Get Job Requisition | Tool to retrieve job requisition records from SAP SuccessFactors Recruiting Management. Use when you need to read job requisitions, send them to third-party systems, or manage the recruiting workflow. |
| `SAP_SUCCESSFACTORS_GET_ODATA_METADATA_CALIB_SESSION_SERVICE` | Get Calibration Session Metadata | Get OData metadata for Calibration Session service. Returns the service metadata including available entity sets. Use this to discover available entities in the CalSession.svc service. |
| `SAP_SUCCESSFACTORS_GET_ODATA_METADATA_CLOCK_INCLOCK_OUT` | Get Clock In/Out Integration Metadata | Get OData metadata for Clock In/Clock Out Integration service. Returns the complete service schema including entity types, enum types, complex types, and entity container definitions. |
| `SAP_SUCCESSFACTORS_GET_ODATA_METADATA_FOR_NOMINATION_SERVICE` | Get Nomination Service Metadata | Get OData metadata for Nomination service. Returns the service metadata including available entity sets for successor and talent pool nominations. Use this to discover available entities in the NominationService.svc service. |
| `SAP_SUCCESSFACTORS_GET_ODATA_METADATA_ONBOARDING_ADDL` | Get Onboarding Additional Services Metadata | Get OData metadata for Onboarding Additional Services. Returns the complete service schema including available operations like updateUserNamePostHiring and getUserNameOfNewlyHiredEmployee. |
| `SAP_SUCCESSFACTORS_GET_ODATA_USER_METADATA` | Get User Entity Metadata | Retrieves the OData metadata document for the User entity describing its properties and operations. Use this to discover available fields, data types, and navigation properties for the User entity. |
| `SAP_SUCCESSFACTORS_GET_ONB2_PROCESS` | Get Onboarding 2.0 Processes | Tool to retrieve Onboarding 2.0 process records for new hires from SAP SuccessFactors using OData V2 protocol. Use when you need to query onboarding workflow information with filtering, sorting, and field selection capabilities. |
| `SAP_SUCCESSFACTORS_GET_PENDING_FEEDBACK_REQUESTS_FEEDBACK` | Get Pending Feedback Requests | Tool to retrieve pending feedback requests or feedback request records from SAP SuccessFactors Continuous Feedback. Use when you need to query feedback requests with filtering, sorting, pagination, and field selection capabilities. Supports standard OData v4 query operations for flexible data retrieval. |
| `SAP_SUCCESSFACTORS_GET_PER_PERSONAL` | Get Personal Information Records | Tool to retrieve personal information records from SAP SuccessFactors Employee Central. The PerPersonal entity contains non-effective-dated biographical information, emergency contacts, social media accounts, and email addresses. Use when you need to access personal information data. |
| `SAP_SUCCESSFACTORS_GET_PER_PERSON_BY_ID` | Get Person by ID | Tool to retrieve person information for an employee by their external person ID. Use when you need to access core personal information data from SAP SuccessFactors Employee Central PerPerson entity. |
| `SAP_SUCCESSFACTORS_GET_PICKLIST` | Get Picklist | Tool to retrieve picklist definitions from SAP SuccessFactors. Use when you need to fetch selectable value lists (picklists) that are used across various SuccessFactors entities. |
| `SAP_SUCCESSFACTORS_GET_PICKLIST_OPTION` | Get Picklist Option | Retrieves picklist option values with localized labels from SAP SuccessFactors. Use the localeLabel property to get text in the locale of the logged-in user. Supports OData query parameters for filtering, selection, and pagination. |
| `SAP_SUCCESSFACTORS_GET_POSITION` | Get Position | Retrieves position management records from SAP SuccessFactors Employee Central. Use when you need to query position structure and hierarchy information. |
| `SAP_SUCCESSFACTORS_GET_TALENT_POOL` | Get Talent Pool | Retrieves talent pool records including members and nomination details. Use when you need to access talent pool information for succession planning. |
| `SAP_SUCCESSFACTORS_GET_TEMPORARY_TIME_INFORMATION` | Get Temporary Time Information | Retrieves temporary time information records from Time Management module. Use when you need to query temporary work schedules assigned to employees. |
| `SAP_SUCCESSFACTORS_GET_TIME_ACCOUNT_SNAPSHOT` | Get Time Account Snapshot | Retrieves time account snapshot data for leave liability calculation and payroll. Use when you need balance information for employee time accounts as of a specific point in time. |
| `SAP_SUCCESSFACTORS_GET_WORK_ORDER` | Get Work Order | Tool to retrieve work order records for contingent worker management from SAP SuccessFactors. Use when you need to query work order information with support for filtering, field selection, and pagination via OData query options. |
| `SAP_SUCCESSFACTORS_GIVE_OR_RESPOND_FEEDBACK` | Give Feedback or Respond to Feedback Request | Tool to give performance feedback or respond to a feedback request in SAP SuccessFactors Continuous Performance Management. Use when you need to provide feedback on employee performance, strengths, development areas, or respond to existing feedback requests. Supports up to 3 question-answer pairs with extended field lengths (4000 characters per answer). |
| `SAP_SUCCESSFACTORS_LIST_CANDIDATES` | List Candidates | Tool to retrieve a list of candidates from SAP SuccessFactors. Use when you need to query candidate data with OData filtering and pagination options. |
| `SAP_SUCCESSFACTORS_LIST_EMP_EMPLOYMENT` | List Employee Employment Records | Tool to retrieve a list of all employment records from SAP SuccessFactors. Use when you need to query employment data including start dates, employment types, and assignment classes. Supports filtering by custom string fields (custom-string1, custom-string2, custom-string3) and userId. |
| `SAP_SUCCESSFACTORS_LIST_PER_PERSON` | List Person Records | Tool to retrieve a list of person records from SAP SuccessFactors Employee Central. Use when you need to query employee personal information. The PerPerson entity is the foundation for all employee data in Employee Central and always returns the latest active record for each person. |
| `SAP_SUCCESSFACTORS_LIST_USERS` | List Users | Tool to retrieve a list of all employee users from SAP SuccessFactors. Use when you need to query user information with support for filtering, field selection, and pagination via OData query options. |
| `SAP_SUCCESSFACTORS_QUERY_ALL_AVAILABLE_CLOCK_CLOCK_OUT` | Query All Available Clock In/Clock Out Groups | Query all available clock in/clock out groups. Use when you need to retrieve a list of all clock in/clock out groups configured in SAP SuccessFactors. |
| `SAP_SUCCESSFACTORS_QUERY_CLOCK_CLOCK_OUT_GROUP_CODE_TIME` | Query Clock In/Clock Out Group By Code | Query a clock in/clock out group by code with time event types. Use when you need to retrieve details of a specific Clock In Clock Out Group including its configuration and optionally related Time Event Types. |
| `SAP_SUCCESSFACTORS_REFRESH_CDP_LEARNING_METADATA` | Refresh CDP Learning Metadata | Refresh metadata for Career Development Planning Learning service. |
| `SAP_SUCCESSFACTORS_REFRESH_METADATA_CONT_FEEDBACK_SERVICE` | Refresh Metadata for Continuous Feedback | Refresh metadata cache for Continuous Feedback service. Use when metadata changes need to be applied without service interruption. |
| `SAP_SUCCESSFACTORS_UPDATE_CALIBRATION_SUBJECT_RATINGS` | Update Calibration Subject Ratings | Update a subject's competency ratings in a calibration session. |
| `SAP_SUCCESSFACTORS_UPDATE_INTERNAL_USERNAME_NEW_HIRES_AFTER` | Update Username Post Hiring | Update the internal username of new hires after hiring process is completed from Active Directory. Use after Manage Pending Hire (MPH) submit and before day 1 (pre-conversion). Requires 'Manage Onboarding 2.0 or Offboarding 2.0 Update New Hire Data for External HRIS' permission. |

## Supported Triggers

None listed.

## Creating MCP Server - Stand-alone vs Composio SDK

The Sap successfactors MCP server is an implementation of the Model Context Protocol that connects your AI agents and assistants directly to Sap successfactors. Instead of manually wiring Sap successfactors APIs, OAuth, and scopes yourself, you get a structured, tool-based interface that an LLM can call safely.
With Composio's managed implementation, you don't have to create your own developer app. For production, if you're building an end product, we recommend using your own credentials. The managed server helps you prototype fast and go from 0-1 faster.

## Step-by-step Guide

### 1. Prerequisites

You will need:
- A Composio API key
- An OpenAI API key (used by Autogen's OpenAIChatCompletionClient)
- A Sap successfactors account you can connect to Composio
- Some basic familiarity with Autogen and Python async

### 1. Getting API Keys for OpenAI and Composio

OpenAI API Key
- Go to the [OpenAI dashboard](https://platform.openai.com/settings/organization/api-keys) and create an API key. You'll need credits to use the models, or you can connect to another model provider.
- Keep the API key safe.
Composio API Key
- Log in to the [Composio dashboard](https://dashboard.composio.dev?utm_source=toolkits&utm_medium=framework_docs).
- Navigate to your API settings and generate a new API key.
- Store this key securely as you'll need it for authentication.

### 2. Install dependencies

Install Composio, Autogen extensions, and dotenv.
What's happening:
- composio connects your agent to Sap successfactors via MCP
- autogen-agentchat provides the AssistantAgent class
- autogen-ext-openai provides the OpenAI model client
- autogen-ext-tools provides MCP workbench support
```bash
pip install composio python-dotenv
pip install autogen-agentchat autogen-ext-openai autogen-ext-tools
```

### 3. Set up environment variables

Create a .env file in your project folder.
What's happening:
- COMPOSIO_API_KEY is required to talk to Composio
- OPENAI_API_KEY is used by Autogen's OpenAI client
- USER_ID is how Composio identifies which user's Sap successfactors connections to use
```bash
COMPOSIO_API_KEY=your-composio-api-key
OPENAI_API_KEY=your-openai-api-key
USER_ID=your-user-identifier@example.com
```

### 4. Import dependencies and create Tool Router session

What's happening:
- load_dotenv() reads your .env file
- Composio(api_key=...) initializes the SDK
- create(...) creates a Tool Router session that exposes Sap successfactors tools
- session.mcp.url is the MCP endpoint that Autogen will connect to
```python
import asyncio
import os
from dotenv import load_dotenv
from composio import Composio

from autogen_agentchat.agents import AssistantAgent
from autogen_ext.models.openai import OpenAIChatCompletionClient
from autogen_ext.tools.mcp import McpWorkbench, StreamableHttpServerParams

load_dotenv()

async def main():
    # Initialize Composio and create a Sap successfactors session
    composio = Composio(api_key=os.getenv("COMPOSIO_API_KEY"))
    session = composio.create(
        user_id=os.getenv("USER_ID"),
        toolkits=["sap_successfactors"]
    )
    url = session.mcp.url
```

### 5. Configure MCP parameters for Autogen

Autogen expects parameters describing how to talk to the MCP server. That is what StreamableHttpServerParams is for.
What's happening:
- url points to the Tool Router MCP endpoint from Composio
- timeout is the HTTP timeout for requests
- sse_read_timeout controls how long to wait when streaming responses
- terminate_on_close=True cleans up the MCP server process when the workbench is closed
```python
# Configure MCP server parameters for Streamable HTTP
server_params = StreamableHttpServerParams(
    url=url,
    timeout=30.0,
    sse_read_timeout=300.0,
    terminate_on_close=True,
    headers={"x-api-key": os.getenv("COMPOSIO_API_KEY")}
)
```

### 6. Create the model client and agent

What's happening:
- OpenAIChatCompletionClient wraps the OpenAI model for Autogen
- McpWorkbench connects the agent to the MCP tools
- AssistantAgent is configured with the Sap successfactors tools from the workbench
```python
# Create model client
model_client = OpenAIChatCompletionClient(
    model="gpt-5",
    api_key=os.getenv("OPENAI_API_KEY")
)

# Use McpWorkbench as context manager
async with McpWorkbench(server_params) as workbench:
    # Create Sap successfactors assistant agent with MCP tools
    agent = AssistantAgent(
        name="sap_successfactors_assistant",
        description="An AI assistant that helps with Sap successfactors operations.",
        model_client=model_client,
        workbench=workbench,
        model_client_stream=True,
        max_tool_iterations=10
    )
```

### 7. Run the interactive chat loop

What's happening:
- The script prompts you in a loop with You:
- Autogen passes your input to the model, which decides which Sap successfactors tools to call via MCP
- agent.run_stream(...) yields streaming messages as the agent thinks and calls tools
- Typing exit, quit, or bye ends the loop
```python
print("Chat started! Type 'exit' or 'quit' to end the conversation.\n")
print("Ask any Sap successfactors related question or task to the agent.\n")

# Conversation loop
while True:
    user_input = input("You: ").strip()

    if user_input.lower() in ["exit", "quit", "bye"]:
        print("\nGoodbye!")
        break

    if not user_input:
        continue

    print("\nAgent is thinking...\n")

    # Run the agent with streaming
    try:
        response_text = ""
        async for message in agent.run_stream(task=user_input):
            if hasattr(message, "content") and message.content:
                response_text = message.content

        # Print the final response
        if response_text:
            print(f"Agent: {response_text}\n")
        else:
            print("Agent: I encountered an issue processing your request.\n")

    except Exception as e:
        print(f"Agent: Sorry, I encountered an error: {str(e)}\n")
```

## Complete Code

```python
import asyncio
import os
from dotenv import load_dotenv
from composio import Composio

from autogen_agentchat.agents import AssistantAgent
from autogen_ext.models.openai import OpenAIChatCompletionClient
from autogen_ext.tools.mcp import McpWorkbench, StreamableHttpServerParams

load_dotenv()

async def main():
    # Initialize Composio and create a Sap successfactors session
    composio = Composio(api_key=os.getenv("COMPOSIO_API_KEY"))
    session = composio.create(
        user_id=os.getenv("USER_ID"),
        toolkits=["sap_successfactors"]
    )
    url = session.mcp.url

    # Configure MCP server parameters for Streamable HTTP
    server_params = StreamableHttpServerParams(
        url=url,
        timeout=30.0,
        sse_read_timeout=300.0,
        terminate_on_close=True,
        headers={"x-api-key": os.getenv("COMPOSIO_API_KEY")}
    )

    # Create model client
    model_client = OpenAIChatCompletionClient(
        model="gpt-5",
        api_key=os.getenv("OPENAI_API_KEY")
    )

    # Use McpWorkbench as context manager
    async with McpWorkbench(server_params) as workbench:
        # Create Sap successfactors assistant agent with MCP tools
        agent = AssistantAgent(
            name="sap_successfactors_assistant",
            description="An AI assistant that helps with Sap successfactors operations.",
            model_client=model_client,
            workbench=workbench,
            model_client_stream=True,
            max_tool_iterations=10
        )

        print("Chat started! Type 'exit' or 'quit' to end the conversation.\n")
        print("Ask any Sap successfactors related question or task to the agent.\n")

        # Conversation loop
        while True:
            user_input = input("You: ").strip()

            if user_input.lower() in ['exit', 'quit', 'bye']:
                print("\nGoodbye!")
                break

            if not user_input:
                continue

            print("\nAgent is thinking...\n")

            # Run the agent with streaming
            try:
                response_text = ""
                async for message in agent.run_stream(task=user_input):
                    if hasattr(message, 'content') and message.content:
                        response_text = message.content

                # Print the final response
                if response_text:
                    print(f"Agent: {response_text}\n")
                else:
                    print("Agent: I encountered an issue processing your request.\n")

            except Exception as e:
                print(f"Agent: Sorry, I encountered an error: {str(e)}\n")

if __name__ == "__main__":
    asyncio.run(main())
```

## Conclusion

You now have an Autogen assistant wired into Sap successfactors through Composio's Tool Router and MCP. From here you can:
- Add more toolkits to the toolkits list, for example notion or hubspot
- Refine the agent description to point it at specific workflows
- Wrap this script behind a UI, Slack bot, or internal tool
Once the pattern is clear for Sap successfactors, you can reuse the same structure for other MCP-enabled apps with minimal code changes.

## How to build Sap successfactors MCP Agent with another framework

- [ChatGPT](https://composio.dev/toolkits/sap_successfactors/framework/chatgpt)
- [OpenAI Agents SDK](https://composio.dev/toolkits/sap_successfactors/framework/open-ai-agents-sdk)
- [Claude Agent SDK](https://composio.dev/toolkits/sap_successfactors/framework/claude-agents-sdk)
- [Claude Code](https://composio.dev/toolkits/sap_successfactors/framework/claude-code)
- [Claude Cowork](https://composio.dev/toolkits/sap_successfactors/framework/claude-cowork)
- [Codex](https://composio.dev/toolkits/sap_successfactors/framework/codex)
- [Cursor](https://composio.dev/toolkits/sap_successfactors/framework/cursor)
- [VS Code](https://composio.dev/toolkits/sap_successfactors/framework/vscode)
- [OpenCode](https://composio.dev/toolkits/sap_successfactors/framework/opencode)
- [OpenClaw](https://composio.dev/toolkits/sap_successfactors/framework/openclaw)
- [Hermes](https://composio.dev/toolkits/sap_successfactors/framework/hermes-agent)
- [CLI](https://composio.dev/toolkits/sap_successfactors/framework/cli)
- [Google ADK](https://composio.dev/toolkits/sap_successfactors/framework/google-adk)
- [LangChain](https://composio.dev/toolkits/sap_successfactors/framework/langchain)
- [Vercel AI SDK](https://composio.dev/toolkits/sap_successfactors/framework/ai-sdk)
- [Mastra AI](https://composio.dev/toolkits/sap_successfactors/framework/mastra-ai)
- [LlamaIndex](https://composio.dev/toolkits/sap_successfactors/framework/llama-index)
- [CrewAI](https://composio.dev/toolkits/sap_successfactors/framework/crew-ai)

## Related Toolkits

- [Ashby](https://composio.dev/toolkits/ashby) - Ashby is an applicant tracking system that handles job postings, candidate management, and hiring analytics.
- [Async interview](https://composio.dev/toolkits/async_interview) - Async interview is an on-demand video interview platform for streamlined hiring. Candidates record responses on their schedule, so employers can review anytime.
- [Bamboohr](https://composio.dev/toolkits/bamboohr) - BambooHR is a cloud-based HR management platform for small and mid-sized businesses. It streamlines employee data, HR workflows, and reporting in one easy interface.
- [Breathe HR](https://composio.dev/toolkits/breathehr) - Breathe HR is cloud-based HR software for SMEs to manage employee data, absences, and performance. It simplifies HR admin, making it easy to keep employee records accurate and up to date.
- [Connecteam](https://composio.dev/toolkits/connecteam) - Connecteam is a workforce management platform for deskless teams, streamlining operations, HR, and team communication. It helps businesses save time by automating scheduling, time tracking, and staff engagement tasks.
- [Lever](https://composio.dev/toolkits/lever) - Lever is an applicant tracking system that blends sourcing, CRM, and analytics for recruiting. It helps companies scale hiring with collaborative workflows and actionable insights.
- [Recruitee](https://composio.dev/toolkits/recruitee) - Recruitee is collaborative hiring software that centralizes recruitment tasks for teams. It streamlines sourcing, interviewing, and hiring so you can fill roles faster.
- [Remote retrieval](https://composio.dev/toolkits/remote_retrieval) - Remote retrieval is a logistics automation tool for managing laptop and monitor returns. It streamlines return tracking, saving time and hassle for IT and ops teams.
- [Talenthr](https://composio.dev/toolkits/talenthr) - TalentHR is an intuitive, all-in-one HR tool for managing employee records, leave, and HR workflows. It streamlines HR operations so businesses can focus on people, not paperwork.
- [Workable](https://composio.dev/toolkits/workable) - Workable is an all-in-one HR software platform that streamlines hiring, employee management, and payroll. It helps teams simplify recruiting, onboarding, and staff operations in one place.
- [Workday](https://composio.dev/toolkits/workday) - Workday is a cloud-based ERP platform for HR, finance, and workforce analytics. It streamlines employee management, payroll, and business operations in a single system.
- [Gmail](https://composio.dev/toolkits/gmail) - Gmail is Google's email service with powerful spam protection, search, and G Suite integration. It keeps your inbox organized and makes communication fast and reliable.
- [Google Calendar](https://composio.dev/toolkits/googlecalendar) - Google Calendar is a time management service for scheduling meetings, events, and reminders. It streamlines personal and team organization with integrated notifications and sharing options.
- [Google Drive](https://composio.dev/toolkits/googledrive) - Google Drive is a cloud storage platform for uploading, sharing, and collaborating on files. It's perfect for keeping your documents accessible and organized across devices.
- [Outlook](https://composio.dev/toolkits/outlook) - Outlook is Microsoft's email and calendaring platform for unified communications and scheduling. It helps users stay organized with powerful email, contacts, and calendar management.
- [Twitter](https://composio.dev/toolkits/twitter) - Twitter is a social media platform for sharing real-time updates, conversations, and news. Stay connected, informed, and engaged with communities worldwide.
- [Google Sheets](https://composio.dev/toolkits/googlesheets) - Google Sheets is a cloud-based spreadsheet tool for real-time collaboration and data analysis. It lets teams work together from anywhere, updating information instantly.
- [Supabase](https://composio.dev/toolkits/supabase) - Supabase is an open-source backend platform offering scalable Postgres databases, authentication, storage, and real-time APIs. It lets developers build modern apps without managing infrastructure.
- [Composio](https://composio.dev/toolkits/composio) - Composio is an integration platform that connects AI agents with hundreds of business tools. It streamlines authentication and lets you trigger actions across services—no custom code needed.
- [Notion](https://composio.dev/toolkits/notion) - Notion is a collaborative workspace for notes, docs, wikis, and tasks. It streamlines team knowledge, project tracking, and workflow customization in one place.

## Frequently Asked Questions

### What are the differences in Tool Router MCP and Sap successfactors MCP?

With a standalone Sap successfactors MCP server, the agents and LLMs can only access a fixed set of Sap successfactors tools tied to that server. However, with the Composio Tool Router, agents can dynamically load tools from Sap successfactors and many other apps based on the task at hand, all through a single MCP endpoint.

### Can I use Tool Router MCP with Autogen?

Yes, you can. Autogen fully supports MCP integration. You get structured tool calling, message history handling, and model orchestration while Tool Router takes care of discovering and serving the right Sap successfactors tools.

### Can I manage the permissions and scopes for Sap successfactors while using Tool Router?

Yes, absolutely. You can configure which Sap successfactors scopes and actions are allowed when connecting your account to Composio. You can also bring your own OAuth credentials or API configuration so you keep full control over what the agent can do.

### How safe is my data with Composio Tool Router?

All sensitive data such as tokens, keys, and configuration is fully encrypted at rest and in transit. Composio is SOC 2 Type 2 compliant and follows strict security practices so your Sap successfactors data and credentials are handled as safely as possible.

---
[See all toolkits](https://composio.dev/toolkits) · [Composio docs](https://docs.composio.dev/llms.txt)
