Case study · TypeScript + MCP

Giving Claude real tools.

An open-source Model Context Protocol server that hands Claude live executive-assistant functions. It answers timezone and scheduling questions by running code, not by guessing.

The problem

A language model is confident and often wrong about the small factual things an assistant lives on. Ask it what time it is in Berlin right now, or when a Cape Town and a New York calendar actually overlap, and it will produce a plausible answer with no way to know if it is correct. For scheduling across an executive's timezones, plausible is not good enough.

The Model Context Protocol is the fix. It is the standard way to hand a model real tools: functions it can call, with typed inputs and real answers. So instead of asking Claude to reason about time, I gave it the ability to compute it.

What I built

A single-file MCP server in TypeScript that exposes two tools:

Claude reads each tool's description to decide when to call it. When I ask it to schedule a call between Berlin and New York, it reaches for working_hours_overlap on its own and answers from my code.

The engineering, not the prompt

The point of this build was to work below the layer I usually work at. Three decisions carry it:

Inputs are validated before logic runs. Failures return a clean message instead of crashing the server. And all logging goes to stderr, because stdout carries the protocol itself. Print to the wrong stream and you corrupt the channel.

None of that is visible when the tool works. It is the difference between a demo and something you would let an assistant rely on.

What it returns

working_hours_overlap · Europe/Berlin + America/New_York

Overlapping working hours (9:00-17:00 local) for Europe/Berlin, America/New_York: 13:00 UTC (Berlin 15:00, New_York 09:00) 14:00 UTC (Berlin 16:00, New_York 10:00)

When two zones can never align a normal workday, it says so plainly rather than inventing a slot.

Outcome

3 tools
time, overlap, and .ics calendar holds, all zod-validated
Open source
published public on GitHub, installable by anyone
0 keys
no external services, no API keys, no data files to keep current
TypeScript
typed inputs, graceful errors, single-file server

This is me moving from wiring tools together to building them. The next tools an assistant reaches for, a free-slot finder and a meeting brief, follow the same shape.