Skip to main content Announcing Tool Policies: AI agent permissions down to the field Read the announcement
Live 79 Actions

Flexport MCP Server
for AI Agents

Connect your AI agent to StackOne's Flexport MCP server and give it 79 MCP tools out of the box. Auth, tool execution, and security all managed.

Flexport logo
Flexport MCP Server
Built by StackOne StackOne
DrataGPLocalyzeFlipMindtoolsScreenloop

Coverage

79 Agent Actions

Agents can read and write in Flexport. Extend your agent's capabilities with custom actions.

Authentication

Agent Tool Authentication

Per-user OAuth in one call. Your Flexport MCP server gets session-scoped tokens with zero credentials stored on your infra.

Agent Auth →

Security

Agent Protection

Every Flexport tool response scanned for prompt injection in about 2.5 ms, with 0.94 F1 on tool-response attacks, all running on a CPU.

Prompt Injection Defense →

Performance

Max Agent Context. Min Cost.

Free up to 96% of your agent's context window to enhance reasoning and reduce cost, on every Flexport call.

Tools Discovery →

What is the Flexport MCP Server?

A Flexport MCP server lets AI agents read and write Flexport data through the Model Context Protocol, Anthropic's open standard for connecting LLMs to external tools. StackOne's Flexport MCP server ships with 79 pre-built actions, fully extensible via the Connector Builder, plus managed authentication, prompt injection defense, observability, and agent execution runtime. Connect it from MCP clients like Claude Desktop, Claude Code, Cursor, Goose, and VS Code, or from agent frameworks like OpenAI Agents SDK, LangChain, and Vercel AI SDK.

All Flexport MCP Tools

Every StackOne action for Flexport, ready for your agent. Read and write, scoped to exactly what you need.

A Company Entitys

  • Retrieve A Company Entity

    Retrieve a single company entity by its Flexport ID.

  • Update A Company Entity

    Update an existing company entity by its Flexport ID.

A Documents

  • Create A Document

    Create a new document in Flexport (requires file_name, mime_type, document_type, document, shipment_id).

  • Retrieve A Document

    Retrieve a single document by its Flexport ID.

  • Download A Document

    Download the file contents of a Flexport document, returned base64-encoded.

A Products

  • Create A Product

    Create a new product in Flexport (requires name, sku).

  • Update A Product

    Update an existing product by its Flexport ID.

And Return A Purchase Orders

  • Create And Return A Purchase Order

    Create a new purchase order in Flexport (requires name, parties, line_items).

  • Update And Return A Purchase Order

    Update an existing purchase order by its Flexport ID.

Other (70)

  • Create And Return A Booking

    Create a new booking in Flexport (requires name, shipper_entity_ref, consignee_entity_ref, origin_address_ref, destination_address_ref, cargo_ready_date, wants_export_customs_service, cargo).

  • Create A New Booking Amendment

    Create an amendment to an existing booking (requires booking_id).

  • Create A Booking Line Item

    Create a new booking line item in Flexport (requires purchase_order_line_item_id, booking_id, units).

  • Create A New Company Object

    Create a new network company in Flexport (requires name).

  • Create And Return A New Company Entity

    Create a new company entity in Flexport (requires name, mailing_address).

  • Create A New Contact Object

    Create a new network contact in Flexport (requires name, email, phone_number).

  • Create Or Update An ISF Worksheet

    Create or update an ISF (Importer Security Filing) worksheet in Flexport (requires header, bill_numbers, reference_identifiers, entities).

  • Create A Customs Milestone

    Record a customs milestone on a shipment (requires the customs public API role).

  • Create Or Update A Customs Order

    Create or update a customs order (advance shipping notice) in Flexport (requires name, freight_details).

  • Create And Return A New Location

    Create a new network location in Flexport (requires name, company_id, address).

  • Create Shareable URLs For Shipments

    Create shareable status-tracking URLs for one or more shipments (requires special permission from Flexport).

  • List All Bookings

    List bookings in your Flexport account, with filters, sorting and page-based pagination.

  • Retrieve A Booking

    Retrieve a single booking by its Flexport ID.

  • List All Booking Line Items

    List booking line items in your Flexport account, with filters, sorting and page-based pagination.

  • List Company Objects

    List network companies in your Flexport account, with filters, sorting and page-based pagination.

  • Retrieve A Company

    Retrieve a single network company by its Flexport ID.

  • Retrieve Your Company

    Retrieve your own Flexport company, the organization the connected credentials belong to.

  • List Of Company Entity Objects

    List company entities in your Flexport account, with filters, sorting and page-based pagination.

  • Retrieve A Commercial Invoice

    Retrieve a commercial invoice by its invoice number.

  • List Contact Objects

    List network contacts in your Flexport account, with filters, sorting and page-based pagination.

  • Retrieve A Contact

    Retrieve a single network contact by its Flexport ID.

  • Retrieve A Container Load Result

    Retrieve a container load result (how packages and line items were loaded into a container) by its Flexport ID.

  • List All Containers

    List ocean shipment containers in your Flexport account, with filters and page-based pagination.

  • Retrieve A Container

    Retrieve a single ocean shipment container by its Flexport ID.

  • List All Container Legs

    List ocean container legs in your Flexport account, with filters and page-based pagination.

  • Retrieve A Container Leg On An Ocean Shipment

    Retrieve a single ocean container leg by its Flexport ID.

  • List Customs Entry Objects

    List customs entries in your Flexport account, with filters, sorting and page-based pagination.

  • Retrieve A Customs Entry

    Retrieve a single customs entry by its Flexport ID.

  • Retrieve A Customs Order By Fid

    Retrieve a single customs order by its Flexport ID.

  • List Document Objects

    List documents in your Flexport account, with filters, sorting and page-based pagination.

  • List All Webhook Events

    List webhook events delivered to any webhook registered by this client, with filters and page-based pagination.

  • Retrieve A Single Webhook Event

    Retrieve a single event by its Flexport ID.

  • List All Invoices

    List freight invoices in your Flexport account, with filters, sorting and page-based pagination.

  • Retrieve An Invoice

    Retrieve a single freight invoice by its Flexport ID.

  • List Of Location Objects

    List network locations in your Flexport account, with filters, sorting and page-based pagination.

  • Retrieve A Location By Id

    Retrieve a single network location by its Flexport ID.

  • Get Purchase Order

    Get a purchase order by its numeric purchase_order_id, provided directly or returned by browse_purchase_orders. Returns header details, booking progress, and up to 20 lines with complete booking references. Only the current page of lines is returned. When has_next_page is true, more lines are available, and the end_cursor value is passed as lines_after with the same purchase_order_id to retrieve the next page. Each line is identified by purchase_order_id together with item_key. Quantities are decimal strings. Results reflect the current order state and can change between pages.

  • Search Instant Prices

    Search available instant-price freight rates for Ocean FCL, Ocean LCL, or Air shipments, given origin, destination, cargo-ready date, incoterm, and cargo details. Returns rate options with carrier, pricing, transit time, charge breakdown, available add-on services, detention options, and CO2e emissions. Doesn't support dangerous goods or FTL/road-only shipments. Rate types include SPOT, FAK, INDEX, and FIXED. FIXED and INDEX results with allocation include nac_allocation with weekly TEU availability. Services marked force_included are included and cannot be removed; other add-on services are optional. Detention tiers show total free days, while price evaluation and snapshot booking take additional days beyond detention_base_free_days. A selected result can be evaluated with rates_evaluate_total_price_from_instant_price_search. Snapshot booking requires that evaluation's price_confirmation_token and matching snapshot IDs, service flags, and additional detention days. If empty_reason is set, no instant-price rates are available; rates_book_without_rate and rates_request_rate provide alternative booking and rate-request options.

  • Get Quote Request Details

    Get a quote request's submission details and every priced quote option it received, including carrier, transit estimates, costs, total price, expiration, and a link to it in the Flexport web app.

  • Get Quote Details

    Get one quote option's complete transit, route, and itemized rate detail, including charges, subtotals, total price, expiration, and a link to it in the Flexport web app.

  • Search Addresses

    Search addresses already onboarded in your Flexport network. Query terms are matched as ANDed per-word prefixes across address name, street, city, state, and primary company legal name. Returns address_fid values for use in rates and booking tools, such as rates_search_instant_price and rates_book_without_rate, and numeric location_id values for the destination_location_ids filter in browse_purchase_orders.

  • Search Google Addresses

    Search Google Places for cities, postal codes, and general place matches not yet onboarded in your Flexport network. Returns address identifiers for use in other tools.

  • Search Company Entities

    Search active Flexport company entities in your network by legal name. Matches on whole normalized legal-name similarity, not prefix search. Does not search DBA names or tax IDs. Corporate suffixes such as Inc, LLC, and Ltd are optional. Returns company_entity_id values for use in other tools.

  • Search Ports

    Search Flexport's sea and air ports by name, city, UN/LOCODE, IATA code, ICAO code, or customs port code. Returns port identifiers for use in other tools. Exact codes identify a single port; name and city searches use fuzzy matching and can return multiple candidates. Results have no match score, and their order does not indicate the best match. A true has_more value indicates an incomplete result list.

  • Search HS Codes

    Search Flexport's six-digit international HS-code catalog by product description or code. This tool is intended as a helper for `rates_book_without_rate` when the shipper does not know the HS code for a booking. The shipper confirms the classification from the returned candidates, and the selected `hs_code_dbid` and the goods description are then passed to `rates_book_without_rate`. The tool is not designed for standalone tariff classification and does not return ten-digit US HTS codes.

  • List Active Company Users

    List or search active users in your company, including yourself. Useful for looking up a quote request submitter by name or email, or for browsing all active users to pick one from.

  • List Of Ports

    List ports from Flexport's port directory, with filters and page-based pagination.

  • List All Products For A Client

    List products in your Flexport account, with filters, sorting and page-based pagination.

  • Retrieve A Single Product

    Retrieve a single product by its Flexport ID.

  • List All Purchase Orders

    List purchase orders in your Flexport account, with filters, sorting and page-based pagination.

  • Retrieve A Purchase Order

    Retrieve a single purchase order by its Flexport ID.

  • List All Purchase Order Line Items

    List purchase order line items in your Flexport account, with filters, sorting and page-based pagination.

  • Retrieve A Purchase Order Line Item

    Retrieve a single purchase order line item by its Flexport ID.

  • List All Shipments

    List shipments in your Flexport account, with filters, sorting and page-based pagination.

  • Retrieve A Shipment

    Retrieve a single shipment by its Flexport ID.

  • List All Shipment Route Legs

    List shipment legs in your Flexport account, with filters, sorting and page-based pagination.

  • Retrieve A Shipment Route Leg

    Retrieve a single shipment leg by its Flexport ID.

  • Update An Existing Company

    Update an existing network company by its Flexport ID.

  • Update An Existing Contact

    Update an existing network contact by its Flexport ID.

  • Update A Network Location

    Update an existing network location by its Flexport ID.

  • Update An Existing Shipment

    Update an existing shipment by its Flexport ID.

  • Retrieves The Details Of A Single Booking Line Item

    Retrieve a single booking line item by its Flexport ID.

  • Browse Shipments

    Browse Flexport-managed shipments matching status, mode, date range, task, or demurrage/detention filters, paginated. Returns up to 20 tenant-scoped shipments per page with flex_id, name, mode, status, created_at, priority, is_completed, route, customs_status, and cargo_ready_date by default. Route stops include the current port and destination arrival dates, with actual, scheduled, or estimated sources. The fields parameter requests additional details, including containers, customs, exceptions, tasks, tags, and original_eta. Only default and requested details are fetched. Lifecycle milestones are available through track_shipment.

  • Track Shipment

    Search for a Flexport shipment by FLEX-ID, name, or client-assigned tag. Returns up to 20 matching shipments with full tracking detail: route stops, containers with last-free-day info, customs declarations with hold status, exceptions, work item tasks, and metadata tags.

  • Browse Purchase Orders

    Browse purchase orders visible to your company, returning paginated summaries and booking progress. Supports exact purchase-order name searches. Different filters are combined with AND. Returns up to 50 orders per page, defaulting to 10. When has_next_page is true, more pages are available. The end_cursor value is passed as after, with filters and ordering unchanged, to retrieve the next page. Buyer and seller filters take company_entity_id values from network_search_company_entities. Purchase-order names are not unique, so orders are distinguished by purchase_order_id.

  • Evaluate Total Price

    Get the full, live-evaluated price breakdown — including any selected add-on services and detention options — for a rate selected from rates_search_instant_price results. Returns the total price, itemized charges by category, and a short-lived confirmation token used to complete the booking with rates_instant_book. An expired token requires a new evaluation.

  • Book An Instant Price

    Instantly create a real, binding booking, either against a prior rates_search_instant_price result or against a known client rate identifier. The booking cannot be undone through this interface. Exactly one booking mode is required, and both modes require a price_confirmation_token. Snapshot mode reuses cargo, cargo-ready date, route, and incoterm from the search. It requires the price_confirmation_token from rates_evaluate_total_price_from_instant_price_search for the same snapshot IDs, add-on service flags, and additional detention days. A missing, expired, or mismatched token returns REQUIRES_PRICE_CONFIRMATION without creating a booking. When nac_allocation is present, a feasible sailing week is required in ssat_allocation_preference. Client-rate mode requires a directly supplied client_rate_id, cargo_ready_date, and cargo_details. It validates the rate's active, expiry, and effective status and transportation mode. Validation failures return a structured error_code without creating a booking. A first call without price_confirmation_token is a preview that never creates a booking. If the rate and cargo details are valid, the preview returns REQUIRES_PRICE_CONFIRMATION with a token in error_message. Repeating the call with that token unchanged creates the booking. A missing, expired, or mismatched token returns REQUIRES_PRICE_CONFIRMATION again.

  • Book Without A Rate

    Create and submit an unrated supplier booking for consignee acceptance — for suppliers or shippers booking without a rate. Flexport prepares the quote for the consignee after submission. Dangerous-goods cargo, document uploads, and automatic fulfillment inbound creation are unsupported. Addresses must be onboarded in Flexport and resolved with network_search_addresses; Google-address search results are unsupported. An initial call without booking_confirmation_token validates the complete booking and returns a fingerprint for confirmation. Submission requires the same booking details and the unchanged token after confirmation. Any booking-detail change requires a new preflight.

  • Request A Rate

    Request a new rate quote for a lane when rates_search_instant_price has no acceptable option — for example, a lane that needs a fixed (NAC) rate where only spot pricing is available. An initial call without request_confirmation_token validates the request and returns CONFIRMATION_REQUIRED with a confirmation token instead of submitting. Submission requires the same request details and the unchanged, short-lived token.

  • Browse Quote Requests

    Find or browse your organization's rate quote requests by name, FLEX-ID, status, freight mode, origin/destination, or submitter. Returns each request's status, route, cargo, submitter, and a link to it in the Flexport web app.

Set Up Your Flexport MCP Server in Minutes

One endpoint. Any framework. Your agent is talking to Flexport in under 10 lines of code.

Agent Frameworks

Claude Desktop
{
  "mcpServers": {
    "stackone": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote@latest",
        "https://api.stackone.com/mcp?x-account-id=<account_id>",
        "--header",
        "Authorization: Basic <YOUR_BASE64_TOKEN>"
      ]
    }
  }
}

FAQ

Flexport MCP Server FAQ

Ready to put your agents to work?