# How to integrate Baselinker MCP with Autogen

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

## Introduction

This guide walks you through connecting Baselinker to AutoGen using the Composio tool router. By the end, you'll have a working Baselinker agent that can list all orders from this week, find orders placed by john@example.com, show pending receipts waiting to be issued through natural language commands.
This guide will help you understand how to give your AutoGen agent real control over a Baselinker account through Composio's Baselinker MCP server.
Before we dive in, let's take a quick look at the key ideas and tools involved.

## Also integrate Baselinker with

- [OpenAI Agents SDK](https://composio.dev/toolkits/baselinker/framework/open-ai-agents-sdk)
- [Claude Agent SDK](https://composio.dev/toolkits/baselinker/framework/claude-agents-sdk)
- [Claude Code](https://composio.dev/toolkits/baselinker/framework/claude-code)
- [Claude Cowork](https://composio.dev/toolkits/baselinker/framework/claude-cowork)
- [Codex](https://composio.dev/toolkits/baselinker/framework/codex)
- [OpenClaw](https://composio.dev/toolkits/baselinker/framework/openclaw)
- [Hermes](https://composio.dev/toolkits/baselinker/framework/hermes-agent)
- [CLI](https://composio.dev/toolkits/baselinker/framework/cli)
- [Google ADK](https://composio.dev/toolkits/baselinker/framework/google-adk)
- [LangChain](https://composio.dev/toolkits/baselinker/framework/langchain)
- [Vercel AI SDK](https://composio.dev/toolkits/baselinker/framework/ai-sdk)
- [Mastra AI](https://composio.dev/toolkits/baselinker/framework/mastra-ai)
- [LlamaIndex](https://composio.dev/toolkits/baselinker/framework/llama-index)
- [CrewAI](https://composio.dev/toolkits/baselinker/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 Baselinker
- Wire that MCP URL into Autogen using McpWorkbench and StreamableHttpServerParams
- Configure an Autogen AssistantAgent that can call Baselinker tools
- Run a live chat loop where you ask the agent to perform Baselinker 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 Baselinker MCP server, and what's possible with it?

The Baselinker MCP server is an implementation of the Model Context Protocol that connects your AI agent and assistants like Claude, Cursor, etc directly to your Baselinker account. It provides structured and secure access to your e-commerce data, so your agent can perform tasks like managing orders, tracking inventory, processing receipts, and retrieving sales information on your behalf.
- Order management and retrieval: Let your agent fetch, filter, and download order details—including by date, status, or customer email—for fast access to sales and customer data.
- Inventory and purchase order tracking: Automatically retrieve current inventory documents, view purchase orders, and get document series to keep your stock and supply chain in check.
- External storage and warehouse discovery: Seamlessly list all external stores and warehouses connected to your Baselinker account, so your agent knows where your products live.
- Order status and custom field mapping: Ask your agent to pull order statuses or extra field definitions, making it easy to interpret, categorize, and automate order processing flows.
- Pending receipt management: Quickly fetch receipts that still need to be issued, helping your team stay on top of fiscal compliance and transaction documentation.

## Supported Tools

| Tool slug | Name | Description |
|---|---|---|
| `BASELINKER_ADD_INVENTORY` | Add Inventory | Tool to add or update a BaseLinker catalog (inventory). Use when you need to create a new catalog or update an existing one with the same identifier. |
| `BASELINKER_ADD_INVENTORY_CATEGORY` | Add Inventory Category | Tool to add or update a category in the BaseLinker catalog. Use when you need to create a new category or update an existing one. Adding a category with the same identifier again updates the previously saved category. |
| `BASELINKER_ADD_INVENTORY_DOCUMENT` | Add Inventory Document | Tool to create a new inventory document in BaseLinker storage. Use when you need to create goods receipts, issues, or transfers. Documents are created as drafts and require confirmation via user action or setInventoryDocumentStatusConfirmed API method. |
| `BASELINKER_ADD_INVENTORY_MANUFACTURER` | Add Inventory Manufacturer | Tool to add or update a manufacturer in the BaseLinker catalog. Use when you need to create a new manufacturer or update an existing one. Adding a manufacturer with the same identifier again updates the previously saved manufacturer. |
| `BASELINKER_ADD_INVENTORY_PAYER` | Add Inventory Payer | Tool to add a new payer or update an existing one in BaseLinker storage. Use when you need to create a new payer with contact details or update an existing payer's information. |
| `BASELINKER_ADD_INVENTORY_PRICE_GROUP` | Add Inventory Price Group | Tool to create or update a price group in BaseLinker storage. Use when you need to define pricing tiers (e.g., wholesale, retail, VIP) that can be later assigned to inventory items via addInventory method. |
| `BASELINKER_ADD_INVENTORY_PRODUCT` | Add Inventory Product | Add a new product to BaseLinker catalog or update an existing product. Use when creating inventory items or modifying product details like SKU, price, stock, dimensions, and text fields. Provide product_id to update existing products, omit it to create new ones. |
| `BASELINKER_ADD_INVENTORY_PURCHASE_ORDER` | Add Inventory Purchase Order | Tool to create a new purchase order in BaseLinker storage. Orders are created as drafts by default. Use when you need to create a new purchase order for inventory management. |
| `BASELINKER_ADD_INVENTORY_PURCHASE_ORDER_ITEMS` | Add Inventory Purchase Order Items | Tool to add items to an existing purchase order in BaseLinker. Use when you need to add products to a purchase order that has already been created. |
| `BASELINKER_ADD_INVENTORY_SUPPLIER` | Add Inventory Supplier | Tool to add a new supplier or update an existing one in BaseLinker storage. Use when you need to manage supplier information for inventory management. If supplier_id is provided, the existing supplier will be updated; otherwise, a new supplier will be created. |
| `BASELINKER_ADD_INVENTORY_WAREHOUSE` | Add Inventory Warehouse | Tool to add a new warehouse or update an existing warehouse in BaseLinker inventories. Use when you need to create new warehouse locations for inventory management or update warehouse details. Adding a warehouse with the same identifier again will update the previously saved warehouse. The method does not allow editing warehouses created automatically for external stocks. |
| `BASELINKER_ADD_INVOICE` | Add Invoice | Tool to issue an order invoice in BaseLinker. Use when you need to generate an invoice for an existing order using a specific numbering series. |
| `BASELINKER_ADD_INVOICE_CORRECTION` | Add Invoice Correction | Tool to issue an order invoice correction. Use when correcting pricing errors, handling returns, or updating invoice data. Either original_invoice_id or return_order_id must be provided. |
| `BASELINKER_ADD_ORDER` | Add Order | Tool to add a new order to the BaseLinker order manager. Use when you need to create a new order with customer details, products, and delivery information. |
| `BASELINKER_ADD_ORDER_BY_SPLIT` | Add Order By Split | Tool to create a new order by splitting selected products from an existing order. Use when you need to split an order into multiple shipments or separate deliveries. The new order inherits all customer details, addresses, and settings from the original order, with only the specified products and optional delivery costs moved to it. |
| `BASELINKER_ADD_ORDER_DUPLICATE` | Add Order Duplicate | Tool to add a new order by duplicating an existing order in BaseLinker. The new order will have the same data as the original order but with a different ID. |
| `BASELINKER_ADD_ORDER_RETURN` | Add Order Return | Tool to add a new order return to BaseLinker. Use when creating a return for an order. Requires status_id (get from getOrderReturnStatusList), date_add (Unix timestamp), currency (3-letter code), and refunded status. |
| `BASELINKER_ADD_ORDER_RETURN_PRODUCT` | Add Order Return Product | Tool to add a new product to an existing order return in BaseLinker. Use when a customer is returning items and you need to register the returned products. |
| `BASELINKER_ADD_SHOP_CATEGORY` | Add Shop Category | Tool to add a new category to BaseLinker storage (shops, warehouses, or BaseLinker inventory). Use when you need to create a new category in a connected storage's category structure. Requires a storage_id which can be obtained from GetExternalStoragesList or use 'bl_1' for BaseLinker inventory. |
| `BASELINKER_CREATE_PACKAGE_MANUAL` | Create Package Manual | Tool to register shipping details for orders when shipments are created outside BaseLinker. Use when you need to add tracking numbers and courier information for manually created shipments. Supports marking packages as return shipments. |
| `BASELINKER_DELETE_INVENTORY` | Delete Inventory | Tool to delete a catalog from BaseLinker storage. Use when you need to permanently remove an inventory/catalog. |
| `BASELINKER_DELETE_INVENTORY_CATEGORY` | Delete Inventory Category | Tool to remove categories from BaseLinker warehouse. Along with the category, the products contained therein are removed (however, this does not apply to products in subcategories). The subcategories will be changed to the highest level categories. |
| `BASELINKER_DELETE_INVENTORY_MANUFACTURER` | Delete Inventory Manufacturer | Tool to remove a manufacturer from the BaseLinker catalog. Use when you need to delete a manufacturer that is no longer needed or was added by mistake. |
| `BASELINKER_DELETE_INVENTORY_PAYER` | Delete Inventory Payer | Tool to remove a payer from BaseLinker storage. Use when you need to delete an existing payer entry by its ID. |
| `BASELINKER_DELETE_INVENTORY_PRICE_GROUP` | Delete Inventory Price Group | Tool to remove a price group from BaseLinker storage. Use when you need to delete an existing price group by its identifier. |
| `BASELINKER_DELETE_INVENTORY_PRODUCT` | Delete Inventory Product | Tool to remove a product from the BaseLinker catalog. Use when you need to permanently delete an inventory product by its ID. |
| `BASELINKER_DELETE_INVENTORY_WAREHOUSE` | Delete Inventory Warehouse | Tool to remove a warehouse from BaseLinker inventories. Use when you need to delete a warehouse that is no longer needed. Note: This method does not allow removal of warehouses created automatically for external stock management (shops, wholesalers, etc.). |
| `BASELINKER_DELETE_ORDER_PRODUCT` | Delete Order Product | Tool to remove a specific product from an order in BaseLinker. Use when you need to delete an order item without canceling the entire order. |
| `BASELINKER_DELETE_ORDER_RETURN_PRODUCT` | Delete Order Return Product | Tool to remove a specific product from an order return in BaseLinker. Use when you need to delete a product item from an existing return request. |
| `BASELINKER_DELETE_ORDERS` | Delete Orders | Tool to delete multiple orders from BaseLinker order manager. Use when you need to permanently remove orders from the system. |
| `BASELINKER_GET_CONNECT_INTEGRATION_CONTRACTORS` | Get Connect Integration Contractors | Tool to retrieve a list of contractors connected to a selected Base Connect integration. Use when you need to discover available contractors for a specific integration before performing contractor-specific operations. |
| `BASELINKER_GET_CONNECT_INTEGRATIONS` | Get Connect Integrations | Tool to retrieve a list of all Base Connect integrations on this account. Returns both integrations created on the account and integrations to which the account has connected. |
| `BASELINKER_GET_COURIER_ACCOUNTS` | Get Courier Accounts | Tool to retrieve the list of accounts connected to a given courier. Use when you need to identify available courier accounts before performing shipping operations. |
| `BASELINKER_GET_COURIER_FIELDS` | Get Courier Fields | Tool to retrieve the form fields required for creating shipments with a specific courier. Use when you need to discover which fields are required or optional for shipment creation. |
| `BASELINKER_GET_COURIER_PACKAGES_STATUS_HISTORY` | Get Courier Packages Status History | Tool to retrieve the history of status changes for courier packages. Use when you need to track the delivery progress of shipments through their complete status timeline. Returns chronological status updates for up to 100 packages per request. |
| `BASELINKER_GET_COURIERS_LIST` | Get Couriers List | Tool to retrieve a list of available couriers from BaseLinker. Use when you need to discover which shipping carriers are configured before creating packages or querying courier-specific fields. |
| `BASELINKER_GET_EXTERNAL_STORAGE_PRODUCTS_QUANTITY` | Get External Storage Products Quantity | Retrieve stock quantities from an external storage (shop/wholesaler) connected to BaseLinker. Use this tool to check current inventory levels for products in external integrations. Returns product IDs with their quantities, including variant-level stock if applicable. |
| `BASELINKER_GET_EXTERNAL_STORAGES_LIST` | Get External Storages List | Retrieve a list of external storages (shops, warehouses, wholesalers) connected to BaseLinker that can be referenced via API. Returns storage IDs (e.g., 'shop_2444', 'warehouse_1334'), names, and supported API methods for each storage. Use this to discover available integrations before calling storage-specific methods like getExternalStorageProductsList. |
| `BASELINKER_GET_INVENTORIES` | Get Inventories | Tool to retrieve a list of catalogs (inventories) available in the BaseLinker storage. Use when you need to discover available catalogs and their configurations before performing inventory-specific operations. |
| `BASELINKER_GET_INVENTORY_AVAILABLE_TEXT_FIELD_KEYS` | Get Inventory Available Text Field Keys | Tool to retrieve a list of product text fields that can be overwritten for a specific integration. Use when you need to discover which text fields are available for modification within a given inventory catalog. |
| `BASELINKER_GET_INVENTORY_CATEGORIES` | Get Inventory Categories | Tool to retrieve a list of categories for a BaseLinker catalog. Use when you need to fetch category hierarchies for inventory management or product organization. |
| `BASELINKER_GET_INVENTORY_DOCUMENT_ITEMS` | Get Inventory Document Items | Tool to retrieve items from inventory documents in BaseLinker. Use when you need to fetch product details from a specific document with support for pagination (100 items per page). |
| `BASELINKER_GET_INVENTORY_DOCUMENTS` | Get Inventory Documents | Tool to retrieve a list of inventory documents. Use when you need to fetch inventory records with optional filters for ID, type, status, date range, warehouse, or pagination. |
| `BASELINKER_GET_INVENTORY_DOCUMENT_SERIES` | Get Inventory Document Series | Tool to retrieve available inventory document series. Use when you need to assign a numbering series to a new inventory document. |
| `BASELINKER_GET_INVENTORY_EXTRA_FIELDS` | Get Inventory Extra Fields | Tool to retrieve extra fields defined for BaseLinker catalog inventory items. Use before fetching or updating inventory products to list available custom fields. |
| `BASELINKER_GET_INVENTORY_INTEGRATIONS` | Get Inventory Integrations | Tool to retrieve a list of integrations where text values in the catalog can be overwritten. Use when you need to discover which sales channels support text customization and what languages are available for each integration. |
| `BASELINKER_GET_INVENTORY_MANUFACTURERS` | Get Inventory Manufacturers | Tool to retrieve a list of manufacturers from the BaseLinker catalog. Use when you need to view all manufacturers available in the system before adding or modifying manufacturer information. |
| `BASELINKER_GET_INVENTORY_PAYERS` | Get Inventory Payers | Tool to retrieve a list of payers available in BaseLinker storage. Use when you need to list payers, optionally filtered by ID or name. |
| `BASELINKER_GET_INVENTORY_PRICE_GROUPS` | Get Inventory Price Groups | Tool to retrieve price groups existing in BaseLinker storage. Use when you need to discover available pricing tiers before assigning them to inventory items or performing price-related operations. |
| `BASELINKER_GET_INVENTORY_PRINTOUT_TEMPLATES` | Get Inventory Printout Templates | Tool to retrieve a list of all configured printout templates available for inventory (products). Use when you need to discover available printout templates before generating product documents. |
| `BASELINKER_GET_INVENTORY_PRODUCT_LOGS` | Get Inventory Product Logs | Tool to retrieve a list of events related to product changes in the BaseLinker catalog. Use when tracking product modification history, auditing changes, or monitoring inventory updates. |
| `BASELINKER_GET_INVENTORY_PRODUCTS_DATA` | Get Inventory Products Data | Tool to retrieve detailed data for selected products from the BaseLinker inventory. Use when you need comprehensive product information including SKU, prices, stock, dimensions, descriptions, images, variants, and bundle details. |
| `BASELINKER_GET_INVENTORY_PRODUCTS_LIST` | Get Inventory Products List | Tool to retrieve basic data of chosen products from BaseLinker catalogs. Use when you need to list products with optional filtering by ID, category, EAN, SKU, name, price range, or stock levels. Supports pagination for large catalogs (1000 products per page). |
| `BASELINKER_GET_INVENTORY_PRODUCTS_PRICES` | Get Inventory Products Prices | Retrieve gross prices of products from BaseLinker inventories. Use when you need to get pricing information for products and their variants across different price groups. Supports pagination for large product catalogs. |
| `BASELINKER_GET_INVENTORY_PRODUCTS_STOCK` | Get Inventory Products Stock | Tool to retrieve stock data of products from BaseLinker catalogs. Use when you need to check current inventory levels, reservations, or variant stock across warehouses. Results are paginated at 1000 products per page. |
| `BASELINKER_GET_INVENTORY_PURCHASE_ORDER_ITEMS` | Get Inventory Purchase Order Items | Tool to retrieve items from a specific purchase order in BaseLinker. Use when you need to fetch product details from a purchase order with support for pagination (100 items per page). |
| `BASELINKER_GET_INVENTORY_PURCHASE_ORDERS` | Get Inventory Purchase Orders | Tool to retrieve a list of purchase orders from BaseLinker storage. Use when you need to fetch purchase orders with optional filters like date range, supplier or pagination. |
| `BASELINKER_GET_INVENTORY_PURCHASE_ORDER_SERIES` | Get Inventory Purchase Order Series | Tool to retrieve a list of purchase order document series. Use when you need to select a numbering series for a new purchase order. |
| `BASELINKER_GET_INVENTORY_SUPPLIERS` | Get Inventory Suppliers | Tool to retrieve a list of suppliers available in BaseLinker storage. Use when you need to list suppliers, optionally filtered by ID or name. |
| `BASELINKER_GET_INVENTORY_TAGS` | Get Inventory Tags | Tool to retrieve a list of tags for a BaseLinker catalog. Use when you need to view all tags available in the system before categorizing or filtering inventory items. |
| `BASELINKER_GET_INVENTORY_WAREHOUSES` | Get Inventory Warehouses | Tool to retrieve a list of warehouses available in BaseLinker inventories. Use when you need to discover available warehouse locations before performing inventory or stock operations. Returns warehouses created manually as well as those created automatically for external stocks (shops, wholesalers). |
| `BASELINKER_GET_INVOICE_FILE` | Get Invoice File | Tool to retrieve an invoice file from BaseLinker in base64-encoded format. Use when you need to download an invoice document generated by BaseLinker or from an external accounting system. |
| `BASELINKER_GET_INVOICES` | Get Invoices | Download invoices from BaseLinker order manager with optional filtering. Use this tool to: - Fetch all invoices from a specific date onwards - Retrieve a single invoice by ID or order ID - Filter invoices by numbering series - Paginate through invoices using id_from parameter Returns up to 100 invoices per request. Use getSeries to get available series IDs for filtering. |
| `BASELINKER_GET_JOURNAL_LIST` | Get Journal List | Tool to download order event logs from the last 3 days. Use when you need to track order activities, changes, or events. IMPORTANT: This method must be activated by BaseLinker support on your account. If not activated, it returns an empty response. Events include order creation, status changes, payments, invoices, receipts, product modifications, and package operations. Use last_log_id to paginate through results incrementally. |
| `BASELINKER_GET_NEW_RECEIPTS` | Get New Receipts | Tool to retrieve receipts waiting to be issued. Use after confirming fiscal printer availability; fetch pending receipts and mark them with setOrderReceipt. |
| `BASELINKER_GET_ORDER_EXTRA_FIELDS` | Get Order Extra Fields | Tool to retrieve extra fields defined for orders. Use before fetching orders with include_custom_extra_fields to list available custom order fields. |
| `BASELINKER_GET_ORDER_PACKAGES` | Get Order Packages | Tool to download shipments previously created for a selected order. Use when you need to retrieve tracking numbers, courier information, and delivery status for order packages. |
| `BASELINKER_GET_ORDER_PAYMENTS_HISTORY` | Get Order Payments History | Tool to retrieve payment history for a selected order, including external payment identifiers from payment gateways. Use when you need to track payment events for an order. One order can have multiple payment history entries due to surcharges, order value changes, or manual payment editing. |
| `BASELINKER_GET_ORDER_PICK_PACK_HISTORY` | Get Order Pick Pack History | Tool to retrieve pick and pack history for a selected order. Use when you need to track the fulfillment timeline and events for an order (reservations, picking, packing, photography). Returns chronological list of pick/pack events with timestamps and responsible profiles. |
| `BASELINKER_GET_ORDER_PRINTOUT_TEMPLATES` | Get Order Printout Templates | Tool to retrieve a list of all configured printout templates available for orders. Use when you need to discover available printout templates before generating order documents. |
| `BASELINKER_GET_ORDER_RETURN_EXTRA_FIELDS` | Get Order Return Extra Fields | Tool to retrieve extra fields defined for order returns. Use before calling getOrderReturns with include_custom_extra_fields to list available custom fields. Field values can be set via setOrderReturnFields. |
| `BASELINKER_GET_ORDER_RETURN_JOURNAL_LIST` | Get Order Return Journal List | Tool to download return event logs from the last 3 days in BaseLinker. Use when tracking return order history, monitoring return status changes, or auditing return-related activities. Returns events like return creation, status changes, product modifications, and refund creation. |
| `BASELINKER_GET_ORDER_RETURN_PAYMENTS_HISTORY` | Get Order Return Payments History | Tool to retrieve payment history for a selected order return, including external payment identifiers from the payment gateway. Use when you need to track payment events, surcharges, order value changes, or manual payment edits for a return. |
| `BASELINKER_GET_ORDER_RETURN_PRODUCT_STATUSES` | Get Order Return Product Statuses | Tool to retrieve a list of order return product statuses from BaseLinker. Use when you need to identify valid status IDs for return items, or to map status IDs to human-readable names. |
| `BASELINKER_GET_ORDER_RETURN_REASONS_LIST` | Get Order Return Reasons List | Tool to retrieve a list of order return reasons. Use when you need to discover available return reasons before setting return fields with setOrderReturnFields. |
| `BASELINKER_GET_ORDER_RETURNS` | Get Order Returns | Download order returns from BaseLinker return manager with optional filtering. Use this tool to: - Fetch returns from a specific date onwards using date_from parameter - Retrieve a single return by return_id - Filter returns by source order, status, or marketplace source - Paginate through returns using id_from parameter Returns up to 100 order returns per request. For complete return data including custom fields, set include_custom_extra_fields=true. Use include_connect_data=true for Base Connect integration info. |
| `BASELINKER_GET_ORDER_RETURN_STATUS_LIST` | Get Order Return Status List | Tool to retrieve order return statuses created in the BaseLinker order manager. Use when you need to map return status IDs to human-readable names. |
| `BASELINKER_GET_ORDERS` | Get Orders | Download orders from BaseLinker order manager with optional filtering. Use this tool to: - Fetch all orders from a specific date onwards - Retrieve a single order by ID - Filter orders by status, email, or marketplace source - Paginate through orders using id_from parameter Returns up to 100 orders per request. For confirmed orders only, omit get_unconfirmed_orders. Tip: Use getOrderStatusList to get status IDs for filtering. |
| `BASELINKER_GET_ORDERS_BY_PHONE` | Get Orders by Phone | Search for orders associated with a specific phone number in BaseLinker. Use when identifying callers in phone recognition systems or finding order history by phone. Returns basic order information including status, recipient names, and timestamps. |
| `BASELINKER_GET_ORDER_SOURCES` | Get Order Sources | Tool to retrieve types of order sources along with their IDs from BaseLinker. Use when you need to understand available order sources for filtering orders or mapping order_source field values from getOrders method. |
| `BASELINKER_GET_ORDER_STATUS_LIST` | Get Order Status List | Tool to retrieve a list of order statuses created in the BaseLinker order manager. Use when you need to map status IDs to human-readable names. |
| `BASELINKER_GET_ORDER_TRANSACTION_DATA` | Get Order Transaction Data | Tool to retrieve transaction details for a selected order. Use when you need marketplace transaction IDs, fulfillment data, or detailed tax breakdowns for an order. |
| `BASELINKER_GET_PACKAGE_DETAILS` | Get Package Details | Tool to get detailed information about a package. If the package contains multiple subpackages, information about all of them is included in the response. Use when you need comprehensive package dimensions, weight, COD, insurance, and shipping cost details. |
| `BASELINKER_GET_PICK_PACK_CARTS` | Get PickPack Carts | Tool to retrieve a list of all PickPack carts belonging to the authenticated user. Use when you need to discover available carts and their details (ID, name, color) before performing cart-specific operations. |
| `BASELINKER_GET_PROTOCOL` | Get Protocol | Tool to download a parcel protocol for selected shipments. Use when you need to retrieve shipping protocol documents (PDF or HTML) for packages sent via a courier. The protocol is available only if supported by the chosen courier. |
| `BASELINKER_GET_RECEIPTS` | Get Receipts | Tool to retrieve issued receipts from BaseLinker. Use when you need to fetch historical receipt data. Max 100 receipts returned per request. |
| `BASELINKER_GET_REQUEST_PARCEL_PICKUP_FIELDS` | Get Request Parcel Pickup Fields | Tool to retrieve additional fields for a parcel pickup request from a specific courier. Use when preparing to request a parcel pickup and need to know which additional information the courier requires (e.g., pickup time, contact details, special instructions). |
| `BASELINKER_GET_SERIES` | Get Series | Tool to download invoice/receipt numbering series. Use when you need to retrieve all series configurations before issuing documents. |
| `BASELINKER_GET_STORAGES_LIST` | Get Storages List | Tool to download a list of available storages accessible via API. Use when you need to discover storage endpoints and capabilities before performing storage-specific operations. |
| `BASELINKER_RUN_ORDER_MACRO_TRIGGER` | Run Order Macro Trigger | Tool to run personal trigger for orders automatic actions. Use when you need to execute a specific automation trigger on an order. |
| `BASELINKER_RUN_PRODUCT_MACRO_TRIGGER` | Run Product Macro Trigger | Tool to execute a personal trigger for products automatic actions. Use when you need to manually run a custom event trigger for a specific product in BaseLinker inventory. |
| `BASELINKER_RUN_REQUEST_PARCEL_PICKUP` | Run Request Parcel Pickup | Tool to request a parcel pickup for previously created shipments. Use when you need to schedule a courier pickup for packages that have been created. The method sends a pickup request to the courier API if the courier supports it. Use getRequestParcelPickupFields first to check if the courier requires additional fields. |
| `BASELINKER_SET_INVENTORY_PURCHASE_ORDER_STATUS` | Set Inventory Purchase Order Status | Tool to change the status of a purchase order in BaseLinker inventory. Use when you need to update a purchase order's status (e.g., mark as sent, received, completed, or canceled). |
| `BASELINKER_SET_ORDER_FIELDS` | Set Order Fields | Tool to edit selected fields of a specific order in BaseLinker. Use when you need to update order details such as address data, notes, payment method, delivery information, or invoice details. Only provide the fields you want to change; other fields can be omitted. |
| `BASELINKER_SET_ORDER_PAYMENT` | Set Order Payment | Tool to add a payment to an order in BaseLinker. Use when recording a payment for an order. The payment amount replaces (not adds to) the current payment value; if it matches the order total, the order is marked as paid. |
| `BASELINKER_SET_ORDER_PRODUCT_FIELDS` | Set Order Product Fields | Tool to edit data of selected items in a specific BaseLinker order. Use when you need to update product fields like prices, quantities, SKU, or other item details. Only provide the fields you want to edit; other fields can be omitted. |
| `BASELINKER_SET_ORDER_RECEIPT` | Set Order Receipt | Tool to mark orders with a receipt already issued. Use after printing receipts retrieved from getNewReceipts to confirm receipt issuance. |
| `BASELINKER_SET_ORDER_RETURN_FIELDS` | Set Order Return Fields | Tool to edit selected fields of a specific order return. Use when updating return information such as buyer contact details, delivery address, or custom fields. Only the fields that need to be changed should be provided; other fields can be omitted. |
| `BASELINKER_SET_ORDER_RETURN_PRODUCT_FIELDS` | Set Order Return Product Fields | Tool to edit data of selected items (e.g., prices, quantities, attributes) of a specific order return product. Use when you need to update fields of a returned product in an order return. |
| `BASELINKER_SET_ORDER_RETURN_REFUND` | Set Order Return Refund | Tool to mark an order return as refunded in BaseLinker. Use when recording that a refund has been issued for a return. Note: This method doesn't issue an actual money refund - it only updates the refund status in BaseLinker. |
| `BASELINKER_SET_ORDER_RETURN_STATUS` | Set Order Return Status | Tool to change order return status in BaseLinker. Use when you need to update the status of a single order return. |
| `BASELINKER_SET_ORDER_RETURN_STATUSES` | Set Order Return Statuses | Tool to batch set order return statuses in BaseLinker. Use when you need to update the status of multiple order returns at once. |
| `BASELINKER_SET_ORDERS_MERGE` | Set Orders Merge | Tool to merge multiple orders into one, based on the selected merge mode. Use when you need to combine orders together with either technical merge or into main order mode. |
| `BASELINKER_SET_ORDER_STATUS` | Set Order Status | Tool to change the status of an existing order in BaseLinker. Use when you need to update an order's status to a different value. |
| `BASELINKER_SET_ORDER_STATUSES` | Set Order Statuses | Tool to batch update order statuses in BaseLinker. Use when you need to set the same status for multiple orders at once. |
| `BASELINKER_UPDATE_INVENTORY_PRODUCTS_STOCK` | Update Inventory Products Stock | Tool to update stocks of products and their variants in BaseLinker catalog. Use when you need to modify inventory levels for products across warehouses. Maximum 1000 products per request. |

## Supported Triggers

None listed.

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

The Baselinker MCP server is an implementation of the Model Context Protocol that connects your AI agents and assistants directly to Baselinker. Instead of manually wiring Baselinker 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 Baselinker 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 Baselinker 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 Baselinker 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 Baselinker 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 Baselinker session
    composio = Composio(api_key=os.getenv("COMPOSIO_API_KEY"))
    session = composio.create(
        user_id=os.getenv("USER_ID"),
        toolkits=["baselinker"]
    )
    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 Baselinker 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 Baselinker assistant agent with MCP tools
    agent = AssistantAgent(
        name="baselinker_assistant",
        description="An AI assistant that helps with Baselinker 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 Baselinker 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 Baselinker 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 Baselinker session
    composio = Composio(api_key=os.getenv("COMPOSIO_API_KEY"))
    session = composio.create(
        user_id=os.getenv("USER_ID"),
        toolkits=["baselinker"]
    )
    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 Baselinker assistant agent with MCP tools
        agent = AssistantAgent(
            name="baselinker_assistant",
            description="An AI assistant that helps with Baselinker 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 Baselinker 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 Baselinker 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 Baselinker, you can reuse the same structure for other MCP-enabled apps with minimal code changes.

## How to build Baselinker MCP Agent with another framework

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

## Related Toolkits

- [Addresszen](https://composio.dev/toolkits/addresszen) - Addresszen is a real-time address autocomplete and verification service. It helps capture accurate, deliverable addresses with instant suggestions and validation.
- [Asin data api](https://composio.dev/toolkits/asin_data_api) - Asin data api gives you detailed, real-time product data from Amazon, including price, rank, and reviews. Perfect for e-commerce pros and data-driven marketers who need instant marketplace insights.
- [Bestbuy](https://composio.dev/toolkits/bestbuy) - Best Buy is a leading retailer offering APIs for product, store, and recommendation data. Instantly access up-to-date retail insights for smarter shopping and decision-making.
- [Btcpay server](https://composio.dev/toolkits/btcpay_server) - BTCPay Server is a free, open-source, self-hosted Bitcoin payment processor. It lets merchants accept Bitcoin payments directly, cutting out middlemen and boosting privacy.
- [Cdr platform](https://composio.dev/toolkits/cdr_platform) - Cdr platform is an API for purchasing carbon dioxide removal services. It enables businesses to offset emissions by accessing verified carbon removal projects.
- [Cloudcart](https://composio.dev/toolkits/cloudcart) - CloudCart is an e-commerce platform for building and managing online stores. It helps businesses streamline product listings, orders, and customer engagement.
- [Countdown api](https://composio.dev/toolkits/countdown_api) - Countdown API gives you real-time, structured eBay product data, reviews, and seller feedback. Perfect for powering price monitoring, product research, or marketplace analytics workflows.
- [Dpd2](https://composio.dev/toolkits/dpd2) - Dpd2 is a robust email management platform for handling, sorting, and automating email workflows. Streamline your communications and boost productivity with advanced sorting, labeling, and response tools.
- [Finerworks](https://composio.dev/toolkits/finerworks) - FinerWorks is an online platform for fine art and photo printing services. Artists and photographers use it to order custom prints and manage print inventory efficiently.
- [Fingertip](https://composio.dev/toolkits/fingertip) - Fingertip is a business management platform for selling, booking, and customer engagement—all from a single link. It helps businesses streamline operations and connect with customers across social channels.
- [Fraudlabs pro](https://composio.dev/toolkits/fraudlabs_pro) - FraudLabs Pro is an online payment fraud detection service for e-commerce and merchants. It helps minimize chargebacks and revenue loss by detecting and preventing fraudulent transactions.
- [Gift up](https://composio.dev/toolkits/gift_up) - Gift Up! is a digital platform for selling, managing, and redeeming gift cards online. It streamlines promotions and gift card transactions for businesses and their customers.
- [Goody](https://composio.dev/toolkits/goody) - Goody is a gifting platform that lets users send gifts and physical products without handling logistics. It streamlines gifting by managing delivery, fulfillment, and recipient experience.
- [Gumroad](https://composio.dev/toolkits/gumroad) - Gumroad is a platform for selling digital products, physical goods, and memberships with a simple checkout and marketing tools. It streamlines creator payouts and helps you grow your audience effortlessly.
- [Instacart](https://composio.dev/toolkits/instacart) - Instacart is an online grocery delivery and pickup service platform. It lets you discover local retailers and create shoppable lists and recipes with ease.
- [Junglescout](https://composio.dev/toolkits/junglescout) - Junglescout is an Amazon product research and analytics platform for sellers. It delivers sales estimates, competitive insights, and optimization tools to boost your Amazon business.
- [Ko fi](https://composio.dev/toolkits/ko_fi) - Ko-fi is a platform that lets creators receive donations, memberships, and sales from fans. It helps creators monetize their work and grow their audience with minimal friction.
- [Lemon squeezy](https://composio.dev/toolkits/lemon_squeezy) - Lemon Squeezy is a payments and subscription platform built for software companies. It makes managing payments, taxes, and customer subscriptions effortless.
- [Loyverse](https://composio.dev/toolkits/loyverse) - Loyverse is a point-of-sale (POS) platform for small businesses, offering tools for sales, inventory, and customer loyalty. It helps streamline retail operations and boost customer engagement.
- [Memberstack](https://composio.dev/toolkits/memberstack) - Memberstack lets you add user authentication, payments, and member management to your website—no backend code required. Easily manage your site's members and subscriptions from a single platform.

## Frequently Asked Questions

### What are the differences in Tool Router MCP and Baselinker MCP?

With a standalone Baselinker MCP server, the agents and LLMs can only access a fixed set of Baselinker tools tied to that server. However, with the Composio Tool Router, agents can dynamically load tools from Baselinker 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 Baselinker tools.

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

Yes, absolutely. You can configure which Baselinker 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 Baselinker data and credentials are handled as safely as possible.

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