ChatGPT OAuth 2.1 & Model Context Protocol (MCP) Integration

Login ‣ Main Page ‣ Preferences ‣ Connected Apps & AI Agents.

Main Page –> Preferences

_images/OAI_OpenAI_Wordmark_Black.png

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:

  1. 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).

  2. Company Tenant Selection You sign in with your SierraBooks credentials and choose which company/tenant (realmId) you wish to authorize.

  3. 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.

  4. Natural Language Accounting via MCP ChatGPT securely queries the SierraBooks Model Context Protocol (MCP) microservice via authenticated HTTP/SSE requests.

—

🔒 Security Architecture & Guardrails

🛡️ Zero Password Sharing

Your SierraBooks master password, API keys, and database credentials are never shared with or stored by OpenAI.

🏢 Tenant Cryptographic Isolation

Every access token is cryptographically bound to your specific company tenant ID (realmId). Cross-company data leakage is structurally impossible.

⏱️ Ephemeral Access & Auto-Refresh

Access tokens expire after 60 minutes. OpenAI automatically refreshes tokens via standard OAuth 2.1 refresh tokens as long as access remains active.

🛑 1-Tap Instant Revocation

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

Login ‣ Main Page ‣ Preferences ‣ Payment Settings.

Main Page –> Preferences

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: OAuth

  • Client ID: <issued-by-sierrabooks>

  • Client Secret: <issued-by-sierrabooks>

  • Authorization URL: https://auth.sierrabooks.biz/oauth/authorize

  • Token URL: https://auth.sierrabooks.biz/oauth/token

  • Scope: sierrabooks.read sierrabooks.write

  • Token Exchange Method: Basic or Post

—

📱 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:

  1. Launch the SierraBooks App on iOS, macOS, Android, or Web.

  2. Navigate to Preferences (⚙️).

  1. Main Page –> Preferences -> Connected Apps & AI Agents.

  1. Under the Connected Apps & AI Agents section, locate OpenAI ChatGPT.

  2. 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.