# MCP

MCP (Model Context Protocol) is an open standard that lets AI assistants connect directly to external tools and data sources. Flowlity hosts an MCP server so you can query your supply chain data, create promotions, manage views, and more — all from a chat interface.

Think of it as a bridge: the AI becomes the interface, Flowlity stays the engine.

<figure><img src="https://715663841-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5UVXJAW6N7IltcSDRKLH%2Fuploads%2Fgit-blob-3dda6d3938c5c727ee7cae0af23b47c9f4ee6bf0%2Fmcp-claude-ask-flowlity.png?alt=media" alt="Claude interface showing the Ask Flowlity connector"><figcaption><p>Claude with the Flowlity MCP connector — ask anything about your supply chain data.</p></figcaption></figure>

{% hint style="info" %}
MCP is supported by **Claude**, **ChatGPT**, and **GitHub Copilot**. More clients are being added as the protocol gains adoption.
{% endhint %}

{% embed url="<https://app.arcade.software/share/McpxHRqhSSnSKnhrxSyV>" %}
See the Flowlity MCP server in action
{% endembed %}

## What you can do

### Read your data

Ask questions in plain language and get real answers from your Flowlity account:

* **Stock levels** — "How much stock do I have for site Paris?"
* **Forecast accuracy** — "Which products have the worst forecast accuracy? Show me the top 5."
* **Product details** — "Tell me about product X — what's happening with stock and demand?"
* **KPIs and trends** — "Show me the KPI trends for the last 6 months."
* **Orders and alerts** — "Are there any order alerts on site Lyon?"
* **Capacity** — "List capacity units and their alerts."

### Take action

Go beyond read-only — the MCP server also lets you act on your data:

* **Create views** — Ask the AI to set up a Demand or Planning view with relevant columns and filters, without opening the app.
* **Create promotions** — "Create a promotion for all Class A products, increase forecast by 30%." The AI finds the products and creates the event directly.
* **Override forecasts** — Adjust your forecast values through conversation.
* **Simulate demand** — Model "what if" scenarios and see the projected stock impact.
* **Import data** — Upload CSV files and trigger data pipelines (Flowlity Lite).
* **Apply recommended orders** — Accept Flowlity's recommended order quantities.

### Cross-tool power

The biggest advantage over an embedded AI sidebar: in the same conversation you can talk to **Flowlity + your CRM + your ERP + spreadsheets** simultaneously.

For example: pull CRM opportunities, match them against Flowlity forecasts, and surface discrepancies — all in one chat.

## Setup

### Prerequisites

* A valid **Flowlity account**
* Access to a supported AI assistant (Claude or ChatGPT)

### Connect via Claude (recommended)

