AlexKurinets

Field Service MCP Demo — Development skill for Claude Code

Development community

Multi-tenant MCP server demo: split read/draft-only servers, tenant from a signed run token, Claude Code PreToolUse hook, approvals bound to the exact payload hash.

How to install Field Service MCP Demo

This entry records only its repository, not the path inside it, so there is no exact command to give. Open AlexKurinets/field-service-mcp-demo and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Field Service MCP Demo does

Multi-tenant MCP server demo: split read/draft-only servers, tenant from a signed run token, Claude Code PreToolUse hook, approvals bound to the exact payload hash. TypeScript, MCP SDK, 26 conformance tests.

Alternatives in Development

  • MCP Edit — tilth_write replaces the host Edit and Write tools 349 ★
  • Claude Code Permissions Hook — A PreToolUse hook for Claude Code for more granular permission controls 39 ★
  • Pursue — Hand Kimi an objective to pursue AUTONOMOUSLY across multiple turns (experimental goal mode), bounded by a har 39 ★

README

field-service-mcp-demo

**About this repo:** This is not the production server. It was written from scratch for this repository and contains no code, data, credentials or identifiers from the production system or the client it was built for. It reproduces that system's architecture and controls against a mock API so they can be run and tested in the open.

A runnable rebuild of the design behind a production ServiceTitan MCP server I built for a home services company running three regional brands. The production code isn't public, so this version runs against a small mock ServiceTitan-style API with fake data. It keeps the parts that matter: read tools and draft-only write tools in separate servers, the tenant taken from a signed run token instead of from tool arguments, a Claude Code PreToolUse hook that denies by default, and approvals bound to a hash of the exact payload. It is not affiliated with ServiceTitan.

npm install
npm test        # 26 conformance tests: transport, auth, tenant isolation, the gate, the hook, refresh, rate limits, webhooks
npm run demo    # narrated end-to-end run, about 2 seconds
npm run gateway # mock API on :7800, gateway on :7801, prints a run token per tenant for wiring into Claude Code

Node 22.13 or later (it uses the built-in `node:sqlite`). No external services.

Layout

scheduler ──run token (JWT: tenant, run id, tools)──▶ Claude Code run
                                                       │  PreToolUse hook (managed settings, read-only)
                                                       ▼
                                    gateway  /mcp/read     ──▶ read server   ──read-scoped token──▶ field-service API
                                             /mcp/drafts   ──▶ draft server  ──▶ drafts table (hash) ──▶ Slack approval
                                                                                                  │
                                    executor (write-scoped token, outside agent