Skip to main content
Glama
TicketDesk MCP

TicketDesk MCP

by bhargavlukka

TicketDesk MCP — 프로덕션 스타일 MCP 서버 및 클라이언트

내부 지원 티켓 대기열을 노출하는 Model Context Protocol(MCP) 서버이며, 이 서버의 도구, 리소스, 프롬프트를 발견하고 호출하는 클라이언트와 함께 구성됩니다. "Build a Production MCP Server & Client" 랩(Module 4, Model Context Protocol)을 위해 제작되었습니다.

목차

Related MCP server: Ticket Queue MCP Server

아키텍처

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")]

전송 방식: Streamable HTTP — 자세한 근거는 docs/architecture.md 참조 (간단히 말하면, 이 서버는 stdio가 적합한 단일 로컬 프로세스 쌍이 아니라, 여러 팀의 AI 애플리케이션이 연결하는 공유된 내부 역량을 위한 것입니다.)

서버가 제공하는 기능

  • 도구 4개: search_tickets, get_ticket, add_ticket_note, close_ticket (마지막은 클라이언트 측 사용자 확인(elicitation)을 거쳐야 하는 고영향 작업)

  • 리소스 2개: ticket://{ticket_id} (템플릿) 및 policy://sla (정적)

  • 프롬프트 1개: triage_ticket

각 기능의 전체 문서: docs/tools-resources-prompts.md.

설정 및 데모 실행

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는 dev-agent-token(읽기 및 쓰기 스코프)으로 연결하고, 발견(discovery)을 실행하며, 도구/리소스/프롬프트를 각각 하나씩 호출합니다. 또한 두 가지 오류 처리 실패 모드(요구사항 8)를 시연하고, 클라이언트 측 사용자 확인(elicitation)을 통해 고위험 close_ticket 작업을 수행한 뒤(요구사항 6), 마지막으로 dev-readonly-token이 쓰기 스코프 도구에서 올바르게 거부되는 최소 권한 데모를 보여줍니다.

보안

자세한 내용은 docs/security-summary.md를 참조하세요. 간단히 요약하면: StaticTokenVerifier를 통한 bearer-token 인증, 도구별 명시적 스코프 검사(개발 중 발견되어 수정된 실제 격차 — 연결 수준의 스코프 요구만으로는 개별 도구 호출을 제한할 수 없음 — 이에 대한 솔직한 설명은 보안 문서에 있습니다), 그리고 ToolError와 mask_error_details=True를 사용해 사용자가 해결할 수 있는 오류와 클라이언트에 원문 그대로 전달되어서는 안 되는 내부 오류를 구분합니다.

요구사항 매핑

요구사항

충족 위치

도구 3개 이상

search_tickets, get_ticket, add_ticket_note, close_ticket (server.py)

리소스 2개 이상, 각각 URI

ticket://{ticket_id}, policy://sla (server.py)

재사용 가능한 프롬프트 1개 이상

triage_ticket (server.py)

클라이언트가 각각을 발견하고 호출

client.py의 run_discovery_and_demo()

전송 방식 선택 근거 제시

docs/architecture.md

클라이언트 측 안전 기능

클라이언트 측 사용자 확인(elicitation)으로 close_ticket을 통제 (client.py의 elicitation_handler)

보안 설계 요약

docs/security-summary.md

실제 실패 모드에 대한 오류 처리

유효하지 않은 티켓 ID(ToolError) + 시뮬레이션된 백엔드 저장소 장애(mask_error_details) — 둘 다 server.py에 있으며, client.py에서 시연

데모 로그

demo/session_log.txt (실제 캡처된 실행)

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
      A
      quality
      B
      maintenance
      Enables AI agents to perform helpdesk tasks over MCP, including ticket management, knowledge base search, and reply drafting, with optional pay-per-action USDC settlement and human approval workflows.
      23
      2
      MIT
    • F
      license
      Not graded
      quality
      D
      maintenance
      Enables AI clients to access and manage an internal support ticket queue through MCP tools, resources, and prompts, including searching and viewing tickets, adding comments, closing tickets with confirmation, reading knowledge base articles, and viewing queue summaries over OAuth-secured Streamable HTTP.
      -
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables AI assistants to query and operate a help desk and service desk through MCP over HTTP, including tickets, requester communications, internal notes, attachments, stage and SLA history, time entries, clients, requesters, desks, knowledge base, contracts, and billing/satisfaction reports.
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables AI assistants to find and read customer conversations, look up profiles, send replies, manage workspace metadata, and handle daily support workflows. It also supports triage, drafting, escalation, and handover tasks through MCP tools, prompts, and resources.
      45 npm
      1
      MIT