Ticket MCP Server

Ticket MCP Server

Enables AI agents to manage a file-backed ticketing system directly within a local repository using a structured state machine and directory hierarchy. It enforces strict markdown schemas and provides specialized tools for claiming tasks, appending work logs, and validating ticket metadata.

Category
访问服务器

README

Ticket MCP Server

Local MCP server for the repo ticket system (file-backed).

Features

  • List/get/update/move/validate tickets in tickets/
  • Create new tickets with strict frontmatter validation
  • Agent helpers: tickets_next_id, tickets_claim, tickets_append_worklog, tickets_reconcile
  • Strict schema enforcement (rejects invalid writes)
  • HTTP MCP endpoint plus optional stdio proxy

Directory Structure & State Machine

The MCP server expects a tickets/ directory in the root of your project (configured via TICKET_ROOT), containing the following subfolders that directly map to the ticket's status field. The server will strictly enforce that tickets reside in the correct folder for their status:

  • tickets/pending/status: pending (Ready to be picked up)
  • tickets/in_progress/status: in_progress or status: blocked (Claimed and being worked)
  • tickets/awaiting_human_test/status: awaiting_human_test (AI work complete; needs human testing)
  • tickets/done/status: done (Human has verified and accepted)
  • tickets/archive/status: archived (Obsolete or old tickets)

Strict Markdown Validation

To prevent AIs from deleting context or inventing their own ticket formats, the MCP server enforces that all tickets contain specific markdown headers in their body. These headers will be automatically injected when creating a ticket via tickets_create.

Required body headers:

  • ## Overview
  • ## Approach (medium/high-level)
  • ## Tasks / Todos
  • ## Requirements (AI implementation)
  • ## Human Testing Steps
  • ## Key Files / Areas (notes)
  • ## Questions
  • ## Blockers
  • ## Implementation Notes

Usage

Build:

npm install
npm run build

Start HTTP server:

npm run start

Auto-rebuild on changes (dev watch):

npm run dev

Run integration tests:

npm run test

Start stdio proxy (for MCP clients expecting stdio):

npm run stdio

Auto-restart stdio proxy on changes:

npm run stdio:dev

Note: build output lands under dist/ticket-mcp/src/ because the build includes shared schema sources.

Configuration

  • TICKET_ROOT (default: repo root inferred from cwd)
  • TICKET_MCP_PORT (default: 3334)
  • TICKET_MCP_PATH (default: /mcp)
  • TICKET_STRICT (default: true)

tickets_stats response

The tickets_stats tool returns aggregate counts plus ticket numbering metadata:

{
  "status": {
    "pending": 12,
    "in_progress": 3,
    "done": 25
  },
  "area": {
    "tooling": 10,
    "combat": 8
  },
  "epic": {
    "none": 15,
    "qa": 4
  },
  "highest_ticket_number": 42,
  "next_ticket_number": 43
}
  • highest_ticket_number: highest numeric suffix parsed from existing ticket IDs (or 0 if none are numeric).
  • next_ticket_number: convenience value equal to highest_ticket_number + 1.

Agent helper tools

  • tickets_next_id

    • Returns highest_ticket_number, next_ticket_number, and suggested_id.
    • Optional args: prefix (default T), separator (default -), padding (default 3).
  • tickets_claim

    • Claims a pending ticket, moves it to in_progress, sets claim metadata, and appends a work_log entry.
    • Requires actor; accepts id or path.
  • tickets_append_worklog

    • Appends a validated work_log entry and updates updated_at.
    • Requires entry; accepts id or path.
  • tickets_reconcile

    • Audits ticket invariants and optionally applies safe fixes.
    • Optional apply_fixes: true will fix common metadata/date issues and folder/status mismatches when possible.

Recommended agent workflow

Use this sequence for normal implementation flow:

// 1) Allocate a canonical new id
const next = tickets_next_id({ prefix: "T", separator: "-", padding: 3 })

// 2) Create the ticket with suggested id
tickets_create({
  id: next.suggested_id,
  title: "Example ticket",
  area: "tools",
  epic: "none",
  intent: "Why this work matters",
  requirements: ["Requirement A"],
  human_testing_steps: ["Do X"],
  constraints: ["Constraint Y"],
  key_files: ["tools/ticket-mcp/src/server.ts"],
  status: "pending"
})

// 3) Claim when work starts
tickets_claim({
  id: next.suggested_id,
  actor: "worker-ai:example",
  summary: "Starting implementation"
})

// 4) Add progress notes during execution
tickets_append_worklog({
  id: next.suggested_id,
  entry: {
    actor: "worker-ai:example",
    kind: "change",
    summary: "Implemented the core logic"
  }
})

// 5) Validate and reconcile before handoff
tickets_validate({ id: next.suggested_id })
tickets_reconcile({ id: next.suggested_id }) // preview only

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选