Skip to main content
Glama
NKS osTicket MCP

NKS osTicket MCP

by nks-hub

NKS osTicket MCP

Version Node.js TypeScript MCP License: MIT

A Model Context Protocol server for osTicket. It lets AI agents such as Claude list, search, read, create, update, reply to and delete tickets, plus read stats, manage parent/child subtickets and download attachments.

It talks to the companion NKS osTicket API plugin, which exposes a single JSON endpoint inside osTicket.


Features

  • 🎫 Ticket CRUD - List, search, read, create, update and delete tickets from an AI agent

  • 💬 Replies and notes - Customer-facing replies (emailed) and internal notes, optionally posted as a specific agent (staffId) and with selectable recipients (replyTo)

  • 📊 Stats and statuses - Total, open, closed and overdue counts; list of all ticket statuses

  • 🌳 Subtickets - Link, unlink and browse parent/child tickets

  • 📎 Attachments - Attach local files to a reply; thread entries list their attachments and any of them downloads as base64

  • ⏱️ Error reporting - Requests time out after 30 s by default (504), network failures return 502, and API errors come back to the agent with osTicket's code and message; self-signed TLS can be allowed

  • 🧩 15 tools - One MCP server over stdio, configured by environment variables

Related MCP server: OTRS MCP Server

Requirements

  • Node.js 18 or later

  • The NKS osTicket API plugin installed on your osTicket instance

  • An osTicket API key (Admin → Manage → API Keys) with the permissions your tools need, bound to the source IP this server runs from

Installation

git clone https://github.com/nks-hub/nks-osticket-mcp.git
cd nks-osticket-mcp
npm install
npm run build

Configuration

Set via environment variables (see .env.example):

Variable

Required

Default

Description

NKS_OSTICKET_URL

yes

–

URL of the API entry, …/api/nks-osticket.php

NKS_OSTICKET_API_KEY

yes

–

osTicket API key

NKS_OSTICKET_TIMEOUT_MS

no

30000

Request timeout in ms

NKS_OSTICKET_REJECT_UNAUTHORIZED

no

true

false allows self-signed TLS

Usage

Claude Code / Claude Desktop

Add to your MCP server configuration:

{
  "mcpServers": {
    "osticket": {
      "command": "node",
      "args": ["/absolute/path/to/nks-osticket-mcp/dist/index.js"],
      "env": {
        "NKS_OSTICKET_URL": "https://support.example.com/api/nks-osticket.php",
        "NKS_OSTICKET_API_KEY": "your-api-key"
      }
    }
  }
}

Tools

Tool

Purpose

osticket_list_tickets

List tickets (filter by status/department, paginated)

osticket_search_tickets

Full-text search by subject

osticket_get_ticket

One ticket with full message thread

osticket_get_stats

Total / open / closed / overdue counts

osticket_list_statuses

All ticket statuses

osticket_create_ticket

Create a ticket

osticket_update_ticket

Change status / due date / topic, add internal note (optionally as agent staffId)

osticket_reply_ticket

Post a customer-facing reply (emailed; optional staffId, replyTo: all, user, collabs, and attachments)

osticket_assign_ticket

Assign a ticket to an agent (assigneeId; optional note, alert, staffId, reassign); needs plugin 1.4.0

osticket_delete_ticket

Delete a ticket (irreversible)

osticket_link_subticket

Link child under parent

osticket_unlink_subticket

Remove a child's parent link

osticket_get_children

List a parent's children

osticket_get_parent

Get a child's parent

osticket_download_attachment

Download an attachment (base64)

attachments on osticket_reply_ticket is a list of { "path": "C:/tmp/screenshot.jpg" }, optionally with name and type. The server reads each file from its own disk, guesses the MIME type from the extension (jpg, png, gif, webp, pdf, txt, otherwise application/octet-stream) and sends it base64-encoded. Attaching files needs plugin 1.3.0 or later; osTicket's maximum file size setting caps each file.

