Using SnapBooks with AI Assistants

Overview

SnapBooks supports the Model Context Protocol (MCP), which allows AI assistants like Claude Desktop to help you with your accounting tasks using natural language.

With MCP enabled, you can ask Claude to:

What Can You Do?

Once connected, you can ask Claude to help with tasks like:

Claude will interact with your SnapBooks data securely and only show information you have permission to access.

Claude Desktop Configuration

SnapBooks supports two authentication methods for MCP:

  1. OAuth 2.1 (Recommended) - More secure, with automatic token management
  2. Bearer Token - Simple, but requires manual token management

OAuth 2.1 provides the most secure connection with automatic token refresh and proper audience binding. Claude Desktop will handle the OAuth flow for you.

Configure Claude Desktop:

Edit your Claude Desktop configuration file:

Add this configuration:

{
  "mcpServers": {
    "snapbooks": {
      "url": "https://api.snapbooks.com/mcp",
      "transport": "streamable-http",
      "oauth": {
        "authorizationUrl": "https://api.snapbooks.com/v2/oauth/authorize",
        "tokenUrl": "https://api.snapbooks.com/v2/oauth/token",
        "clientRegistrationUrl": "https://api.snapbooks.com/v2/oauth/register",
        "scopes": ["read:accounting", "write:accounting"]
      }
    }
  }
}

First Connection:

  1. Restart Claude Desktop
  2. Claude will automatically register as an OAuth client
  3. You’ll be redirected to SnapBooks to log in and authorize access
  4. Once authorized, Claude can securely access your SnapBooks data

Security Benefits:

Option 2: Bearer Token (Legacy)

For simpler setups or testing, you can use a bearer token:

To get your token:

  1. Log into SnapBooks in your web browser
  2. Go to your account settings
  3. Look for “API Access” or “Integrations”
  4. Generate a new API token
  5. Copy the token - you’ll need it in the next step

Configure Claude Desktop:

Find and edit your Claude Desktop configuration file:

If the file doesn’t exist, create it. Add this configuration (or add to existing mcpServers section):

{
  "mcpServers": {
    "snapbooks": {
      "url": "https://api.snapbooks.com/mcp",
      "transport": "streamable-http",
      "headers": {
        "Authorization": "Bearer YOUR_AUTH_TOKEN_HERE"
      }
    }
  }
}

Important: Replace YOUR_AUTH_TOKEN_HERE with the token you copied in step 1.

3. Restart Claude Desktop

Close and reopen Claude Desktop for the configuration to take effect.

Usage Examples

Once configured, you can interact with SnapBooks through Claude Desktop using natural language:

Example 1: Search Journal Entries

You: Show me all journal entries from January 2025 for my company

Claude: I'll search for those journal entries. I found 15 entries from January 2025.
Here are the highlights:
- 5 sales transactions totaling 125,000 NOK
- 3 expense entries for office supplies
- 7 bank reconciliation entries
Would you like me to show you the details of any specific entry?

Example 2: Create Journal Entry

You: Create a journal entry:
- Debit account 1920 (bank) 1000 NOK
- Credit account 3000 (sales) 1000 NOK
- Description: "Customer payment"

Claude: I've created the journal entry for you. The entry has been recorded with:
- Debit to Bank (1920): 1,000.00 NOK
- Credit to Sales (3000): 1,000.00 NOK
- Description: Customer payment
Would you like to review the entry details?

Example 3: Find Customers

You: Find all my active customers

Claude: I found 23 active customers in your system. Here are some of them:
- ABC Corporation
- Nordic Supplies AS
- Bergen Consulting
- ...
Would you like me to show more details about any specific customer?

Security & Privacy

Troubleshooting

OAuth Authorization Issues

Problem: OAuth authorization flow doesn’t start or fails

Solutions:

  1. Verify all OAuth URLs in your configuration are correct
  2. Ensure your SnapBooks server is accessible from your browser
  3. Check that the clientRegistrationUrl endpoint is reachable
  4. Make sure you’re using HTTPS (not HTTP) for the server URL
  5. Clear Claude Desktop’s cache and restart

Problem: “Token audience validation failed” error

Solutions:

  1. This means the token wasn’t issued for the MCP endpoint
  2. Make sure you’re using OAuth 2.1 with the resource parameter
  3. The MCP endpoint URL in the token must match your server’s MCP endpoint
  4. Try disconnecting and reconnecting to trigger a new OAuth flow

Connection Issues

Problem: Claude Desktop shows “Connection failed” or similar error

Solutions:

  1. For OAuth: Make sure you’ve completed the authorization flow
  2. For Bearer tokens: Check that you copied the entire token (no extra spaces)
  3. Verify your SnapBooks server URL is correct (include https://)
  4. Make sure Claude Desktop has been restarted after configuration
  5. Check server logs for detailed error messages

Claude Can’t Find Tools

Problem: Claude says it doesn’t have access to SnapBooks tools

Solutions:

  1. Make sure the mcpServers section is in the correct configuration file for your OS
  2. Restart Claude Desktop completely (not just closing the window)
  3. Check that your JSON configuration is valid (no missing commas or brackets)
  4. For OAuth: Verify you granted the required scopes during authorization

Authentication Errors

Problem: Getting “Unauthorized” or “403” errors

Solutions:

  1. For OAuth: Your tokens are automatically refreshed, but you may need to re-authorize
  2. For Bearer tokens: Generate a new token from SnapBooks settings
  3. Ensure your SnapBooks account has the necessary permissions
  4. Check that your user has access to the client accounts you’re trying to query

Need More Help?

If you’re still having issues:

Learn More