Build an MCP Server That Triages Support Tickets and Drafts Quotes (No API Key, Zero Dependencies)
Disclosure: I sell a starter kit based on this pattern (linked at the end). Everything below works without buying it. Why an MCP server, not "just a prompt"? If you paste a ticket into a chat and ask "what p
Disclosure: I sell a starter kit based on this pattern (linked at the end). Everything below works without buying it.
Why an MCP server, not "just a prompt"?
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:
- Deterministic tools (your code): priority, quote math, daily summaries.
- The model (any MCP client): decides when to call which tool and drafts the human-readable reply.
The four tools
| 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.)
Rule 1: priority from two honest questions
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?
// 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.
Rule 2: money is integers
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.
Rule 3: the model drafts, a human sends
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.
Wiring it to a client
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."
Testing over stdio
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.
Want the finished version?
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+).
- Repo & details: https://github.com/alborotar/mcp-support-quote-starter
- Starter $49 / Pro $149 β purchase & custom-setup inquiry on the repo page above
Lead-gen instead of support? The sibling kit scores and ranks inbound leads: 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/
Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes β full credit and traffic to the original publisher.