Requirements
FastMCP TypeScript runs on Node.js 22 or later. There is no browser support.Install the package
fastmcp CLI as a self-contained binary:
Schema library
Input and output schemas work with any Standard Schema-compatible validation library — Zod, Valibot, ArkType, and others. Most examples in these docs use Zod:Optional peer dependencies
The client’s sampling adapters forward LLM sampling requests to your AI provider. Each adapter requires its provider SDK, declared as an optional peer dependency — install only the one you use:| Adapter | Install |
|---|---|
AnthropicSamplingAdapter | npm install @anthropic-ai/sdk |
OpenAISamplingAdapter | npm install openai |
GoogleSamplingAdapter | npm install @google/genai |
import type, so there is no runtime cost or error unless you actually instantiate one.
Next steps
Quickstart
Build and run your first MCP server.