Repo: github.com/midimurphdesigns/fieldops-mcp
Live showcase: fieldops-mcp.kevinmurphywebdev.com
Read the full story: Building fieldops-mcp
A Model Context Protocol server that exposes a small-business field-services dispatcher workflow as agent tools an LLM client can drive end-to-end. 6 tools, 6 structurally distinct shapes — read, search-and-rank, mutation with typed errors, composition, aggregation, and human escalation. The interesting work isn't the plumbing; it's choosing which tools to expose at all.
How it's built
Bun + TypeScript strict, MCP TypeScript SDK, Zod-validated tool inputs, typed error envelopes (NotFoundError, ConflictError, ValidationError → ToolError). Each tool unlocks a different capability: find_available_techs is search-and-rank with a join the model would otherwise do badly by hand; assign_job is mutation with typed conflict errors so the model has to read failures it would otherwise ignore; draft_customer_message is composition that pulls real customer + tech + job data into a draft (and deliberately does not send); flag_for_human is constructive refusal as a tool, queue-routable instead of swallowed in chat.
Artifacts worth reading
- The tool registry that wires the six tools to the MCP server
- The conflict-error path for mutation tools — the part most agent integrations get wrong
- The captured Claude transcripts showing the six tools in real end-to-end flow
The trade-offs
Tool-surface design is the part of agent engineering most projects skip. It's also the part that decides whether the agent is a feature you can ship or a feature you can demo. fieldops-mcp is the smallest server that demonstrates the discipline.