Module 1 — Your First Server (Zero to Working Tool)

By — 7+ years building ML / AI agent systems, founder of agent-engineering.dev & sandx.ai.
Published: Last updated:
mcp serverfirst mcp servermcp tool registrationzod input schemamcp inspector testing

Project setup (npm init, ESM, @modelcontextprotocol/server + Zod)

McpServer + registerTool with Zod inputSchema

Factory pattern + serveStdio

Error handling basics (isError: true)

Testing with MCP Inspector

Connecting to real hosts (VS Code / Claude Code / Cursor)

Official anchors: First server guide, Tools guide
Outcome: A weather-style or catalog tool that works end-to-end.

Get new posts by Nelson Lin

Subscribe to receive email notifications when a new article is published.