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:
- Search and analyze journal entries
- Look up business partners and customers
- Generate accounting reports
- Query bank transactions
- And much more - all through conversation!
What Can You Do?
Once connected, you can ask Claude to help with tasks like:
- “Show me all journal entries from January for my company”
- “Find my customer named ABC Corp”
- “Generate a trial balance report for this month”
- “What bank transactions do I have over 10,000 NOK?”
- “Create a journal entry for…“
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:
- OAuth 2.1 (Recommended) - More secure, with automatic token management
- Bearer Token - Simple, but requires manual token management
Option 1: OAuth 2.1 (Recommended)
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:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json - Linux:
~/.config/Claude/claude_desktop_config.json
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:
- Restart Claude Desktop
- Claude will automatically register as an OAuth client
- You’ll be redirected to SnapBooks to log in and authorize access
- Once authorized, Claude can securely access your SnapBooks data
Security Benefits:
- Tokens are automatically refreshed
- Tokens are bound to the MCP endpoint (can’t be reused elsewhere)
- You can revoke access anytime from SnapBooks settings
- No need to manually manage long-lived tokens
Option 2: Bearer Token (Legacy)
For simpler setups or testing, you can use a bearer token:
To get your token:
- Log into SnapBooks in your web browser
- Go to your account settings
- Look for “API Access” or “Integrations”
- Generate a new API token
- Copy the token - you’ll need it in the next step
Configure Claude Desktop:
Find and edit your Claude Desktop configuration file:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json - Linux:
~/.config/Claude/claude_desktop_config.json
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
- Your authentication token keeps your data secure
- Claude can only access data that you have permission to view
- All operations respect your account’s access controls
- Your conversations with Claude are private
Troubleshooting
OAuth Authorization Issues
Problem: OAuth authorization flow doesn’t start or fails
Solutions:
- Verify all OAuth URLs in your configuration are correct
- Ensure your SnapBooks server is accessible from your browser
- Check that the
clientRegistrationUrlendpoint is reachable - Make sure you’re using HTTPS (not HTTP) for the server URL
- Clear Claude Desktop’s cache and restart
Problem: “Token audience validation failed” error
Solutions:
- This means the token wasn’t issued for the MCP endpoint
- Make sure you’re using OAuth 2.1 with the
resourceparameter - The MCP endpoint URL in the token must match your server’s MCP endpoint
- Try disconnecting and reconnecting to trigger a new OAuth flow
Connection Issues
Problem: Claude Desktop shows “Connection failed” or similar error
Solutions:
- For OAuth: Make sure you’ve completed the authorization flow
- For Bearer tokens: Check that you copied the entire token (no extra spaces)
- Verify your SnapBooks server URL is correct (include https://)
- Make sure Claude Desktop has been restarted after configuration
- Check server logs for detailed error messages
Claude Can’t Find Tools
Problem: Claude says it doesn’t have access to SnapBooks tools
Solutions:
- Make sure the
mcpServerssection is in the correct configuration file for your OS - Restart Claude Desktop completely (not just closing the window)
- Check that your JSON configuration is valid (no missing commas or brackets)
- For OAuth: Verify you granted the required scopes during authorization
Authentication Errors
Problem: Getting “Unauthorized” or “403” errors
Solutions:
- For OAuth: Your tokens are automatically refreshed, but you may need to re-authorize
- For Bearer tokens: Generate a new token from SnapBooks settings
- Ensure your SnapBooks account has the necessary permissions
- Check that your user has access to the client accounts you’re trying to query
Need More Help?
If you’re still having issues:
- Contact your SnapBooks administrator
- Check the SnapBooks status page for any service disruptions
- Reach out to SnapBooks support with your configuration (but not your token!)
Learn More
- Download Claude Desktop - Get the Claude Desktop app
- Model Context Protocol - Learn about the MCP standard