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


| Module | Settings |
| Who uses it | Anyone who can open Settings → AI Assistant in the menu (broad role list; see Before you begin) |
| What it changes | Issues 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:
| Situation | Use 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 day | V1 API key on this feature (/settings/mcp/v1) |
| You are integrating as a developer against the public MCP contract | FlowPOS 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
Header
- 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

| Element | Meaning |
|---|---|
| Get started | Introduces MCP: assistants can read sales, inventory and reports from FlowPOS |
| Helper text | Explains that the token is short-lived and that you can create a new one anytime |
| Generate access token | Creates the token for your current session |
After you generate a token

| Section | What you see |
|---|---|
| Token Details | Countdown (Time left), Authorized Businesses, Role (Merchant), Permissions (scopes) |
| MCP server URL | Endpoint your client connects to, plus Copy URL |
| Access token | Masked secret with Show Token, Copy Token, Generate New Token |
| Configuration Snippets | Tabs for Claude Desktop, Claude Code, Gemini and Cursor; Copy snippet |
| Available Prompts | Nine shortcut phrases (English and Spanish) |
| Available Resources | Three context document links the AI can read |
| Security | Reminder 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 / control | Purpose | Required? | Notes | Example |
|---|---|---|---|---|
| Generate access token | Creates the short-lived token | — | Uses your signed-in session | — |
| Time left | Shows remaining lifetime | Read-only | Default lifetime is 24 hours | 23h 59m |
| Authorized Businesses | Businesses included in the token | Read-only | Active business is marked Active; Show N more expands the list; copy control copies the business identifier | The Factory Active |
| Role | Identity embedded in the token | Read-only | Shown as Merchant | Merchant |
| Permissions | API scopes on the token | Read-only | Shown as raw scope names | pos:read, pos:write, reports:read, psa:read, pos:intents |
| MCP server URL | Client connection endpoint | Read-only | Built from the app’s API base URL + /mcp | https://api.example.com/mcp |
| Access token | Secret for the client | Read-only | Hidden until Show Token; Copy Token copies even while hidden | (masked) |
| Generate New Token | Replaces the current token | — | Hides the previous value again | — |
Permissions (scopes) shown on the token
| Scope | Plain meaning |
|---|---|
pos:read | Read products, inventory, sales and orders |
pos:write | Supported write actions (for example create a draft order), still limited by your role |
reports:read | Read sales, labor and cost reports |
psa:read | Read implementation projects |
pos:intents | Multi-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.
- Open Settings → AI Assistant.
- Under Get started, select Generate access token.
- Wait until Token Details appears with a countdown.
- 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
| Message | What 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
- In MCP server URL, select Copy URL.
- In Access token, optionally select Show Token, then Copy Token (copy works while the token is still hidden).
- 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
- Open Configuration Snippets.
- Choose a tab: Claude Desktop, Claude Code, Gemini or Cursor.
- Select Copy snippet.
- Paste into that client’s config file or terminal as the tab describes.
- Restart or reload the client if it requires it, then ask a simple question (for example paste Daily briefing).
| Client | What the snippet is |
|---|---|
| Claude Desktop | JSON mcpServers entry using npx and mcp-remote with an Authorization header |
| Claude Code | One terminal command (claude mcp add …) |
| Cursor | JSON mcpServers entry with url and Authorization header |
| Gemini | Python example via LangChain MCP adapters (you still supply your Google API key) |
How to use Available Prompts

Objective. Run a ready-made shortcut in the assistant.
- Scroll to Available Prompts (shown after a token exists).
- Open a shortcut for details if you want optional arguments explained.
- Select an EN or ES phrase to copy it.
- Paste the phrase into your connected AI assistant.
| Group | Shortcut | Example phrase (EN) |
|---|---|---|
| Today | Daily briefing | Daily briefing |
| Today | End-of-day report | Close out today |
| Week and month | Weekly review | How did last week go? |
| Week and month | Monthly performance | Monthly performance |
| Inventory | Low stock | What's running low? |
| Inventory | Restock plan | What should I order? |
| Sales and account | Top sellers | Top sellers this month |
| Sales and account | Sales by location | Which store did best? |
| Sales and account | Switch business | Switch to DIPS |
All prompt arguments are optional. The assistant uses your active business and defaults when you omit them.
How to copy Available Resources

These are context documents the AI can read. Copy the link if your client asks for a resource URI:
| Title | Link |
|---|---|
| Quick-start guide | flowpos://docs/quick-start |
| Prompt guide | flowpos://docs/prompt-guide |
| Guatemala context | flowpos://docs/currency-guide |
How to regenerate after expiry or disconnect
- Return to Settings → AI Assistant.
- 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).
- 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/mcpsetshelpPathto/settings/ai-assistant-integrationandhelpLabelKeytomcpSettings.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
| Action | Allowed? | Conditions or restrictions |
|---|---|---|
| Open the page | Yes | Menu shows AI Assistant; no extra CASL pair on the route |
| Generate short-lived token | Yes | Signed in; at least one active business membership |
| Show / copy token | Yes | After generation, in this browser session |
| Copy server URL / snippets | Yes | After generation |
| Use prompt shortcuts / resource links | Yes | After generation (UI catalog) |
| Choose scopes on the V2 token | No | Full scope set is issued by the server |
| Edit businesses on the token | No | Comes from your memberships (and MFA rules) |
| Delete / revoke from a dedicated revoke button on V2 | Not available | Rely on expiry; regenerate; disconnect cloud apps separately |
| Create long-lived key | Via V1 page | Link Generate a V1 API key |
| Connect Claude/ChatGPT without a token | Via Connect AI apps | Separate 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
| State | Meaning |
|---|---|
| No token yet | Get started is shown |
| Active | Countdown runs; snippets and prompts are available |
| Expired | Banner; 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
- Everyday briefing. Generate a token, configure Claude Desktop with the snippet, paste Daily briefing, and review revenue and stock alerts before opening the branch.
- 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.
- 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
| Problem | Possible cause | Recommended solution |
|---|---|---|
| Generate fails with session expired | Firebase session ended | Sign out and sign in again |
| Generate fails with no memberships | No active business_user | Contact an administrator |
| Network error on generate | API unreachable | Check connection / VPN; retry |
| Assistant cannot connect | Wrong URL or expired token | Copy URL again; generate a new token; paste a fresh snippet |
| A business is missing from the list | MFA required and session lacks authenticator | Sign in with two-step verification, then generate again |
| Connected apps card missing | OAuth connect not enabled | Use a token on this page, or ask support whether Connect AI apps is available |
| Need a key that lasts weeks | V2 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 hours | Optional expiry, or none if left blank |
| Role | Merchant | Choose Merchant or Tenant Developer |
| Permissions | Full set from the server | You select one or more scopes |
| Raw secret | Show/hide during the session | Shown once — copy immediately |
| Business | All authorized memberships on the token | Created 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.
Related features and documentation
- Connect AI apps — OAuth connect / disconnect for Claude and ChatGPT
- FlowPOS MCP server and API — endpoint, scopes and limits for integrators
- Two-step verification — authenticator sign-in that can affect which businesses enter a token
Last verified against the FlowPOS PWA AI Assistant Integration page (/settings/mcp) and MCP token APIs.