ChatGPT OAuth 2.1 & Model Context Protocol (MCP) Integration
.
The SierraBooks ChatGPT Action enables authorized OpenAI ChatGPT models to query real-time company finances, author draft estimates and invoices, inspect customer balances, and run financial reports directly in natural language conversations on your behalf.
—
⚡ How It Works
Using modern delegated authorization standards, ChatGPT acts securely on your behalf without ever receiving your login credentials:
User Authorization (OAuth 2.1 + PKCE) When you enable the SierraBooks Action in ChatGPT, OpenAI redirects you to the secure SierraBooks Authorization portal (
https://auth.sierrabooks.biz/oauth/authorize).Company Tenant Selection You sign in with your SierraBooks credentials and choose which company/tenant (
realmId) you wish to authorize.Signed Token Issuance SierraBooks issues a short-lived (60-minute) RS256-signed JWT access token cryptographically bound to your specific user identity and company tenant.
Natural Language Accounting via MCP ChatGPT securely queries the SierraBooks Model Context Protocol (MCP) microservice via authenticated HTTP/SSE requests.
—
🔒 Security Architecture & Guardrails
Your SierraBooks master password, API keys, and database credentials are never shared with or stored by OpenAI.
Every access token is cryptographically bound to your specific company tenant ID (realmId). Cross-company data leakage is structurally impossible.
Access tokens expire after 60 minutes. OpenAI automatically refreshes tokens via standard OAuth 2.1 refresh tokens as long as access remains active.
You can revoke ChatGPT’s authorization instantly at any time from inside the SierraBooks app settings. Revocation immediately terminates token refresh capabilities.
—
🔑 Granular Access Scopes
.
The SierraBooks authorization server issues tokens strictly limited to predefined OAuth 2.1 scopes:
sierrabooks.read: Grants read-only access to query invoices, estimates, credit memos, payments, customer balances, and run financial reports.
sierrabooks.write: Allows creating and updating draft estimates, invoices, and customer contact records upon explicit user prompt.
—
⚙️ OpenAI Custom Action Configuration
If you are configuring the official SierraBooks Custom GPT Action in OpenAI’s Custom GPT Builder:
Authentication Type:
OAuthClient ID:
<issued-by-sierrabooks>Client Secret:
<issued-by-sierrabooks>Authorization URL:
https://auth.sierrabooks.biz/oauth/authorizeToken URL:
https://auth.sierrabooks.biz/oauth/tokenScope:
sierrabooks.read sierrabooks.writeToken Exchange Method:
BasicorPost
—
📱 Managing & Revoking Access in SierraBooks
You maintain absolute sovereignty over all AI models and third-party integrations connected to your financial ledgers.
To inspect active integrations or revoke ChatGPT’s access:
Launch the SierraBooks App on iOS, macOS, Android, or Web.
Navigate to Preferences (
⚙️).
.
Under the Connected Apps & AI Agents section, locate OpenAI ChatGPT.
Tap Revoke Access.
Once revoked, any subsequent token refresh requests from OpenAI will be immediately rejected with an HTTP 401 Unauthorized status, blocking further access to your company records.