AI assistants: MCP, OAuth and Bearer
Add the QuoSuite MCP server, authorize OAuth or a Bearer key, manage access and troubleshoot connections.
QuoSuite's Model Context Protocol (MCP) server lets a compatible AI assistant read business data and perform supported actions in your workspace. It uses Streamable HTTP. Start with read access, verify the workspace, then enable writes when needed.
1. Choose OAuth or Bearer
| Method | MCP server URL | Access comes from |
|---|---|---|
| OAuth · Sign in with QuoSuite | https://YOUR_API_ORIGIN/api/mcp | Your consent, current user permissions and active subscription modules |
| Bearer · API key | https://quosuite.com/api/public/v1/quosuite/mcp | A dedicated QuoSuite qss_… key, its resource scopes and active subscription modules |
Copy the exact URL from Settings → API & Integrations → AI assistant connections (MCP). The OAuth URL uses the deployment's canonical issuer; it can differ from the origin serving these docs. The paths here assume the default /api prefix. These are MCP endpoints, not the REST base URL, Swagger page or a legacy SSE URL.
You need an existing QuoSuite workspace, an active subscription and an MCP-compatible client. Remote cloud clients must be able to reach your HTTPS endpoint. Registering a client or issuing a key requires the relevant API & Integrations permissions. An ordinary workspace user can approve an already configured OAuth application and manage their own connections without API administration rights.
OAuth is suited to assistants acting on behalf of an individual user. A Bearer API key is an independent workspace integration identity: its scopes are not automatically limited by its creator's later role changes. OAuth access tokens also travel in a Bearer header, but they belong at /api/mcp; a qss_… API key belongs at /api/public/v1/quosuite/mcp.
2. Add the server with OAuth
Register the connecting application
- In your AI client's custom MCP connection settings, choose to add a remote server, name it QuoSuite, and select Streamable HTTP if a transport choice appears.
- In QuoSuite, open Settings → API & Integrations → AI assistant connections (MCP) and select OAuth · Sign in with QuoSuite. Copy the canonical MCP server URL into the client and choose OAuth authentication.
- Copy the client's exact redirect/callback URI. In QuoSuite's OAuth client form, enter an application name and the permitted callback URI(s), one per line. Use a separate registration for each application. Scheme, host, port and path must match exactly; wildcards are refused. HTTPS is required except for loopback development callbacks.
- Match the client's token authentication method:
client_secret_postsends credentials in the token request body;client_secret_basicuses HTTP Basic;noneis for public/native clients without a secret. S256 PKCE is required for every method, including confidential clients. - Create the OAuth client. Copy its client ID and, when issued, client secret into the AI client's OAuth fields. The secret is shown only once. Store it in the client's credential storage. A public client using
nonereceives no secret. - Save the server and choose Connect or Sign in in the AI client. Let the client discover authorization and token endpoints; if it needs explicit URLs, copy them from QuoSuite's advanced OAuth settings.
Sign in and authorize access
- Follow the browser window opened by the AI client. For an automatically registered application, enter your workspace slug if asked (for example
acme). Workspace selection alone does not authorize access. - Sign in on your QuoSuite workspace using your normal account. Enter your password only on the QuoSuite sign-in page.
- On the consent screen, verify the application name, workspace, account and callback URL. Read access is the default. Check the optional write box only if you want this connection to create, update or delete supported business records. If requested, keeping access between sessions uses
offline_accessand refresh tokens. - Approve access, or deny it to cancel. QuoSuite returns you to the AI client. The grant is tied to the approving user and workspace; it cannot select another tenant in tool arguments.
- Enable QuoSuite for the current conversation if your client requires it, refresh its tools, and ask it to call
quosuite_contextbefore accessing business data.
If the application supports automatic OAuth registration (DCR) and your deployment enables it, you can skip manual client creation and let the client register itself. DCR is disabled by default. It still requires workspace sign-in and consent. QuoSuite does not advertise Client ID Metadata Documents (CIMD); use manual registration or enabled DCR.
If a published QuoSuite directory integration is available in your client, install it and choose Connect, then follow workspace selection, sign-in and consent. Directory availability depends on publication and the AI product; manual setup remains available.
ChatGPT and Claude
For ChatGPT, add a custom MCP connection using the canonical OAuth URL and the registered client credentials. Register the callback displayed by ChatGPT exactly. If custom connections are unavailable, check your plan and workspace administrator's settings. See OpenAI's connection instructions for the current setup interface.
For Claude, add a custom connector with the OAuth URL. Choose Use your own OAuth client and enter your registration's credentials; register https://claude.ai/api/mcp/auth_callback. Alternatively choose automatic registration when DCR is enabled. See Claude's remote MCP setup.
3. Add the server with a Bearer API key
- Open Settings → API & Integrations → AI assistant connections (MCP) and select Bearer · API key.
- Choose Create QuoSuite key. Give it a name identifying the assistant, set an appropriate expiry and select read-only or specific resource scopes. Add write scopes only for required operations. Sensitive resources, including HR and rental customer records, require explicit scopes; wildcards do not grant them. See Scopes and subscription plan.
- Copy the new
qss_…key when it is revealed. The saved key cannot be recovered later. QuoShop (qsh_…) and QuoRent (qsr_…) keys cannot authenticate to this MCP endpoint. - In the AI client, add a remote Streamable HTTP MCP server with the URL shown for Bearer access. Choose fixed API-key/Bearer or request-header authentication, without an OAuth sign-in flow. Set
AuthorizationtoBearer <QUOSUITE_API_KEY>(include the space afterBearer).X-API-Key: <QUOSUITE_API_KEY>is also accepted; do not send conflicting credentials. - Save, connect and refresh the tools. Authorization comes from the key: there is no browser consent screen for this method. Ask the assistant to call
quosuite_contextto confirm the workspace and scopes.
For clients using an mcpServers JSON configuration:
{
"mcpServers": {
"quosuite": {
"url": "https://quosuite.com/api/public/v1/quosuite/mcp",
"headers": {
"Authorization": "Bearer <QUOSUITE_API_KEY>"
}
}
}
}The wrapper and transport field names vary by client. The copyable configuration in QuoSuite contains a placeholder, not your saved secret. Replace it locally using your client's secure secret storage or supported environment-variable mechanism. Do not put credentials in URLs, conversations or version control. For a browser client, configure the key's allowed origins; a key with no allowed origin is for server-to-server use. See Authentication and keys.
If your client cannot send fixed headers, use OAuth or a local stdio bridge. For Claude request-header authentication, use the Bearer endpoint and configure the fixed header, selecting No sign in when that header is the only credential; follow its linked setup guide for supported header names.
4. Verify and use the connection
Ask: “Read QuoSuite context and tell me which workspace, timezone, currency and tools are available.” The assistant should call quosuite_context and verify that the workspace matches your intent. Then try a read such as listing a small page of customers or invoices. Merely saving a server URL does not authorize data access.
The tool catalogue reflects the connection's current permissions/scopes, active modules and subscription features. It covers supported JSON operations for articles, stock, partners, sales, purchases, payments, expenses, treasury, reports, rental, CRM, projects and eligible employee data. OAuth/user sessions can expose eligible business operations beyond the public API-key catalogue. Credential administration, platform administration, arbitrary URLs, binary downloads and multipart uploads are excluded; use the QuoSuite application for those operations.
Payment links and email
For API keys, grant payment_links:read to look up links and transactions, or payment_links:write to issue, cancel or delete links. Reviewing a transfer also requires payments:write. Use emails:read for templates and delivery status, and emails:write to send. Sending a payment link or reminder additionally requires payment_links:read. Grant payment_links and emails explicitly, as wildcard scopes exclude both resources.
With OAuth, grant mcp:write consent for mutations. QuoSuite checks the user’s PAYMENT_GATEWAYS permissions separately for reading, creating, cancelling, deleting and validating. In the workspace role matrix, EMAILS:READ covers templates and delivery, and EMAILS:CREATE allows sending. Sending a payment template also requires payment-link read access and read permission for its linked reservation, rental agreement or invoice. The existing reservation payment-link email tool uses PAYMENT_GATEWAYS:UPDATE and RENTAL_RESERVATIONS:READ.
Select a fixed amount, a percentage of the total, the remaining balance or the full amount when due. The tool returns the hosted URL. Use a separate idempotencyKey per email and follow its status using the returned delivery ID. See the payment links and email guide for the request fields and lifecycle.
An MCP client performs initialization, discovers tools with tools/list and invokes them with tools/call. Use the exact discovered tool names and schemas; business tool names include a stable path hash. Arguments preserve their API location:
{
"path": { "id": "<RECORD_UUID>" },
"query": { "pageSize": 25 },
"body": { "name": "Customer name" },
"idempotencyKey": "<UNIQUE_KEY_FOR_THIS_INTENDED_OPERATION>"
}This illustrates argument groups; send only groups and fields declared by the chosen tool. Follow pagination, use the workspace timezone for date ranges and keep currencies separate. Required idempotency keys must stay the same when retrying the same intended write with the same arguments. Tool annotations help the client request approval, but do not replace authorization or business validation. Review intended changes through the client's approval controls.
5. Change access or disconnect
For OAuth, open My approved connections in your QuoSuite account menu (/mcp/connections). The connection owner can:
- Enable Write access after explicit confirmation, including on a connection initially approved for reads only.
- Disable Write access to restrict subsequent requests to reads; requests already dispatched may complete.
- Disconnect the connection to revoke its grant. Reconnect and approve again to restore access.
These actions affect only that user's connection in the current workspace and never add role permissions or subscription modules. Refresh the client's cached tools after a change. Administrators can also manage clients in API & Integrations: revoking a client or rotating its secret invalidates all its authorizations, requiring users to authorize again.
For Bearer API keys, manage resource scopes, expiry, rotation and revocation in Settings → API & Integrations. After rotation, update the client's stored key. The OAuth Write access switch does not govern API keys. See key rotation and revocation.
6. OAuth protocol reference
Use the canonical issuer origin shown in QuoSuite settings in place of https://YOUR_API_ORIGIN:
| Purpose | URL |
|---|---|
| MCP resource / OAuth audience | https://YOUR_API_ORIGIN/api/mcp |
| Authorization server metadata | https://YOUR_API_ORIGIN/.well-known/oauth-authorization-server |
| Protected resource metadata | https://YOUR_API_ORIGIN/.well-known/oauth-protected-resource/api/mcp |
| Authorization | https://YOUR_API_ORIGIN/api/mcp/oauth/authorize |
| Token exchange / refresh | https://YOUR_API_ORIGIN/api/mcp/oauth/token |
| Revocation | https://YOUR_API_ORIGIN/api/mcp/oauth/revoke |
| Registration, only if enabled | https://YOUR_API_ORIGIN/api/mcp/oauth/register |
An unauthenticated call to the OAuth MCP resource returns 401 with a WWW-Authenticate discovery challenge. Use the discovered values, including the exact resource and issuer. Authorization uses the authorization code flow with S256 PKCE; token requests accept form encoding or JSON. Client-credentials and password grants are not supported. OAuth protocol responses are standard OAuth JSON, without the ERP REST response envelope.
| Scope | Meaning |
|---|---|
mcp:read | Read eligible business data within the user's current permissions |
mcp:write | Read and write eligible data; requires explicit consent and the user's existing permissions |
offline_access | Issue rotating refresh tokens when approved |
Access tokens expire after 15 minutes. Refresh tokens last at most 30 days, and the authorization at most 90 days. Refresh/code reuse revokes the token family. Refresh without the optional scope parameter to follow the owner's current access; a stale explicit scope after a Write access change returns invalid_scope. Refresh cannot change consent. Expired grants require fresh authorization. OAuth tokens are accepted only by MCP, not as general ERP REST credentials.
An existing application can also send its normal short-lived user access JWT in Authorization: Bearer <USER_ACCESS_TOKEN> to /api/mcp. It must handle session refresh and revocation through the normal login flow; refresh tokens are not MCP credentials. Platform administrators, support impersonation, customer/portal sessions and tenantless users cannot use this path.
7. Local stdio clients
For a client that launches a local process, the repository includes a bridge requiring Node.js 20.3+:
{
"mcpServers": {
"quosuite": {
"command": "node",
"args": ["/absolute/path/to/quosuite-erp/backend/tool/mcp-stdio.mjs"],
"env": {
"QUOSUITE_MCP_URL": "https://quosuite.com/api/public/v1/quosuite/mcp",
"QUOSUITE_MCP_TOKEN": "<QUOSUITE_API_KEY>"
}
}
}
}Replace the bridge path with your local absolute path (escape backslashes in Windows JSON). Inject the key securely. HTTPS is required except for loopback development. The bridge relays JSON-RPC, does not persist credentials and does not perform browser OAuth or automatically retry writes.
8. Troubleshooting
| Symptom | What to check |
|---|---|
| Cannot connect / 404 / HTML response | Copy the complete MCP URL for the selected method; check Streamable HTTP, HTTPS, proxy routing and client network reachability. Do not use the REST base URL or a docs page. |
| OAuth unavailable in QuoSuite | The deployment operator must configure a stable MCP_OAUTH_ISSUER_URL and expose root /.well-known/ discovery routes plus /api/mcp and /api/mcp/oauth/…. Bearer keys remain a separate method. |
Redirect rejected / invalid_redirect_uri | Register the exact client callback, including port and path. Fixed loopback ports must match; no wildcards. |
invalid_client | Check client ID, secret and token authentication method. After rotation, update credentials and reconnect. Use DCR only when enabled. |
invalid_grant | The code/token or authorization expired, was reused or revoked, or PKCE/callback does not match. Restart Connect and obtain fresh consent. |
invalid_scope during refresh | Omit scope to use current access; manage Write access in QuoSuite instead of requesting more scopes in refresh. |
401 / invalid_token | Complete OAuth sign-in or refresh/reconnect; for API keys check the qss_… key, expiry, revocation and correct Bearer endpoint. |
| 403 / tool missing / write refused | Check consent, Write access, live roles, explicit key scopes (including sensitive resources), active modules and subscription. Refresh the tool list. |
| Browser origin refused | Add the browser origin to the API key's allowlist; user-session JWT clients use the deployment's application CORS allowlist. |
| 429 | Respect Retry-After and existing API quotas. API-key MCP requests and their downstream business calls both count toward quotas. |
| Request/result too large or timed out | Requests are limited to 256 KiB, business results to 2 MiB and business calls to 30 seconds. Reduce page size or narrow the filters. Check the result before retrying a write. |
For REST business validation and scope errors returned by tools, see Errors. The administrator deployment reference is docs/MCP.md in the QuoSuite repository.