# Build an MCP Server That Triages Support Tickets and Drafts Quotes (No API Key, Zero Dependencies)

> Source: <https://dev.to/quietstacklab/build-an-mcp-server-that-triages-support-tickets-and-drafts-quotes-no-api-key-zero-dependencies-5g9m>
> Published: 2026-11-27 04:08:22+00:00

**Recommendation:** Move priority and pricing logic out of prompts into unit-tested MCP tools, and add one end-to-end stdio JSON-RPC test to catch client integration bugs.
More in the playbook "Designing agent systems": <https://wpnews.pro/playbooks/agent-architecture>

**Disclosure:** I sell a starter kit based on this pattern (linked at the end). Everything below works without buying it.

If you paste a ticket into a chat and ask "what priority is this?", you get a different answer every Monday. Support teams need **the same rule applied every time**, with an LLM handling the language parts: summarizing, drafting, translating.

The Model Context Protocol (MCP) lets you split those jobs cleanly:

| Tool | Input | Output | 
|---|---|---|
| `triage` | impact, workaround available? | priority, category, first-response target | 
| `quote` | line items in minor units, discount %, tax % | exact totals | 
| `draft_reply` | ticket + decision, `en` or`ko` | reply draft for human review | 
| `daily_summary` | tickets for a UTC day | Markdown + CSV by queue/priority/status | 

*(Tool names here are illustrative; adapt them to your own server.)*

Don't ask the model to "feel" urgency. Ask the customer (or the form) two things: *how bad is the impact?* and *is there a workaround?*

``` js
// priority.js — deterministic, testable
const MATRIX = {
  high:   { false: "P1", true: "P2" },
  medium: { false: "P2", true: "P3" },
  low:    { false: "P3", true: "P4" },
};
export function priority(impact, hasWorkaround) {
  const row = MATRIX[impact];
  if (!row) throw new Error(`unknown impact: ${impact}`);
  return row[String(Boolean(hasWorkaround))];
}
```

Four lines of table beat a paragraph of prompt engineering, and you can unit-test it.

Floating point will eventually produce a quote of `$1,049.9999999`. Keep amounts in minor units (cents, or KRW won), and apply the discount **before** tax:

```
// quote.js
export function quote(items, discountPct = 0, taxPct = 0) {
  const subtotal = items.reduce((s, i) => s + i.qty * i.unitMinor, 0);
  const discount = Math.round((subtotal * discountPct) / 100);
  const taxable  = subtotal - discount;
  const tax      = Math.round((taxable * taxPct) / 100);
  return { subtotal, discount, taxable, tax, total: taxable + tax };
}

quote([{ qty: 3, unitMinor: 25000 }], 10, 10);
// → { subtotal: 75000, discount: 7500, taxable: 67500, tax: 6750, total: 74250 }
```

The model never does arithmetic. It calls `quote` and quotes the result.

The reply tool returns text only. No SMTP, no auto-send. That keeps you out of spam territory and lets an agent check the recipient, the facts, and the terms. In regulated markets (e.g. Korea's commercial-messaging rules) this matters.

Any MCP client with local stdio support works:

```
{
  "mcpServers": {
    "support-quote": { "command": "node", "args": ["/absolute/path/to/server.js"] }
  }
}
```

Then, in the client:

"Triage today's tickets, quote ticket #12 for 3 seats at ₩25,000 with 10% off and 10% VAT, and draft a Korean reply."

Unit-test `priority` and `quote` directly, then add one end-to-end test that spawns the server, sends a JSON-RPC `tools/call`, and asserts the response. That single test catches 90% of "works in my editor, breaks in the client" bugs.

I packaged this pattern as **MCP Support & Quote Starter**: four tools, EN/KO replies, Markdown + CSV daily summaries, 14 automated tests including end-to-end stdio checks, and zero npm dependencies (Node 22+).

Lead-gen instead of support? The sibling kit scores and ranks inbound leads: [https://alborotar.github.io/mcp-automation-starter/](https://alborotar.github.io/mcp-automation-starter/)

Free companion tool: CSV ⇄ JSON ⇄ SQL ⇄ Markdown converter that runs entirely in your browser: [https://alborotar.github.io/data-swiss-army/](https://alborotar.github.io/data-swiss-army/)
