TicketDesk MCP

TicketDesk MCP

Enables AI assistants to search and retrieve support tickets, add notes, close tickets, and access SLA policies through MCP tools, resources, and prompts over Streamable HTTP.

Category
Visit Server

README

TicketDesk MCP — Production-Style MCP Server & Client

A Model Context Protocol (MCP) server exposing an internal support-ticket queue, paired with a client that discovers and invokes its tools, resources, and prompts. Built for the "Build a Production MCP Server & Client" lab (Module 4, Model Context Protocol).

Contents

Architecture

flowchart TD
    HOST["Host application\n(e.g. an AI assistant / chatbot)"] --> CLIENT

    subgraph Client["client.py — fastmcp.Client"]
        CLIENT["Discovery: list_tools / list_resources /\nlist_resource_templates / list_prompts"]
        ELICIT["elicitation_handler\n(client-side safety gate for\nhigh-impact actions)"]
        CLIENT <--> ELICIT
    end

    CLIENT <-->|"Streamable HTTP\nAuthorization: Bearer <token>"| SERVER

    subgraph Server["server.py — FastMCP('TicketDesk')"]
        AUTH["StaticTokenVerifier\n(read:tickets / write:tickets scopes)"]
        TOOLS["Tools: search_tickets, get_ticket,\nadd_ticket_note, close_ticket"]
        RES["Resources: ticket://{ticket_id},\npolicy://sla"]
        PROMPT["Prompt: triage_ticket"]
        AUTH --> TOOLS
        AUTH --> RES
        AUTH --> PROMPT
    end

    SERVER --> DATA[("data/tickets.json,\ndata/sla_policy.md")]

Transport: Streamable HTTP — justified in docs/architecture.md (short version: this is meant to be a shared internal capability multiple teams' AI applications connect to, not a single local process pair, which is what stdio is suited for).

What the server exposes

  • 4 tools: search_tickets, get_ticket, add_ticket_note, close_ticket (the last is a high-impact action gated by client-side elicitation)
  • 2 resources: ticket://{ticket_id} (templated) and policy://sla (static)
  • 1 prompt: triage_ticket

Full documentation of each: docs/tools-resources-prompts.md.

Setup & running the demo

pip install -r requirements.txt

# Terminal 1
python server.py

# Terminal 2
python client.py                # interactive: real confirmation prompts via input()
python client.py --auto-confirm # non-interactive demo mode (used to produce demo/session_log.txt)

client.py connects with dev-agent-token (read + write scopes), runs discovery, invokes one of each tool/resource/prompt, demonstrates both error-handling failure modes (Requirement 8), performs the high-impact close_ticket action through client-side elicitation (Requirement 6), and finishes with a least-privilege demo showing dev-readonly-token correctly rejected from a write-scoped tool.

Security

Full write-up: docs/security-summary.md. Short version: bearer-token auth via StaticTokenVerifier, explicit per-tool scope checks (a real gap — connection-level scope requirements alone do not restrict individual tool calls — was found and fixed during development; see the security doc for the honest account), and ToolError + mask_error_details=True to distinguish user-actionable errors from internal failures that must never reach the client verbatim.

Requirements mapping

Requirement Where it's satisfied
≥3 tools search_tickets, get_ticket, add_ticket_note, close_ticket (server.py)
≥2 resources, each a URI ticket://{ticket_id}, policy://sla (server.py)
≥1 reusable prompt triage_ticket (server.py)
Client discovers + invokes each client.py run_discovery_and_demo()
Transport choice justified docs/architecture.md
Client-side safety feature Elicitation gating close_ticket (client.py elicitation_handler)
Security design summary docs/security-summary.md
Error handling for a realistic failure mode Invalid ticket ID (ToolError) + simulated backing-store outage (mask_error_details) — both in server.py, demonstrated in client.py
Demonstration logs demo/session_log.txt (real captured run)

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured