# Connect Logistivo to your AI assistant

Logistivo is a logistics SaaS for freight forwarding and transportation management
(Turkey and EU lanes). This page describes how to connect Logistivo to an AI
assistant using the Model Context Protocol (MCP).

## MCP server

- URL: https://logistivo.com/api/agent/mcp
- Transport: streamable HTTP, single POST endpoint, stateless
- Authentication: none for the public tools below; OAuth 2.1 (sign in to Logistivo
  in your browser) for your own account's commands — see "Connect your account"
- Protocol versions: 2026-07-28 (also accepts 2025-11-25, 2025-06-18, 2025-03-26)

## How to add it

Claude (Free, Pro, Max, Team, Enterprise):
1. Open Settings, then Connectors.
2. Choose "Add custom connector".
3. Paste the URL above and confirm, then press "Connect" to sign in to Logistivo.
(On Team and Enterprise plans only an organization Owner can add connectors.)

ChatGPT (Pro, Plus, Business, Enterprise, Edu — web only):
1. Enable developer mode in ChatGPT settings (Apps & Connectors, Advanced).
2. Create a new app / connector and paste the URL above.
3. Choose "OAuth" as the authentication and save. ChatGPT opens a Logistivo page:
   sign in, choose what the assistant may do, and press "Allow".
Choose "No authentication" instead if you only want the public tools.

## Connect your account (OAuth)

With OAuth the assistant works with your own Logistivo account: loads, demands,
bids, documents, fleet, invoices and the rest of the command catalog (the same
commands as the `lg` CLI). How it works:
- You sign in on logistivo.com in your browser. Your password and one-time codes
  never reach the assistant.
- You choose "read only" or "read and act", and — if you manage your team — the
  employee or manager access level.
- The assistant receives a connection key that works only on this MCP endpoint and
  renews itself. It is listed under Settings > Integration keys > AI and CLI
  connections, where you (or your team manager) can remove it at any time.
- Irreversible or money-related commands ask for your confirmation in the chat
  every time; payments, legal consent and account closure stay in the browser.
Discovery: https://logistivo.com/.well-known/oauth-protected-resource and
https://logistivo.com/.well-known/oauth-authorization-server (PKCE S256, dynamic
client registration, client ID metadata documents, device authorization for
clients without a browser, and token revocation).

Gemini:
- Gemini CLI or Code Assist: add the URL to your MCP server configuration.
- Gemini Enterprise: an administrator adds it under Connected apps (StreamableHTTP).

## From a terminal: approve a code

Tools that run in a terminal cannot receive a browser redirect. They connect with
an approval code instead (OAuth 2.0 device authorization, RFC 8628):
1. Run `lg login` (the Logistivo CLI, npm package @lgstv/lg, version 0.11 or later)
   or start the sign-in of a client that supports device authorization.
2. The terminal shows a short code such as BCDF-GHJK and the address
   https://logistivo.com/connect.
3. Open that address in your browser, sign in to Logistivo, check that the code on
   the page is the one in your terminal, choose the access, and press "Approve".
4. The terminal continues on its own.
Nothing secret is typed into the terminal: no password, no key, no one-time code.
The lg CLI stays signed in after you close the terminal and renews its session by
itself; `lg logout` ends it, and so does removing the connection under Settings >
Integration keys > AI and CLI connections. Approve only a code you started yourself.

## Tools

- logistivo_kayit_hazirla — prepares a Logistivo signup and freight request from a
  plain-language shipment brief, and returns a one-time link for the user. It does
  NOT create an account: the account, the consent and the email verification all
  happen in the user's browser.
- logistivo_kayit_durumu — returns whether that link was opened or completed.
  Returns no personal data.
- logistivo_gtip_sorgula — searches Turkish customs tariff (GTIP/HS) codes by
  product name. No account needed.

## Rules for assistants

- Assistants never receive, generate or relay Logistivo credentials. Passwords and
  one-time codes are entered by the human in the browser only.
- An assistant may show the user an approval code and the https://logistivo.com/connect address, but
  it never approves the code itself and never asks for the user's password.
- Before sending contact details, tell the user that their name, phone and company
  will be passed to Logistivo to pre-fill the form.
- Accepting a carrier bid forms a freight contract and is never done from chat.

## Without MCP — assistants that can only read web pages

If you are an assistant with no MCP connection and no way to send a request body,
you can still help. Build this URL and give it to the user as a plain clickable
link. Do not try to open it yourself.

    https://logistivo.com/tr/ai-kayit?brief=URL_ENCODED_SHIPMENT_BRIEF

Use /en/ai-kayit for English. The brief is the user's shipment in plain language:
origin, destination, quantity, weight, cargo type, dates. Keep it under 2000
characters. Put ONLY shipment details in the URL — never a name, phone number,
company name, email address or password.

The link opens a page where the user reviews the pre-filled form, accepts the
terms and verifies their email. The account is created there, in their browser.

If you CAN send request bodies (server-side agent, script, backend integration),
POST the brief to https://logistivo.com/api/agent/v1/handoff instead and hand the
returned link to the user. See https://logistivo.com/llms.txt ("Agent actions").

## Support

Questions or problems with the AI assistant connection (ChatGPT, Claude, Gemini, lg):
support@logistivo.com. To disconnect an assistant, use Settings > Integration keys >
AI and CLI connections — no assistant is needed for that.