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

14 tools
osticket_create_ticketC

Create a new ticket. Requires subject and message.

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

osticket_delete_ticketA

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_ticketsA

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

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

osticket_update_ticketB

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 14 tools

    Disambiguation5/5

    Each tool has a clearly distinct resource/action pairing: ticket CRUD, listing/searching, stats, statuses, replies, attachments, and parent/child linking are all separable. The closest overlap is list_tickets vs search_tickets, but their descriptions make the boundary clear.

    Naming Consistency5/5

    All tools use a consistent osticket_ prefix followed by a snake_case verb_noun pattern such as get_ticket, create_ticket, reply_ticket, and link_subticket. The naming is predictable throughout.

    Tool Count5/5

    Fourteen tools is well within the appropriate range for a ticket-management server. Each tool maps to a meaningful ticket operation without excessive surface area.

    Completeness4/5

    Core ticket lifecycle coverage is strong: create, read, update, delete, list, search, reply, stats, statuses, attachments, and parent/child linking are all present. Minor gaps include listing departments/help topics/agents, ticket assignment, and priority management, which agents may need for full osTicket workflows.

    Maintenance

    ActivityMaintained
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers