aloop-mcp-server
v0.2.0
Published
Aloop MCP Server for LinkedIn Ads Analytics
Maintainers
Readme
Aloop MCP Server
An MCP (Model Context Protocol) server that provides LinkedIn Ads analytics capabilities for Aloop users.
Features
- Check LinkedIn Ads connection status
- Retrieve campaign analytics and performance metrics
- Get campaign lists with detailed information
- Generate AI-powered campaign recommendations
- Get audience upload information
- Supports both stdio and HTTP/SSE transport modes
Installation
npm install
npm run buildConfiguration
Transport Modes
The Aloop MCP Server supports two transport modes:
1. Stdio Transport (Default)
Use this mode for Claude Desktop integration.
Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json):
{
"mcpServers": {
"aloop": {
"command": "node",
"args": ["/path/to/aloop-mcp/build/index.js"],
"env": {
"ALOOP_API_GATEWAY_URL": "http://localhost:8000",
"ALOOP_USER_JWT": "your-jwt-token-here",
"TRANSPORT_MODE": "stdio"
}
}
}
}2. HTTP Transport (Streamable) - Multi-User Support
Use this mode for web-based clients, remote access, or multi-user scenarios where each user provides their own API key.
Step 1: Start the server in HTTP mode
Run the server with HTTP transport (no user-specific API key needed):
export ALOOP_API_GATEWAY_URL=http://localhost:8000
export TRANSPORT_MODE=http
export HTTP_PORT=3001
node build/index.jsStep 2: Each user configures Claude Desktop with their API key
Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json):
{
"mcpServers": {
"aloop-http": {
"url": "http://localhost:3001/mcp",
"transport": {
"type": "http",
"headers": {
"Authorization": "Bearer YOUR_ALOOP_API_KEY"
}
}
}
}
}Key Benefits of HTTP Mode:
- Multi-user: Multiple users can connect with their own API keys
- Development friendly: Server stays running when Claude Desktop restarts
- Better debugging: View server logs independently
- Scalability: Deploy to shared server for team access
Note: With HTTP transport, you run the server separately (Step 1), and Claude Desktop connects to it via HTTP. Each user provides their own API key in the client configuration.
See AUTHENTICATION.md for detailed authentication setup.
Endpoints:
GET /health- Health check endpointPOST /mcp- MCP protocol endpoint (initialize and requests)GET /mcp- Server-Sent Events stream for server-to-client messagesDELETE /mcp- Session termination endpoint
Protocol: The server implements MCP over HTTP with Server-Sent Events for real-time communication.
Example configuration file: See claude_desktop_config_http.example.json
Environment Variables
ALOOP_API_GATEWAY_URL- Aloop API Gateway URL (default:http://localhost:8000)ALOOP_USER_JWT- User's JWT token for authentication (stdio mode only)TRANSPORT_MODE- Transport mode:stdio(default) orhttpHTTP_PORT- HTTP server port when using HTTP transport (default:3001)
Authentication
The server supports two authentication modes:
- Stdio Mode: Uses
ALOOP_USER_JWTenvironment variable (single user) - HTTP Mode: Uses per-request authentication headers (multi-user)
Each user provides their API key in their Claude Desktop configuration. See AUTHENTICATION.md for detailed setup.
Tools
1. check_linkedin_connection
Check if LinkedIn Ads is connected in Aloop.
2. get_campaign_analytics
Get detailed analytics for LinkedIn Ad campaigns.
3. get_campaigns_list
Get list of all LinkedIn Ad campaigns.
4. get_campaign_recommendations
Generate AI-powered recommendations for campaign optimization.
5. get_audience_uploads
Get information about audience uploads to LinkedIn.
Usage with Claude
Once configured, you can ask Claude:
- "Show me my LinkedIn campaign analytics"
- "What are my LinkedIn campaigns performing?"
- "Give me recommendations for my LinkedIn ads"
- "Is my LinkedIn connected in Aloop?"
License
MIT
