Skip to main content

How to Set Up Claude Desktop

Connect AuditSwarm to Claude Desktop for AI-assisted audit management.

Architecture

Claude Desktop uses a single-tenant architecture with a downloadable bridge script:

Claude Desktop → Bridge Script (pre-configured URL) → Your MCP Server → Your Database

Each customer gets:

  • Dedicated GCP project
  • Dedicated MCP server URL
  • Isolated database
  • Custom bridge script with their URL hardcoded

Prerequisites

  • Claude Desktop installed
  • Node.js 18+ installed
  • AuditSwarm account

Setup Steps

Step 1: Get Your Bridge Script

  1. Login to your AuditSwarm instance (e.g., https://customer.auditswarm.com)
  2. Navigate to AI Agent Setup (profile menu > "AI Agent Setup")
  3. Click "Generate Token"
  4. Click "Download Bridge Script"
  5. Save auditswarms-bridge.ts somewhere permanent (e.g., ~/auditswarms-bridge.ts)

Step 2: Configure Claude Desktop

Edit your Claude Desktop config file:

OSConfig Path
Linux~/.config/claude/claude_desktop_config.json
macOS~/Library/Application Support/Claude/claude_desktop_config.json
Windows%APPDATA%\Claude\claude_desktop_config.json

Add this configuration:

{
"mcpServers": {
"auditswarms": {
"command": "npx",
"args": ["tsx", "/path/to/downloaded/auditswarms-bridge.ts"],
"env": {
"AUTH_TOKEN": "YOUR_JWT_TOKEN_HERE"
}
}
}
}

Replace:

  • /path/to/downloaded/auditswarms-bridge.ts with the actual path to your downloaded script
  • YOUR_JWT_TOKEN_HERE with the token from Step 1

Step 3: Restart Claude Desktop

Close and reopen Claude Desktop to load the new configuration.

Step 4: Verify Connection

In Claude Desktop, try:

  • "List my audits"
  • "Show pending suggestions"
  • "Get current context"

Why Downloadable Bridge?

BenefitDescription
Single-TenantEach customer's bridge is pre-configured for their own MCP server
Zero ConfigurationMCP server URL is hardcoded in the downloaded script
SecureCan't accidentally connect to another customer's instance
SimpleUsers only need to specify token and path

Example Commands

Once connected, try these in Claude Desktop:

View Data:

List all my audits
Show risks with high severity
What controls exist for authentication?

Make Changes (via suggestions):

Update the SOC2 audit status to In Progress
Create a new risk for data breach
Mark the MFA control as implemented

Context-Aware:

What page am I looking at?
Suggest changes for this audit

Troubleshooting

"Cannot find module"

Cause: Node.js or tsx not installed.

Solution:

npm install -g tsx

"Invalid token"

Cause: Token expired or incorrect.

Solution:

  1. Go to AI Agent Setup in AuditSwarm
  2. Generate a new token
  3. Update the token in your Claude Desktop config
  4. Restart Claude Desktop

"Connection refused"

Cause: Bridge script path incorrect.

Solution:

  1. Verify the path to auditswarms-bridge.ts is correct
  2. Use an absolute path (not relative)
  3. Check the file exists: ls -la /path/to/auditswarms-bridge.ts

Bridge Script Not Working

Cause: Script may be outdated.

Solution:

  1. Download a fresh bridge script from AI Agent Setup
  2. Replace the old file
  3. Restart Claude Desktop

Token Management

  • Tokens expire after 30 days
  • Generate new tokens from AI Agent Setup
  • Each token is tied to your user account
  • Revoking a token immediately invalidates it

Available Tools

Your Claude Desktop has access to:

ToolWhat It Does
suggest_changeCreate/update/delete entities (requires approval)
query_dataQuery audits, risks, controls, workflows
get_current_contextSee what page user is viewing
helpGet platform guidance

See MCP Tools Reference for complete documentation.


Next Steps