Skip to main content
Glama
Support Desk MCP Server

Support Desk MCP Server

by Laxman-1998

mcp-support-desk-server

An MCP server that lets an AI agent work a synthetic support desk (tickets, customers, refund requests), with the controls you would want before giving an agent access to a real business system:

  • Scoped permissions. The operator grants scopes when the server starts. The default is read-only.

  • PII masking. Customer emails are masked unless customers:pii is granted.

  • Draft-only and request-only writes. The server can save a reply draft and file a refund request; it cannot send an email or pay out money. A human approves outside the server.

  • Refund cap and duplicate guard enforced server-side, not left to the model.

  • Audit log of every call, including denied and rejected ones, with the actor and arguments.

  • Untrusted-content signalling. Ticket text is marked body_is_untrusted_customer_text in tool output and in tool descriptions. The data includes 8 deliberately hostile tickets (prompt injection, data exfiltration attempts) for red-team testing of agents.

All data is generated and fictional (example.com / example.net addresses). No real customer or employer data is involved.

Part of a set with safe-agent-runtime (an agent that uses this server) and llm-eval-observability.

Quick start

pip install -e ".[dev]"
supportdesk seed --db desk.db            # 60 customers, 408 tickets (400 normal + 8 hostile), seed=7
pytest -q                                # 11 tests, including a real stdio subprocess run
supportdesk serve --db desk.db           # stdio, read-only grant
supportdesk serve --db desk.db --actor triage-bot \
  --scopes tickets:read,customers:read,tickets:write,refunds:write
supportdesk audit --db desk.db --limit 20

Use it from an MCP host (for example Claude Desktop or Claude Code) by registering the command supportdesk serve --db /path/desk.db --scopes ... as a stdio server.

Related MCP server: helpdesk

Tools

Tool

Scope

Effect

search_tickets

tickets:read

Word search on subject and body, filters, max 50 results

get_ticket

tickets:read

Ticket plus internal notes, body truncated to 2000 characters

get_customer

customers:read

Profile, email masked unless customers:pii

add_internal_note

tickets:write

Adds a note invisible to the customer

draft_reply

tickets:write

Saves a draft only; nothing is sent

update_ticket_status

tickets:write

open, pending, resolved or closed

request_refund

refunds:write

Creates a pending_approval request, capped (default 200), one pending per ticket

Also exposed: the supportdesk://schema resource and a triage_ticket prompt that tells the model to treat ticket text as data and to flag injection attempts.

Read tools carry the MCP readOnlyHint annotation, and write tools do not, so hosts can show the right approval UI.

What this does and does not protect against

The server enforces limits that do not depend on the model behaving well: scopes, caps, masking, draft-only writes, an audit trail, parameterised SQL and escaped LIKE wildcards. See docs/threat-model.md for the mapping to the OWASP Top 10 for LLM Applications.

It cannot stop a model from being talked into calling a permitted tool, for example adding a misleading note or filing a small refund request. That defence belongs to the agent runtime (approval gates, injection screening, budgets) and is the subject of safe-agent-runtime.

Design decisions

  • Grant at launch, not per call. MCP over stdio has no login step, so the operator who starts the process picks the scopes. For a remote deployment the same Principal would come from a verified token.

  • Requests, not actions, for money. An agent that can file a request is useful; one that can pay is a liability.

  • Synthetic and seeded. Same seed, same data, so evals are repeatable.

  • Tests go through the real MCP protocol using the in-memory client, plus one test that launches the actual CLI over stdio.

Limits

  • SQLite and a single process; not built for concurrent production traffic.

  • Search is substring matching, not full-text or semantic.

  • Written against MCP Python SDK 2.x (MCPServer); version 1.x used a different class name.

MIT licensed.

Tool Schema Changelog

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

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Exposes read-only knowledge base articles on returns, warranty and shipping policies alongside tools that search, retrieve and create real support tickets. This lets an LLM agent ground its answers in store policy without inventing information, and act on actual ticket data rather than simulated records.
      MIT
    • A
      license
      A
      quality
      C
      maintenance
      Enables AI assistants and signed-in support staff to search and read customer tickets, add internal notes, issue refunds under per-scope and per-customer limits, and export ticket data over a remote, OAuth-protected Streamable HTTP endpoint. Tool lists, resources, prompts, and write operations are gated by bearer tokens and audience-bound scopes so that refund and export actions stay bounded.
      6
      1
      MIT
    • A
      license
      A
      quality
      C
      maintenance
      Enables AI agents and IDE clients to query CRM case, customer, and order data and to perform guarded actions such as issuing refunds, updating cases, and drafting customer emails.
      6
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables support agents to inspect synthetic payment transactions, customers, decline explanations, approval queues, and audit logs, and to open disputes or create refund requests. All writes are idempotent, guarded against prompt injection, auditable, and refunds require signed human approval before execution.
      Apache 2.0