Skip to main content

AI Assistant Integration

AI Assistant Integration is where you create a short-lived access token so a trusted MCP client on your computer (for example Claude Desktop, Claude Code, Cursor or Gemini) can use your FlowPOS business data. After you generate a token, the same page shows the server URL, configuration snippets, prompt shortcuts and context documents the assistant can use.

Settings → AI Assistant. Open AI Assistant Integration

From token to assistant: generate access token, copy URL and token, configure MCP client, ask or use a prompt, regenerate when expired

AI Assistant Integration Get started card with Generate access token

ModuleSettings
Who uses itAnyone who can open Settings → AI Assistant in the menu (broad role list; see Before you begin)
What it changesIssues a temporary credential for an MCP client. It does not change stock, sales or accounting by itself. Asking the assistant to make a change later still follows your FlowPOS role and permissions.

Purpose and when to use it​

Use this page when you want an AI assistant that runs on your device to read sales, inventory and reports (and, when allowed, run supported actions) through FlowPOS’s MCP connection.

Typical situations:

  • You use Claude Desktop, Claude Code, Cursor or a Gemini setup that asks for an MCP server URL and a bearer token.
  • You need prompt shortcuts such as a daily briefing or low-stock check.
  • You need to regenerate a token after it expires (tokens last about 24 hours by default).

Use another path instead when:

SituationUse instead
Connect Claude or ChatGPT in the cloud with sign-in (no token to copy)Connect AI apps
You need a long-lived key that does not expire every dayV1 API key on this feature (/settings/mcp/v1)
You are integrating as a developer against the public MCP contractFlowPOS MCP server and API

The five-step path above is the everyday loop: create a short-lived token, put it in your local MCP client, ask questions or paste a prompt shortcut, then return here when the token expires (about 24 hours by default).

Before you begin​

  • Sign in to FlowPOS. Token creation uses your current session.
  • You must belong to at least one active business. If you do not, generation fails with a message to contact your administrator.
  • Settings → AI Assistant must appear in your menu. Menu visibility is controlled by role and the Settings module — not by a separate “MCP permission” checkbox on this page.
  • For local clients, install and open the MCP client you will configure (Claude Desktop, Claude Code, Cursor, or your Gemini tooling).
  • If a business requires two-step verification, that business is included in the token only when your current sign-in includes the authenticator factor. Otherwise it may be omitted from the authorized list.

Open this Help Center article from the book control in the authenticated header (same place on every screen). When you are on AI Assistant Integration, that control opens this page.

Understanding the screen​

  • Title: AI Assistant Integration
  • Description: create a short-lived access token for a trusted MCP client; supported clients are described in the help guide.
  • Link: Need a long-lived API key? Generate a V1 API key → opens /settings/mcp/v1.

Connected apps (when available)​

If connecting AI apps with sign-in is enabled for your environment, a Connected apps card can appear at the top. It lists cloud apps you approved, whether they can only read or also make changes, and Disconnect. If that card is missing, OAuth connect is not available for this account or environment — use a token (this page) or see Connect AI apps.

Before you generate a token — Get started​

Get started card explaining MCP and Generate access token

ElementMeaning
Get startedIntroduces MCP: assistants can read sales, inventory and reports from FlowPOS
Helper textExplains that the token is short-lived and that you can create a new one anytime
Generate access tokenCreates the token for your current session

After you generate a token​

Token Details, MCP server URL and Access token cards

SectionWhat you see
Token DetailsCountdown (Time left), Authorized Businesses, Role (Merchant), Permissions (scopes)
MCP server URLEndpoint your client connects to, plus Copy URL
Access tokenMasked secret with Show Token, Copy Token, Generate New Token
Configuration SnippetsTabs for Claude Desktop, Claude Code, Gemini and Cursor; Copy snippet
Available PromptsNine shortcut phrases (English and Spanish)
Available ResourcesThree context document links the AI can read
SecurityReminder not to share the token and to regenerate when it expires

When the token expires, a Token Expired banner appears and you generate a new one. The countdown turns more urgent when less than about two hours remain.

Field-by-field reference​

This page has no free-text form fields for the short-lived token. Values come from your session after generation.

Field / controlPurposeRequired?NotesExample
Generate access tokenCreates the short-lived token—Uses your signed-in session—
Time leftShows remaining lifetimeRead-onlyDefault lifetime is 24 hours23h 59m
Authorized BusinessesBusinesses included in the tokenRead-onlyActive business is marked Active; Show N more expands the list; copy control copies the business identifierThe Factory Active
RoleIdentity embedded in the tokenRead-onlyShown as MerchantMerchant
PermissionsAPI scopes on the tokenRead-onlyShown as raw scope namespos:read, pos:write, reports:read, psa:read, pos:intents
MCP server URLClient connection endpointRead-onlyBuilt from the app’s API base URL + /mcphttps://api.example.com/mcp
Access tokenSecret for the clientRead-onlyHidden until Show Token; Copy Token copies even while hidden(masked)
Generate New TokenReplaces the current token—Hides the previous value again—

