npm package: @plugix/mcp-zendesk
Description: MCP Server for Zendesk - Ticket Management, Knowledge Base, Support Automation
Author: Plugix
Latest version: 0.1.0

# Zendesk MCP Server

MCP server for Zendesk support ticket management and automation.

## Features

- **get_ticket** - Get ticket with full history
- **get_tickets** - Search and list tickets
- **search_kb** - Search Knowledge Base
- **respond_ticket** - Send response (with confirmation)
- **classify_ticket** - Add tags/priority
- **escalate_ticket** - Escalate to higher tier (with confirmation)

## Installation

```bash
npm install
cp .env.example .env
```

## Configuration

Edit `.env`:

```env
# AI Integration API
API_URL=wss://api.ai-integration.com
API_TOKEN=sk_live_your_token_here

# Zendesk credentials
ZENDESK_SUBDOMAIN=yourcompany
ZENDESK_EMAIL=admin@yourcompany.com
ZENDESK_API_TOKEN=your_zendesk_api_token
```

To get a Zendesk API token:
1. Go to Admin > Channels > API
2. Enable Token Access
3. Create new token

## Usage

### Development

```bash
npm run dev
```

### Production

```bash
npm run build
npm start
```

### Docker

```bash
docker build -t mcp-zendesk .
docker run --env-file .env mcp-zendesk
```

## Tools Reference

### get_ticket

Get a single ticket with full comment history.

**Parameters:**
| Name | Type | Required | Description |
|------|------|----------|-------------|
| ticketId | number | Yes | The ticket ID |

**Example:**
```json
{
  "name": "get_ticket",
  "arguments": {
    "ticketId": 12345
  }
}
```

### get_tickets

Search and list tickets with filters.

**Parameters:**
| Name | Type | Description |
|------|------|-------------|
| status | string | Filter: new, open, pending, hold, solved |
| priority | string | Filter: low, normal, high, urgent |
| limit | number | Max results (default: 25) |

**Example:**
```json
{
  "name": "get_tickets",
  "arguments": {
    "status": "open",
    "priority": "high",
    "limit": 10
  }
}
```

### search_kb

Search the Knowledge Base for relevant articles.

**Parameters:**
| Name | Type | Required | Description |
|------|------|----------|-------------|
| query | string | Yes | Search query |
| limit | number | No | Max results (default: 10) |

**Example:**
```json
{
  "name": "search_kb",
  "arguments": {
    "query": "password reset",
    "limit": 5
  }
}
```

### respond_ticket

Send a response to a ticket. Requires confirmation.

**Parameters:**
| Name | Type | Required | Description |
|------|------|----------|-------------|
| ticketId | number | Yes | The ticket ID |
| body | string | Yes | Response message |
| public | boolean | No | Visible to requester (default: true) |
| status | string | No | New status: open, pending, solved |
| confirmed | boolean | Yes | Must be `true` to send |

**Example:**
```json
{
  "name": "respond_ticket",
  "arguments": {
    "ticketId": 12345,
    "body": "Thank you for contacting us...",
    "status": "pending",
    "confirmed": true
  }
}
```

### classify_ticket

Classify a ticket by adding tags or changing priority.

**Parameters:**
| Name | Type | Required | Description |
|------|------|----------|-------------|
| ticketId | number | Yes | The ticket ID |
| tags | array | No | Tags to add |
| priority | string | No | New priority |
| groupId | number | No | Assign to group |

### escalate_ticket

Escalate a ticket to a higher-tier support group. Requires confirmation.

**Parameters:**
| Name | Type | Required | Description |
|------|------|----------|-------------|
| ticketId | number | Yes | The ticket ID |
| groupId | number | Yes | Target group ID |
| note | string | No | Internal escalation note |
| confirmed | boolean | Yes | Must be `true` to escalate |

## API Permissions

Required Zendesk API permissions:
- Tickets: read, write
- Users: read
- Search: read
- Help Center: read (for KB search)

## Testing

```bash
npm test
```

## License

MIT