A Model Context Protocol (MCP) server for integrating with the Loops.so email platform API. This server provides tools for managing contacts, sending events, and handling transactional emails through Claude Desktop and other MCP-compatible clients.
The server implements the following Loops.so API endpoints as MCP tools:
-
Contact Management
create_contact- Add new contacts to your audienceupdate_contact- Update existing contact informationfind_contact- Search for contacts by email or user IDdelete_contact- Remove contacts from your audience
-
Email Operations
send_event- Trigger automated emails in loopssend_transactional_email- Send immediate transactional emails
-
Data Retrieval
get_mailing_lists- List all your mailing listsget_custom_fields- Get all custom contact properties
npm install -g loops-mcp-server# Clone or download the repository
git clone <repository-url>
cd loops-mcp-server
# Install dependencies
npm install
# Build the project
npm run build- Log in to your Loops.so account
- Navigate to Settings → API
- Copy your API key
Choose your editor/platform and follow the configuration steps below.
This automatically downloads and runs the latest version:
{
"mcpServers": {
"loops": {
"command": "npx",
"args": ["-y", "loops-mcp-server"],
"env": {
"LOOPS_API_KEY": "your-loops-api-key-here"
}
}
}
}If you prefer to install globally first:
npm install -g loops-mcp-serverThen use in config:
{
"mcpServers": {
"loops": {
"command": "loops-mcp-server",
"env": {
"LOOPS_API_KEY": "your-loops-api-key-here"
}
}
}
}Config File Location:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%/Claude/claude_desktop_config.json - Linux:
~/.config/Claude/claude_desktop_config.json
Configuration:
{
"mcpServers": {
"loops": {
"command": "npx",
"args": ["-y", "loops-mcp-server"],
"env": {
"LOOPS_API_KEY": "your-loops-api-key-here"
}
}
}
}After configuration: Completely quit and restart Claude Desktop.
Config File Location:
- macOS:
~/Library/Application Support/Cursor/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json - Windows:
%APPDATA%/Cursor/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json - Linux:
~/.config/Cursor/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
Configuration:
{
"mcpServers": {
"loops": {
"command": "npx",
"args": ["-y", "loops-mcp-server"],
"env": {
"LOOPS_API_KEY": "your-loops-api-key-here"
}
}
}
}Alternative: Cursor may also support MCP configuration through:
- Settings UI:
Cmd/Ctrl + ,→ Search for "MCP" - Workspace settings:
.cursor/mcp.json
After configuration: Restart Cursor IDE.
Config File Location:
- macOS:
~/.codeium/windsurf/mcp_config.json - Windows:
%APPDATA%/.codeium/windsurf/mcp_config.json - Linux:
~/.config/.codeium/windsurf/mcp_config.json
Configuration:
{
"mcpServers": {
"loops": {
"command": "npx",
"args": ["-y", "loops-mcp-server"],
"disabled": false,
"env": {
"LOOPS_API_KEY": "your-loops-api-key-here"
}
}
}
}After configuration: Use the refresh button in Windsurf's MCP settings UI or restart Windsurf.
Prerequisites:
- Install the MCP extension for VS Code (e.g.,
modelcontextprotocol.vscode-mcp)
Config File Location:
- Workspace:
.vscode/mcp.json - User: VS Code Settings → MCP Configuration
Configuration (.vscode/mcp.json):
{
"mcpServers": {
"loops": {
"command": "npx",
"args": ["-y", "loops-mcp-server"],
"env": {
"LOOPS_API_KEY": "your-loops-api-key-here"
}
}
}
}Alternative (Settings UI):
- Open VS Code Settings (
Cmd/Ctrl + ,) - Search for "MCP"
- Edit MCP Server Configuration
- Add the loops server configuration
After configuration: Reload VS Code window or restart VS Code.
Config File Location:
~/.continue/config.json(or workspace.continue/config.json)
Configuration:
{
"mcpServers": {
"loops": {
"command": "npx",
"args": ["-y", "loops-mcp-server"],
"env": {
"LOOPS_API_KEY": "your-loops-api-key-here"
}
}
}
}After configuration: Restart Continue.dev.
Configuration:
Add to your aider config file (usually ~/.aider.conf or aider.conf):
mcp:
servers:
loops:
command: npx
args: ["-y", "loops-mcp-server"]
env:
LOOPS_API_KEY: "your-loops-api-key-here"After configuration: Restart aider.
Config File Location:
- VS Code Settings or workspace
.cline/mcp.json
Configuration:
{
"mcpServers": {
"loops": {
"command": "npx",
"args": ["-y", "loops-mcp-server"],
"env": {
"LOOPS_API_KEY": "your-loops-api-key-here"
}
}
}
}If you're using a different MCP-compatible client, use this standard configuration:
{
"mcpServers": {
"loops": {
"command": "npx",
"args": ["-y", "loops-mcp-server"],
"env": {
"LOOPS_API_KEY": "your-loops-api-key-here"
}
}
}
}Key Points:
- Replace
your-loops-api-key-herewith your actual Loops API key - The
-yflag in npx auto-confirms package installation - Ensure Node.js 18+ is installed and in your PATH
- Restart your editor/client after configuration changes
For development with auto-reload, use:
npm run devnpm run buildnpm startOnce configured, you can interact with the Loops API through Claude Desktop:
- "Create a contact with email test@example.com"
- "Find the contact with email test@example.com"
- "Send an event called 'welcome' to test@example.com"
- "Show me all my mailing lists"
- "Update the contact test@example.com to be unsubscribed"
- "Delete the contact with email test@example.com"
Loops.so has a baseline rate limit of 10 requests per second per team. The server includes proper error handling for rate limit responses (429).
The server includes comprehensive error handling and will return meaningful error messages if API calls fail. All errors are properly formatted and returned to the MCP client.
- Never commit your
LOOPS_API_KEYto version control - The API key is only read from environment variables
- The server uses Bearer token authentication as required by Loops.so
"Command not found" or "executable file not found in $PATH"
- Ensure Node.js 18+ is installed:
node --version - If using npx, ensure npm is in your PATH
- Try using the full path:
"command": "node", "args": ["-m", "loops-mcp-server"]
"LOOPS_API_KEY environment variable is required"
- Verify the API key is set correctly in your config file
- Check for typos in the environment variable name (must be
LOOPS_API_KEY) - Ensure the config file JSON is valid
Server not connecting
- Restart your editor/client completely
- Check editor logs for error messages
- Verify your API key at https://app.loops.so → Settings → API
- Test the server manually:
LOOPS_API_KEY=test npx -y loops-mcp-server(will error, but confirms it runs)
Connection timeout
- Check your internet connection (npx downloads the package)
- Try installing globally first:
npm install -g loops-mcp-server - Check firewall/proxy settings
- Documentation: GitHub Repository
- Issues: Report a Bug
- Loops.so API Docs: API Reference
For comprehensive testing instructions, see TESTING_GUIDE.md.
Quick test:
export LOOPS_API_KEY="your-api-key"
node test-mcp-client.jsISC