Permissions (scopes) shown on the token​

ScopePlain meaning
pos:readRead products, inventory, sales and orders
pos:writeSupported write actions (for example create a draft order), still limited by your role
reports:readRead sales, labor and cost reports
psa:readRead implementation projects
pos:intentsMulti-step actions on your behalf when the client supports them

The short-lived token from this page includes the full set above. Cloud Connect AI apps grants can be read-only unless you turn on Allow changes — that is a different flow.

Step-by-step instructions​

How to generate an access token​

Objective. Create a short-lived credential for a local MCP client.

Prerequisites. Signed in; at least one active business membership.

  1. Open Settings → AI Assistant.
  2. Under Get started, select Generate access token.
  3. Wait until Token Details appears with a countdown.
  4. Review Authorized Businesses, Role and Permissions.

Expected result. Token Details, server URL, access token, snippets, prompts and resources are visible. The access token starts hidden.

Possible errors

MessageWhat to do
Your session has expired…Sign out, sign back in, try again
You do not have any active business memberships…Ask an administrator to restore your business access
Could not reach the server…Check your network and try again

How to copy the MCP server URL and token​

  1. In MCP server URL, select Copy URL.
  2. In Access token, optionally select Show Token, then Copy Token (copy works while the token is still hidden).
  3. Paste only into the MCP client configuration on your computer.

Warning. Anyone with the token can use your business data within the token’s limits until it expires. Do not paste it into chat, email or a public repository.

How to configure a client with a snippet​

  1. Open Configuration Snippets.
  2. Choose a tab: Claude Desktop, Claude Code, Gemini or Cursor.
  3. Select Copy snippet.
  4. Paste into that client’s config file or terminal as the tab describes.
  5. Restart or reload the client if it requires it, then ask a simple question (for example paste Daily briefing).
ClientWhat the snippet is
Claude DesktopJSON mcpServers entry using npx and mcp-remote with an Authorization header
Claude CodeOne terminal command (claude mcp add …)
CursorJSON mcpServers entry with url and Authorization header
GeminiPython example via LangChain MCP adapters (you still supply your Google API key)

How to use Available Prompts​

Available Prompts with Today, Week and month, Inventory, and Sales groups

Objective. Run a ready-made shortcut in the assistant.

  1. Scroll to Available Prompts (shown after a token exists).
  2. Open a shortcut for details if you want optional arguments explained.
  3. Select an EN or ES phrase to copy it.
  4. Paste the phrase into your connected AI assistant.
GroupShortcutExample phrase (EN)
TodayDaily briefingDaily briefing
TodayEnd-of-day reportClose out today
Week and monthWeekly reviewHow did last week go?
Week and monthMonthly performanceMonthly performance
InventoryLow stockWhat's running low?
InventoryRestock planWhat should I order?
Sales and accountTop sellersTop sellers this month
Sales and accountSales by locationWhich store did best?
Sales and accountSwitch businessSwitch to DIPS

All prompt arguments are optional. The assistant uses your active business and defaults when you omit them.

How to copy Available Resources​

Available Resources with Quick-start, Prompt guide and Guatemala context

These are context documents the AI can read. Copy the link if your client asks for a resource URI:

TitleLink
Quick-start guideflowpos://docs/quick-start
Prompt guideflowpos://docs/prompt-guide
Guatemala contextflowpos://docs/currency-guide

How to regenerate after expiry or disconnect​

  1. Return to Settings → AI Assistant.
  2. If you see Token Expired, or your assistant disconnected, select Generate New Token (or Generate access token from Get started after a full page reload).
  3. Update the client with the new token (or copy a fresh snippet).

Generating a new token does not revoke every copy of the old one by a special “kill switch” on this screen — the old token simply stops working when its lifetime ends. Treat leaked tokens as urgent: generate a new one and remove the old value from any client config.

In-app discovery​

  • Route /settings/mcp sets helpPath to /settings/ai-assistant-integration and helpLabelKey to mcpSettings.helpDocLabel.
  • The authenticated header book control opens this Help Center page (EN / ES). There is no extra help chip on the page body.

What users can and cannot do​

ActionAllowed?Conditions or restrictions
Open the pageYesMenu shows AI Assistant; no extra CASL pair on the route
Generate short-lived tokenYesSigned in; at least one active business membership
Show / copy tokenYesAfter generation, in this browser session
Copy server URL / snippetsYesAfter generation
Use prompt shortcuts / resource linksYesAfter generation (UI catalog)
Choose scopes on the V2 tokenNoFull scope set is issued by the server
Edit businesses on the tokenNoComes from your memberships (and MFA rules)
Delete / revoke from a dedicated revoke button on V2Not availableRely on expiry; regenerate; disconnect cloud apps separately
Create long-lived keyVia V1 pageLink Generate a V1 API key
Connect Claude/ChatGPT without a tokenVia Connect AI appsSeparate OAuth flow when enabled

Token lifecycle​

stateDiagram-v2
[*] --> NoToken: Open page / reload
NoToken --> Active: Generate access token
Active --> Active: Generate New Token
Active --> Expired: Lifetime ends (~24h)
Expired --> Active: Generate new token
Active --> NoToken: Leave page and reload without regenerating
StateMeaning
No token yetGet started is shown
ActiveCountdown runs; snippets and prompts are available
ExpiredBanner; create a new token to reconnect

Effects on other modules​

  • Generating a token does not post sales, move stock or change accounting.
  • When the assistant reads data, it sees information you are allowed to see in the businesses on the token.
  • When the assistant writes (if a tool and your role allow it), the change is attributed like an action you took and is subject to the same branch and role limits as the FlowPOS app.
  • Cloud Connected apps are separate credentials; disconnecting them does not remove a local MCP token still stored in a desktop client.

Practical examples​

  1. Everyday briefing. Generate a token, configure Claude Desktop with the snippet, paste Daily briefing, and review revenue and stock alerts before opening the branch.
  2. Multi-business owner. After generation, confirm the Active business and the authorized list. Use Switch business (or ask the assistant to switch) when you need another brand on the same token.
  3. Expired session. The assistant fails after a day. Open this page, see Token Expired or a low countdown, generate a new token, and replace the value in the client config.

Common errors and troubleshooting​

ProblemPossible causeRecommended solution
Generate fails with session expiredFirebase session endedSign out and sign in again
Generate fails with no membershipsNo active business_userContact an administrator
Network error on generateAPI unreachableCheck connection / VPN; retry
Assistant cannot connectWrong URL or expired tokenCopy URL again; generate a new token; paste a fresh snippet
A business is missing from the listMFA required and session lacks authenticatorSign in with two-step verification, then generate again
Connected apps card missingOAuth connect not enabledUse a token on this page, or ask support whether Connect AI apps is available
Need a key that lasts weeksV2 tokens expire (~24h)Use V1 API key and store it securely

Best practices​

  • Prefer the short-lived token for personal desktop assistants; use V1 only when a long-lived key is truly required.
  • Keep the token on your machine. Never commit it to Git or share it in chat.
  • Regenerate when a laptop is lost, a contractor leaves, or you suspect exposure.
  • Start with read questions (briefings, low stock) before asking the assistant to create or void anything.
  • For Claude or ChatGPT in the browser, prefer Connect AI apps when that option is available — no token to copy.

Frequently asked questions​

How long does the access token last?
About 24 hours by default. The page shows Time left after generation.

Where do I find help for this screen inside the app?
Use the book icon in the authenticated header. On this route it opens this article.

Is the token the same as a V1 API key?
No. This page issues a short-lived session token. V1 keys are long-lived and created on a separate screen.

Why is the role always Merchant?
The V2 token from this page is minted with the merchant role for MCP. V1 lets you choose Merchant or Tenant Developer when you create a key.

Can cashiers use this?
If AI Assistant appears under Settings for their role, they can open the page and generate a token. What the assistant can change still follows that user’s FlowPOS permissions.

What if I only want Claude.ai without installing a desktop client?
Use Connect AI apps when available.

Do prompt shortcuts work without generating a token?
The prompt list on this page appears after a successful token generation. The assistant still needs a working MCP connection to run them.

Can I edit the list of permissions on the V2 token?
Not on this page. The server grants the full MCP scope set for the short-lived token.

V1 API keys​

Open Generate a V1 API key (route /settings/mcp/v1) when you need a long-lived key (fp_mcp_…).

Differences from this page:

Short-lived token (this page)V1 API key
Lifetime~24 hoursOptional expiry, or none if left blank
RoleMerchantChoose Merchant or Tenant Developer
PermissionsFull set from the serverYou select one or more scopes
Raw secretShow/hide during the sessionShown once — copy immediately
BusinessAll authorized memberships on the tokenCreated for the current business

Store a V1 key in a password manager. If it is exposed, stop using it and create another. The V1 screen shows a strong warning that the raw key cannot be recovered later.


Last verified against the FlowPOS PWA AI Assistant Integration page (/settings/mcp) and MCP token APIs.