Overview
In this quickstart, we’ll build a simple MCP server that says hello to users. We’ll use the official TypeScript MCP SDK with the Smithery CLI. By the end, you’ll have a live, deployed server with built-in authentication that you can connect to from any MCP client. For Python, check out our Python quickstart guide.Prerequisites
- Node.js >18 (includes npm)
- A Smithery API key for development features
1. Initialize the Server
The scaffold installs everything you need, including:
@smithery/cli
as a dev dependency (npm run dev
/npm run build
use the local CLI)@modelcontextprotocol/sdk
and@smithery/sdk
as runtime dependencies
2. Edit the Server
Insrc/index.ts
, you’ll see a default server that says hello to a given name. Edit it to add your own tools, resources, and prompts.
Here’s the basic structure:
Adding config schema (optional)Smithery allows users to customize server behavior for each session by providing API keys, adjusting settings, or modifying operational parameters. Optionally export a
configSchema
using Zod to define what configuration your server accepts: