mcp-server-ts
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-server-ts convert 1735689600000 to UTC and local time"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
mcp-server-ts
A lab where I learn the Model Context Protocol by building an MCP server in TypeScript with the official SDK, one milestone at a time.
What this lab teaches
How MCP works on the wire: the initialize handshake, capabilities and JSON-RPC messages.
The three server primitives: tools, resources and prompts.
Transports: stdio for local clients, Streamable HTTP with sessions for remote ones.
Securing a remote server with bearer tokens and OAuth.
Designing a set of tools that work together, applied to exploring Kafka topics.
Testing the protocol contract and consuming the server from a TypeScript client.
Related MCP server: datetime-mcp
Architecture
// milestone 1: one process, one tool, stdio.
flowchart LR
host["MCP host<br/>(Inspector, Claude Desktop, IDE)"] -- "JSON-RPC over stdin/stdout" --> entry["serveStdio<br/>src/index.ts"]
entry -- "one instance per connection" --> server["createServer()<br/>src/server.ts"]
server --> tool["convert_epoch<br/>src/tools/convert-epoch.ts"]
entry -. "logs" .-> stderr[(stderr)]
style entry fill:#0a0a0b,stroke:#f4b740,color:#f4b740serveStdioanswers both the 2026-07-28 protocol (per-request version,server/discover) and legacy clients that open withinitialize.convert_epochturns a Unix timestamp in milliseconds into UTC and local time. Bad input comes back asisError: truewith a message written for the model.stdout only carries MCP messages; logs go to stderr.
Run it
Requires Node 24.22.1+ and pnpm through Corepack (corepack enable, or prefix commands with corepack).
pnpm install
pnpm test # vitest, an in-memory MCP client against the real server
pnpm inspect # build and open MCP Inspector against dist/index.jsTo use it from an MCP host, point the host at node /path/to/mcp-server-ts/dist/index.js after pnpm build.
Milestones
See ROADMAP.md.
Decisions
Architecture decision records live in docs/adr/.
License
Available Tools
1 toolconvert_epochConvert epochARead-only
Convert a Unix timestamp in milliseconds to ISO-8601 UTC and to local time in a given time zone.
Inputs: epochMs (required), timeZone.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 1 tool
With only one tool, there is no possibility of confusing it with another; convert_epoch has a single, unambiguous purpose (epoch milliseconds to ISO-8601 UTC and zoned local time). An agent cannot misselect here.
The lone name follows a clean verb_noun snake_case convention (convert_epoch) that would scale predictably if more tools were added. There are no competing conventions to clash.
A single tool is thin even for a narrow time-conversion server; the surface is barely scoped rather than well-scoped. It earns its place but leaves the server feeling like a one-off utility rather than a coherent toolkit.
The obvious inverse operation (ISO-8601 or local time back to epoch milliseconds) is missing, as is any batch or multi-timezone conversion, creating a dead end for round-trip workflows. Agents needing two-way conversion will have to fall back to other means.
Maintenance
Related MCP Connectors
Remote MCP for JSON repair, hashing, formatting, IDs, dates, units, and other small tools.
Remote MCP: JSON repair, JSON Schema validation, JSON to TypeScript, CSV to JSON and JSON to CSV.
Find the right MCP server for any job, plus real current time, page-to-markdown fetch and units.
Related MCP Servers
- FlicenseAqualityDmaintenanceA general-purpose MCP server providing time-related utilities such as fetching current time, Unix timestamps, and formatting services. It supports both local stdio and remote SSE communication modes for versatile AI client integration.3-
- AlicenseDqualityCmaintenanceA lightweight MCP server that provides date and time tools, including the ability to retrieve current timestamps and parse date strings with IANA timezone support. It enables AI models to interact with the host OS clock and perform temporal calculations via stdio transport.36 npm7MIT
- AlicenseNot gradedqualityCmaintenanceEnables developers to define and register MCP tools and expose them over stdio or HTTP using JSON-RPC 2.0, with schema validation and manifest discovery.MIT
- AlicenseBqualityBmaintenanceEnables MCP-compatible assistants to get the current time in a specified time zone and convert values between units over stdio, while serving as a starter for adding custom tools.2MIT