1. Go to [claude.ai](https://claude.ai) and open **Settings**.
2. Navigate to **Connectors**, then click **Add custom connector**.
3. Fill in the fields:
   * **Name**: `Flowlity`
   * **Server URL**: provided by your *Flowlity Customer Success Manager*
   * **Client ID**: provided by your *Flowlity Customer Success Manager*
4. Save the configuration.
5. You will be redirected to authenticate — **sign in with the same email as your Flowlity account**.
6. Verify: start a new conversation and ask *"List all my Flowlity sites"*. If your sites appear, the connection is working.

### Connect via ChatGPT

1. Go to [chatgpt.com](https://chatgpt.com) and open **Settings**.
2. Navigate to **Advanced Settings** and enable **Developer Mode**.
3. Go to **Apps** and create a new app.
4. Enter the **Server URL** provided by your Flowlity *Customer Success Manager*. Authentication is auto-discovered — no client ID needed.
5. Authorize with your Flowlity account.
6. Verify: ask *"List all my Flowlity sites"*.

### Connect via Claude Code (CLI)

Add the following to your Claude Code MCP configuration:

```json
{
  "mcpServers": {
    "flowlity": {
      "type": "url",
      "url": "<server-url-provided-by-flowlity>/mcp/"
    }
  }
}
```

You will be prompted to authenticate on first use.

## Available tools

The MCP server exposes the following tools, organized by domain:

| Domain             | Tools                                                                                 | Description                                                             |
| ------------------ | ------------------------------------------------------------------------------------- | ----------------------------------------------------------------------- |
| **Sites**          | `list_sites`, `get_site_config`                                                       | Browse your sites and their configuration                               |
| **Products**       | `list_products`, `get_product_detail`, `get_product_planning`                         | Search products, view details, and access planning time series          |
| **Orders**         | `list_orders`, `get_order_alerts`                                                     | Review order lines and alerts                                           |
| **Demand**         | `get_demand_summary`, `get_forecast_accuracy`, `override_forecast`, `simulate_demand` | Analyze demand, check accuracy, override forecasts, and run simulations |
| **Inventory**      | `get_stock_levels`, `get_stock_coverage`                                              | Check stock levels and coverage metrics                                 |
| **Capacity**       | `list_capacity_units`, `get_capacity_alerts`                                          | Monitor capacity units and alerts                                       |
| **Tags**           | `list_tags`                                                                           | List product tags and categories                                        |
| **Promotions**     | `list_promotions`, `get_promotion_detail`, `create_promotion`                         | Browse, inspect, and create forecast events                             |
| **KPIs**           | `get_site_kpis`, `get_kpi_trends`, `list_product_alerts`                              | Dashboard KPIs, trend analysis, and product alerts                      |
| **Views**          | `list_views`, `create_view`, `update_view`, `delete_view`                             | Manage saved views for Demand and Planning modules                      |
| **Data**           | `upload_import_file`, `trigger_import_dag`, `get_import_status`, `export_data`        | Import CSV data, trigger pipelines, and export datasets (Flowlity Lite) |
| **Orders (write)** | `apply_recommended_orders`                                                            | Accept Flowlity's recommended order quantities                          |

{% hint style="info" %}
You do not need to memorize tool names. Simply describe what you need in natural language and the AI assistant will select the right tool automatically.
{% endhint %}

## Security and privacy

* **Same credentials, same permissions** — The MCP server authenticates with your Flowlity account. You only see the sites and data you already have access to.
* **OAuth 2.0** — Authentication uses industry-standard OAuth 2.0 with bearer tokens.
* **No data exposure** — All database connections run through private networks. No public IP is exposed.
* **Deterministic tool calls** — When the AI calls a tool, it executes a real query against the database. The data returned is always real and accurate — only the AI's wording and interpretation may vary.

## Example prompts

Here are some prompts to get started:

| Goal                  | Example prompt                                                                                      |
| --------------------- | --------------------------------------------------------------------------------------------------- |
| Overview              | *"Give me a summary of my KPIs for site Paris"*                                                     |
| Investigate a product | *"What's the stock situation for product ABC-123?"*                                                 |
| Find problems         | *"Which products have stock coverage below 7 days?"*                                                |
| Forecast accuracy     | *"Show me the 5 products with the worst MAPE"*                                                      |
| Create a promotion    | *"Create a 20% forecast increase for all products tagged 'Summer' from July 1 to August 31"*        |
| Simulate impact       | *"What happens if demand increases by 15% next month for site Lyon?"*                               |
| Set up a view         | *"Create a Planning view with stock value, demand 30d, and MAPE columns, filtered to MTS products"* |
| Export data           | *"Export the last 3 months of demand data for site Berlin as CSV"*                                  |

## FAQ

<details>

<summary>Does the AI have access to all my company data?</summary>

No. The MCP server respects the same user permissions as the Flowlity app. You only see the sites and products assigned to your account.

</details>

<details>

<summary>Can the AI hallucinate data?</summary>

Tool calls are deterministic — they execute real database queries and return actual data. The AI cannot invent numbers. However, the AI's interpretation or summary of the data may occasionally be imprecise. Always verify critical decisions against the Flowlity app.

</details>

<details>

<summary>Which AI assistants are supported?</summary>

Claude (Anthropic), ChatGPT (OpenAI), and GitHub Copilot currently support MCP. More clients are expected as the standard gains adoption.

</details>

<details>

<summary>Is there a cost to use MCP?</summary>

Using the MCP server requires a Flowlity account. AI usage costs (tokens, subscriptions) depend on the AI provider you choose (e.g. Claude Pro, ChatGPT Plus).

</details>

<details>

<summary>Can I use MCP with other tools in the same conversation?</summary>

Yes — this is one of the key advantages. In a single conversation, you can connect Flowlity alongside your CRM, ERP, spreadsheets, or any other MCP-compatible tool.

</details>
