Skip to main content

Overview

Connect Claude Desktop to ClosedLoop AI using the Model Context Protocol (MCP). This integration enables Claude to access your customer insights, search feedback, and analyze patterns directly in conversations.
MCP (Model Context Protocol) is an open standard that allows AI assistants to securely connect to external data sources and tools.

Prerequisites

Before you begin, ensure you have:

Quick Setup

Step 1: Get Your API Key

  1. Go to ClosedLoop AI Dashboard
  2. Click Create API Key
  3. Copy your 64-character API key
  4. Keep it secure — you’ll need it for configuration

Step 2: Configure Claude Desktop

Open your Claude Desktop configuration file:
# Open config file in your default editor
open ~/Library/Application\ Support/Claude/claude_desktop_config.json

# Or create it if it doesn't exist
mkdir -p ~/Library/Application\ Support/Claude
touch ~/Library/Application\ Support/Claude/claude_desktop_config.json

Step 3: Add ClosedLoop Configuration

Add the following configuration to your claude_desktop_config.json:
{
  "mcpServers": {
    "closedloop": {
      "command": "npx",
      "args": ["@closedloop-ai/mcp-client"],
      "env": {
        "CLOSEDLOOP_API_KEY": "your-api-key-here",
        "CLOSEDLOOP_SERVER_URL": "https://mcp.closedloop.sh"
      }
    }
  }
}
Replace your-api-key-here with your actual API key from Step 1.

Step 4: Restart Claude Desktop

  1. Quit Claude Desktop completely
  2. Reopen Claude Desktop
  3. Look for the MCP tools icon (hammer) in the input area

Verify Connection

Once configured, test the integration by asking Claude:
What customer insights do you have access to?
Claude should respond with information about available tools:
  • list_insights — Browse customer feedback
  • get_insight_detail — Get detailed insight information
  • search_insights — Search across all feedback

Example Prompts

Browse Recent Feedback

Show me the latest 10 customer insights

Search for Specific Topics

Search for customer feedback about "mobile app performance"

Analyze Patterns

What are the top pain points customers mentioned this month?

Find Feature Requests

Search for feature requests with high severity

Investigate Specific Issues

Find all feedback related to "slow loading" and summarize the key themes

Configuration Options

Full Configuration Reference

{
  "mcpServers": {
    "closedloop": {
      "command": "npx",
      "args": ["@closedloop-ai/mcp-client"],
      "env": {
        "CLOSEDLOOP_API_KEY": "your-api-key-here",
        "CLOSEDLOOP_SERVER_URL": "https://mcp.closedloop.sh",
        "DEBUG": "false"
      }
    }
  }
}
VariableRequiredDescription
CLOSEDLOOP_API_KEYYesYour 64-character API key
CLOSEDLOOP_SERVER_URLNoServer URL (default: https://mcp.closedloop.sh)
DEBUGNoEnable debug logging (true/false)

Enable Debug Mode

For troubleshooting, enable debug output:
{
  "mcpServers": {
    "closedloop": {
      "command": "npx",
      "args": ["@closedloop-ai/mcp-client"],
      "env": {
        "CLOSEDLOOP_API_KEY": "your-api-key-here",
        "CLOSEDLOOP_SERVER_URL": "https://mcp.closedloop.sh",
        "DEBUG": "true"
      }
    }
  }
}

Troubleshooting

MCP Tools Not Appearing

  1. Check configuration syntax — Ensure valid JSON format
  2. Verify API key — Make sure the key is correct and active
  3. Restart Claude Desktop — Quit completely and reopen
  4. Check Node.js — Run node --version (requires 18+)

Connection Errors

# Test your API key manually
curl -X POST https://mcp.closedloop.sh/ \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{"jsonrpc": "2.0", "id": 1, "method": "tools/list"}'

View Debug Logs

On macOS, view Claude Desktop logs:
tail -f ~/Library/Logs/Claude/mcp*.log

Common Errors

ErrorSolution
401 UnauthorizedCheck your API key is correct
403 ForbiddenVerify your team has access
Connection refusedCheck internet connection
npx not foundInstall Node.js 18+

Security Best Practices

  • Never share your API key publicly
  • Don’t commit config files with API keys to git
  • Rotate API keys regularly in the dashboard
  • Each team member should use their own API key
  • All connections use HTTPS encryption
  • API keys are scoped to your team’s data only
  • No customer data is stored by the MCP client
  • Audit API key usage in the dashboard

Next Steps

Support

Need help? Contact us: