npm package: @livelike/mcp
Description: A Model Context Protocol (MCP) server for interacting with LiveLike's engagement platform. This server enables AI assistants to manage LiveLike programs and interactive widgets through a standardized interface.
Latest version: 0.8.2

# LiveLike MCP Server

A Model Context Protocol (MCP) server for interacting with LiveLike's engagement platform. This server enables AI assistants to manage LiveLike programs and interactive widgets through a standardized interface.

## Key Features

- **Program Management**: Create, read, update, and delete LiveLike programs
- **Interactive Widgets**: Manage text quiz, image quiz, text poll, image poll, text prediction, image prediction, emoji slider, text ask, alert, image number prediction, image number prediction follow-up, text prediction follow-up, image prediction follow-up widgets
- **Scheduling**: Schedule widgets to be published at specific times
- **Engagement Tracking**: Monitor user interactions and engagement metrics
- **Standardized Interface**: MCP-compliant API for easy integration with AI assistants

## Requirements

- Node.js 20.x or newer
- VS Code, Cursor, Windsurf, Claude Desktop, or any other MCP client
- LiveLike API credentials (client ID and access token)

## Installation

### Install Node (for MAC and Linux platform)

- We recommend installing node using [nvm](https://github.com/nvm-sh/nvm?tab=readme-ov-file#install--update-script)
- Once `nvm` is installed, use nvm to install latest Node 20.x.x version, set the installed version as current node version and set it as default node version by running below command.

```sh
nvm install 20 && nvm use 20 && nvm alias default 20
```

### Identify `npx` and `Node` bin path

Get the `npx` path and installed node version `bin` path

```sh
which npx
```

eg: `/Users/<user-account-name>/.nvm/versions/node/v20.19.2/bin/npx`

- use `/Users/<user-account-name>/.nvm/versions/node/v20.19.2/bin/npx` as mcp server command (referred as `<npx_path>` in below mcp client config)
- add node bin path `/Users/<user-account-name>/.nvm/versions/node/v20.19.2/bin` to `PATH` env var (referred as `<node_bin_path>` in below mcp client config)

### MCP Client Config

**For Windows platform, refer [server config issues](#common-issues) for `command` where `PATH` env var is not needed to be set as part of MCP server config**

<details>
<summary>VS Code</summary>

1. Install the LiveLike MCP server using the VS Code CLI:

```bash
code --add-mcp '{"name":"livelike","command":"<npx_path>/npx","args":["-y", "@livelike/mcp"], "env": { "LIVELIKE_CLIENT_ID": "your_client_id", "LIVELIKE_ACCESS_TOKEN": "your_access_token", PATH: "<node_bin_path>:/usr/local/bin:/usr/bin:/bin" }}'
```

Or add this configuration to your VS Code settings:

```json
{
  "mcpServers": {
    "livelike": {
      "command": "<npx_path>/npx",
      "args": ["-y", "@livelike/mcp"],
      "env": {
        "LIVELIKE_CLIENT_ID": "your_client_id",
        "LIVELIKE_ACCESS_TOKEN": "your_access_token",
        "PATH": "<node_bin_path>:/usr/local/bin:/usr/bin:/bin"
      }
    }
  }
}
```

</details>

<details>
<summary>Cursor</summary>

1. Go to `Cursor Settings` → `MCP` → `Add new MCP Server`
2. Name: `livelike`
3. Command Type: `command`
4. Command: `npx -y @livelike/mcp`

Or add this configuration to your Cursor settings:

```json
{
  "mcpServers": {
    "livelike": {
      "command": "<npx_path>/npx",
      "args": ["-y", "@livelike/mcp"],
      "env": {
        "LIVELIKE_CLIENT_ID": "your_client_id",
        "LIVELIKE_ACCESS_TOKEN": "your_access_token",
        "PATH": "<node_bin_path>:/usr/local/bin:/usr/bin:/bin"
      }
    }
  }
}
```

</details>

<details>
<summary>Windsurf</summary>

Add this configuration to your Windsurf settings:

```json
{
  "mcpServers": {
    "livelike": {
      "command": "<npx_path>/npx",
      "args": ["-y", "@livelike/mcp"],
      "env": {
        "LIVELIKE_CLIENT_ID": "your_client_id",
        "LIVELIKE_ACCESS_TOKEN": "your_access_token",
        "PATH": "<node_bin_path>:/usr/local/bin:/usr/bin:/bin"
      }
    }
  }
}
```

</details>

<details>
<summary>Claude Desktop</summary>

Follow the MCP install [guide](https://modelcontextprotocol.io/quickstart/user) and use this configuration:

```json
{
  "mcpServers": {
    "livelike": {
      "command": "<npx_path>/npx",
      "args": ["-y", "@livelike/mcp"],
      "env": {
        "LIVELIKE_CLIENT_ID": "your_client_id",
        "LIVELIKE_ACCESS_TOKEN": "your_access_token",
        "PATH": "<node_bin_path>:/usr/local/bin:/usr/bin:/bin"
      }
    }
  }
}
```

</details>

## Configuration

### Environment Variables

Set these environment variables before starting the server:

**LIVELIKE_CLIENT_ID=your_client_id**
Your LiveLike Client ID

**LIVELIKE_ACCESS_TOKEN=your_access_token**
[Your LiveLike Admin Access Token](https://docs.livelike.com/reference/authentication#admin-access-token)

## Available Tools

### Program Management

- `list_programs`: Retrieve a list of programs with filtering and pagination
- `get_program`: Get details of a specific program
- `create_program`: Create a new program
- `update_program`: Modify an existing program
- `delete_program`: Remove a program
- `program_action`: Mark a program as started or stopped

### Widget Management

- `list_widgets`: Retrieve a list of widgets with filtering and pagination
- `get_widget`: Get details of a specific widget
- `delete_widget`: Remove a widget
- `schedule_widget`: Schedule a widget to be published at a specific time

### Text Quiz Widgets

- `create_text_quiz_widget`: Create a new text quiz widget
- `update_text_quiz_widget`: Modify an existing text quiz widget

### Text Poll Widgets

- `create_text_poll_widget`: Create a new text poll widget
- `update_text_poll_widget`: Modify an existing text poll widget

### Image Quiz Widgets

- `create_image_quiz_widget`: Create a new image quiz widget
- `update_image_quiz_widget`: Modify an existing image quiz widget

### Image Poll Widgets

- `create_image_poll_widget`: Create a new image poll widget
- `update_image_poll_widget`: Modify an existing image poll widget

### Text Prediction Widgets

- `create_text_prediction_widget`: Create a new text prediction widget
- `update_text_prediction_widget`: Modify an existing text prediction widget
- `publish_text_prediction_followup_widget`: Publish text prediction followup widget after updating with correct prediction

### Image Number Prediction Widgets

- `create_image_number_prediction_widget`: Create a new image number prediction widget
- `update_image_number_prediction_widget`: Modify an existing image number prediction widget
- `publish_number_prediction_followup_widget`: Publish number prediction followup widget after updating with correct prediction

### Badge Management

- `get_badges`: Retrieve badge(s) - single by UUID or list with filtering
- `create_badge`: Create a new badge with name, icon, and attributes
- `update_badge`: Modify an existing badge
- `delete_badge`: Remove a badge

### Sponsor Management

- `get_sponsors`: Retrieve sponsor(s) - single by UUID or list with filtering
- `create_sponsor`: Create a new sponsor with logo and branding
- `update_sponsor`: Modify an existing sponsor
- `delete_sponsor`: Remove a sponsor

### Leaderboard Management

- `get_leaderboards`: Retrieve leaderboard(s) with filtering by attributes or program
- `create_leaderboard`: Create a new leaderboard linked to a reward item
- `update_leaderboard`: Modify an existing leaderboard
- `delete_leaderboard`: Remove a leaderboard by UUID or custom ID
- `get_leaderboard_entries`: Get ranked entries with profile info
- `get_leaderboard_entry`: Get a specific profile's leaderboard entry
- `get_leaderboard_views`: Get leaderboard views
- `get_leaderboard_by_custom_id`: Retrieve leaderboard using custom identifier
- `update_leaderboard_by_custom_id`: Update leaderboard using custom identifier
- `manage_leaderboard_program_link`: Link or unlink a leaderboard to/from a program

### Quest Management

- `get_quests`: Retrieve quest(s) with filtering by status, attributes, etc.
- `create_quest`: Create a new quest with tasks and rewards
- `update_quest`: Modify an existing quest
- `delete_quest`: Remove a quest

### Quest Badges

- `get_quest_badges`: Get badges associated with a quest
- `create_quest_badge`: Add a badge to a quest
- `delete_quest_badge`: Remove a badge from a quest

### Quest Tasks

- `get_quest_tasks`: Retrieve quest task(s)
- `create_quest_task`: Create a task within a quest
- `update_quest_task`: Modify an existing quest task
- `delete_quest_task`: Remove a quest task

### Quest Task Actions

- `get_quest_task_actions`: Get actions linked to quest tasks
- `create_quest_task_action`: Link a task to a user action (required for progress tracking)
- `update_quest_task_action`: Modify a quest task action
- `delete_quest_task_action`: Remove a quest task action

### Quest Rewards

- `get_quest_rewards`: Get rewards for a quest
- `create_quest_rewards`: Add rewards to a quest
- `update_quest_reward`: Modify a quest reward
- `delete_quest_reward`: Remove a quest reward

### Reward Items

- `get_reward_items`: Retrieve reward item(s) with filtering
- `create_reward_item`: Create a new reward item (points, merchandise, etc.)
- `update_reward_item`: Modify an existing reward item
- `delete_reward_item`: Remove a reward item

### Reward Tables

- `get_reward_tables`: Retrieve reward table(s)
- `create_reward_table`: Create a new reward table configuration
- `update_reward_table`: Modify an existing reward table
- `delete_reward_table`: Remove a reward table

### Reward Table Entries

- `get_reward_table_entries`: Get entries (rules) for a reward table
- `create_reward_table_entry`: Add a reward rule to a table
- `update_reward_table_entry`: Modify a reward table entry
- `delete_reward_table_entry`: Remove a reward table entry

### Reward Actions

- `get_reward_actions`: Retrieve reward action(s)
- `create_reward_action`: Create a custom reward action
- `update_reward_action`: Modify an existing reward action
- `delete_reward_action`: Remove a reward action

### Reward Transactions

- `get_reward_transactions`: Retrieve reward transaction history

## Troubleshooting

### Common Issues

1. **Server Config Issues**

   - For windows platform, use below config, refer [related blog](https://apidog.com/blog/how-to-fix-cursor-ai-mcp-feature-client-closed-error/) for mode details.

   ```json
   {
     "command": "cmd.exe",
     "args": ["/c", "npx", "-y", "@livelike/mcp"],
     "env": {
       "LIVELIKE_CLIENT_ID": "your_client_id",
       "LIVELIKE_ACCESS_TOKEN": "your_access_token"
     }
   }
   ```

2. **Authentication Errors**

   - Verify `LIVELIKE_CLIENT_ID` and `LIVELIKE_ACCESS_TOKEN` are correct
   - Ensure the credentials have the necessary permissions

3. **Connection Issues**

   - Check if the LiveLike API is accessible from your network