Skip to main content
In a few minutes you’ll have an MCP server with a tool, a resource, and a prompt — running locally and answering calls from a client.

Install

Create a server

A FastMCP server turns plain TypeScript functions into MCP components. Input schemas are inferred from any Standard Schema-compatible library (Zod, Valibot, ArkType, …) and your handler’s argument types follow automatically. Create server.ts:
server.ts

Run it

Use the bundled CLI to start the server. It runs TypeScript directly — no build step:
To poke at it interactively, open the MCP Inspector UI with file-watch reload:
Or inspect its components straight from the terminal:

Call it from a client

With the server running over HTTP, connect with the Client class:
client.ts

Where to next

Tools

Schemas, return-value conversion, and the full tool config surface.

Resources

Static resources, URI templates, and subscriptions.

Clients

Lifecycle, error handling, and multi-server connections.

CLI

Every fastmcp command, including editor installs.