# Flexport MCP

> Flexport MCP connects your AI agent directly to global trade and supply chain systems. Manage freight movements, create purchase orders, and retrieve essential logistics documents like Bills of Lading through simple conversation. Get full visibility over ocean and air shipments without logging into multiple carrier portals.

## Overview
- **Category:** erp-operations
- **Price:** Free
- **Tags:** freight-forwarding, global-trade, shipment-tracking, purchase-order-management, logistics-documentation, supply-chain-visibility

## Description

Running a complex supply chain means juggling dozens of tabs: one for customs data, another for invoices, and three more just to track a shipment's location. This MCP lets your AI agent do all that work for you. Instead of clicking through forms or manually compiling reports, you simply ask your client to list shipments or pull billing details. You can automate the entire purchase order lifecycle, retrieving everything from commercial invoices to detailed packing lists in one conversation.

Whether you need a high-level overview of active cargo or specific customs documentation, this tool handles it all. Because Vinkius hosts and manages this MCP, your agent connects once to access global visibility across freight operations. It’s about getting answers instantly—a simple command pulls together data that used to take an analyst hours to gather.

## Tools

### create_purchase_order
Generates a new purchase order record in the system.

### download_document
Gets a secure, temporary link to download a specific logistics document file.

### get_document
Retrieves metadata about any required logistics document type.

### get_invoice
Fetches detailed information regarding a specific invoice number.

### get_purchase_order
Retrieves all available details for an existing purchase order.

### get_shipment
Gets comprehensive data and current status for a single shipment ID.

### list_commercial_invoices
Lists all commercial invoices associated with your account or shipments.

### list_documents
Provides a list of various types of logistics documents available for retrieval.

### list_invoices
Lists all freight-related invoices for financial review.

### list_purchase_orders
Generates a list of purchase orders across different statuses (pending, active, closed).

### list_shipment_invoices
Lists all invoices specifically tied to one or more freight shipments.

### list_shipments
Generates a list of all active and historical freight shipments.

## Prompt Examples

**Prompt:** 
```
List my 5 most recent freight shipments and their status.
```

**Response:** 
```
Fetching shipments... I found 5 recent shipments, including 'SHIP-123' (In Transit - Ocean) and 'SHIP-456' (Arrival - Air). Would you like the tracking details or associated documents for any of these?
```

**Prompt:** 
```
Show me all purchase orders pending for this quarter.
```

**Response:** 
```
Retrieving purchase orders... You have 8 active POs, with 3 marked as 'Pending Vendor Confirmation'. Would you like me to drill down into the line items for these pending orders?
```

**Prompt:** 
```
Get the download link for the Bill of Lading for shipment 'SHIP-789'.
```

**Response:** 
```
Generating document link... I've retrieved a secure temporary link for the Bill of Lading associated with SHIP-789. You can download the file here: https://api.flexport.com/documents/doc_abc/download.
```

## Capabilities

### View shipment status
List all current ocean and air shipments, retrieving detailed tracking information and transit statuses.

### Manage purchase orders
Create new purchase orders or retrieve full details on existing ones for lifecycle management.

### Access logistics documents
List and fetch critical shipping paperwork, including Bills of Lading, commercial invoices, and packing lists.

### Handle billing records
Retrieve specific freight or commercial invoices associated with accounts or individual shipments for financial reconciliation.

## Use Cases

### Need to confirm all paperwork for customs clearance?
An analyst needs to prepare an export filing. They prompt their agent: 'List commercial invoices and retrieve the packing list for shipment XYZ.' The agent uses list_commercial_invoices and get_document, compiling exactly what's needed into one message.

### Shipment delayed and I need to check PO status.
A coordinator notices a delay. They ask the agent to 'Get shipment details for ABC-123 and also show me the associated purchase order.' The agent uses get_shipment and get_purchase_order, giving them both the current location and the original contract terms.

### Time to reconcile Q3 freight spending.
A finance specialist needs a full picture of expenses. They prompt: 'List all invoices for this quarter.' The agent uses list_invoices, giving them access to every freight billing record so they can process payments immediately.

### Starting a new shipment requires documentation.
A trade manager starts a project and needs the initial paperwork. They ask the agent to 'Create a purchase order for raw materials' using create_purchase_order, which initiates the necessary paper trail.

## Benefits

- Stop tab-hopping. Instead of checking five different websites for tracking updates, ask your agent to list shipments; it gathers the real-time status across all modes (ocean or air) in one response.
- Faster financial closing. Don't hunt down billing records. You can use list_invoices and list_shipment_invoices to pull every relevant freight invoice for audit purposes instantly.
- PO accuracy on demand. If a shipment changes, you don't have to manually update the paperwork. Your agent lets you get_purchase_order details or even create_purchase_order records with simple prompts.
- Document control simplified. Needing that Bill of Lading? Instead of navigating document portals, ask your agent to list_documents and then use download_document for a secure link.
- Global oversight without the headache. You get a single view of your entire supply chain from one chat window, eliminating the need to switch between carrier-specific dashboards.

## How It Works

The bottom line is that you talk to your agent, and it pulls the correct supply chain information from Flexport directly into your chat interface.

1. Subscribe to this MCP on the Vinkius Marketplace and provide your Flexport API Key.
2. Connect your preferred agent client (Claude, Cursor, etc.) to the installed MCP.
3. Use natural language commands like 'What's the status of shipment X?' to get real-time data.

## Frequently Asked Questions

**How does the Flexport MCP handle different types of shipments?**
It handles both ocean and air cargo. You can use list_shipments to see all active freight movements, regardless of how they are traveling.

**Can I use the Flexport MCP to create a purchase order from scratch?**
Yes, you can use the create_purchase_order tool. This allows your agent to generate new PO records directly in the system for tracking and approval.

**What kind of invoices can I get using list_invoices?**
list_invoices handles freight-related billing. You can then use list_shipment_invoices to narrow down those payments specifically tied to a cargo shipment.

**Do I need special coding skills for the Flexport MCP?**
No, you don't. The entire point is natural conversation. You just tell your agent what you want—like 'Get all documents for PO X'—and it handles the underlying API calls.

**If a shipment changes status, how do I know?**
You use get_shipment to retrieve the most current metadata. This gives you real-time tracking data and transit statuses without having to check external carrier sites.