Development

npm run dev          # run from source with tsx
npm run type-check   # tsc --noEmit
npm run build        # compile to dist/
npm start            # run the compiled server

The project has no automated test suite yet; npm run type-check and npm run build are the checks. Changes are listed in CHANGELOG.md.

Contributing

Contributions are welcome! For major changes, please open an issue first.

  1. Fork the repository

  2. Create your feature branch (git checkout -b feature/amazing-feature)

  3. Commit your changes (git commit -m 'feat: description')

  4. Push to the branch (git push origin feature/amazing-feature)

  5. Open a Pull Request

Support

License

MIT License — see LICENSE for details.


Available Tools

15 tools
osticket_assign_ticketA

Assign a ticket to an agent, like the staff panel: logs the assignment, optionally posts an internal note and alerts the assignee. Fails (409) if the ticket already has an assignee, unless reassign is true.

Inputs: number (required), assigneeId (required), note, alert, +2 more.

osticket_create_ticketC

Create a new ticket. Requires subject and message.

Inputs: message (required), subject (required), name, email, +2 more.

osticket_delete_ticketB

Permanently delete a ticket and its thread. Irreversible.

Inputs: number (required).

osticket_download_attachmentA

Download a ticket attachment by its numeric file id (from a thread entry's attachments[].fileId in osticket_get_ticket), returned as base64.

Inputs: fileId (required).

osticket_get_childrenB

List all child tickets of a parent ticket.

Inputs: number (required).

osticket_get_parentA

Get the parent ticket of a child ticket (null if none).

Inputs: number (required).

osticket_get_statsA

Aggregate ticket statistics: total, open, closed, overdue.

Inputs: no named parameters.

osticket_get_ticketA

Get one ticket with full detail including the message thread. Each thread entry may include an "attachments" array (fileId, name, type, size, inline, cid); pass an attachment's numeric fileId to osticket_download_attachment. Provide number or id.

Inputs: id, number.

osticket_list_statusesA

List all ticket statuses with their canonical state.

Inputs: no named parameters.

osticket_list_ticketsA

List tickets, newest first. Filter by status (open/closed/resolved/archived or numeric id) and department. Paginated.

Inputs: sort, limit, offset, status, +1 more.

osticket_reply_ticketA

Post a customer-facing reply to a ticket. This is emailed to the ticket's user.

Inputs: number (required), response (required), alert, title, +3 more.

osticket_search_ticketsB

Full-text search tickets by subject. Optional status filter and pagination.

Inputs: query (required), sort, limit, offset, +1 more.

osticket_update_ticketA

Update a ticket: change status, set/clear due date, change help topic, and/or add an internal staff note.

Inputs: number (required), note, status, dueDate, +4 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.7/5.0

    Scored across 15 tools

    Disambiguation5/5

    Each tool has a distinct resource/action pairing: list vs. search differ by filtering vs. full-text, get vs. download differ by metadata vs. binary content, and create/update/reply/assign/delete are clearly separated ticket lifecycle operations. The subticket tools (link, unlink, get_children, get_parent) are also unambiguous in direction and purpose.

    Naming Consistency4/5

    All names use a consistent osticket_ prefix and snake_case verb_noun structure. Minor deviation: collections are usually introduced with list_ (list_tickets, list_statuses) but children use get_children, and get_parent/get_stats are noun-first rather than action-first.

    Tool Count5/5

    At 15 tools, the surface is well-scoped for an osTicket integration, covering listing, retrieval, creation, updates, replies, assignment, attachments, subtickets, stats, and statuses. Each tool appears to earn its place without redundant or filler operations.

    Completeness4/5

    Core ticket lifecycle coverage is strong: CRUD, customer replies, agent assignment, attachments, subticket relationships, and statistics are all present. Minor gaps remain around supporting metadata such as listing departments/help topics/agents and uploading attachments when creating or replying, which agents may need to work around.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers