> ## Documentation Index
> Fetch the complete documentation index at: https://fastmcp-ts.docs.prefect.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Welcome to FastMCP TypeScript

> The TypeScript framework for building MCP servers, clients, and apps

FastMCP TypeScript is the TypeScript framework for building [Model Context Protocol](https://modelcontextprotocol.io) servers, clients, and apps. It is the official TypeScript counterpart to [FastMCP for Python](https://github.com/PrefectHQ/fastmcp) — built and maintained by the same team at [Prefect](https://www.prefect.io).

Built on version 2 of the official [MCP TypeScript SDK](https://github.com/modelcontextprotocol/typescript-sdk) — the scoped `@modelcontextprotocol/server` and `@modelcontextprotocol/client` packages — FastMCP handles the protocol plumbing so you can focus on what your server actually does.

FastMCP 1.0 speaks both MCP protocol generations: the 2025 legacy era and the 2026-07-28 modern era. A server serves both at once, and a client negotiates one. [Protocol eras](/concepts/protocol-eras) installs that model, and every concept page builds on it.

```typescript theme={null}
import { FastMCP } from '@prefecthq/fastmcp-ts/server'
import { z } from 'zod'

const server = new FastMCP({ name: 'my-server', version: '1.0.0' })

server.tool(
  {
    name: 'add',
    description: 'Add two numbers',
    input: z.object({ a: z.number(), b: z.number() }),
  },
  ({ a, b }) => a + b
)

await server.run()
```

## The three pillars

<CardGroup cols={3}>
  <Card title="Servers" icon="server" href="/servers/tools">
    Turn TypeScript functions into MCP tools, resources, and prompts — with middleware, auth, and composition.
  </Card>

  <Card title="Clients" icon="plug" href="/clients/client">
    Connect to one or many MCP servers, call tools, and wire LLM sampling to Anthropic, OpenAI, or Google with one line.
  </Card>

  <Card title="Apps" icon="window" href="/apps/overview">
    Build interactive UIs rendered directly in MCP host conversations using a server-side component library.
  </Card>
</CardGroup>

## Get going

<CardGroup cols={2}>
  <Card title="Quickstart" icon="rocket" href="/quickstart">
    Build, run, and call your first MCP server in a few minutes.
  </Card>

  <Card title="CLI" icon="terminal" href="/cli">
    Run, inspect, call, and install servers from the command line with `fastmcp`.
  </Card>
</CardGroup>

## Ecosystem

| Package                                                                                      | Role                                                                                       |
| -------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------ |
| [`@modelcontextprotocol/server`](https://www.npmjs.com/package/@modelcontextprotocol/server) | Official MCP TypeScript SDK v2 — the server-side protocol implementation FastMCP builds on |
| [`@modelcontextprotocol/client`](https://www.npmjs.com/package/@modelcontextprotocol/client) | Official MCP TypeScript SDK v2 — the client-side protocol implementation FastMCP builds on |
| [`fastmcp` (PyPI)](https://github.com/PrefectHQ/fastmcp)                                     | The Python original this project models its API after                                      |
| [`@modelcontextprotocol/ext-apps`](https://github.com/modelcontextprotocol/ext-apps)         | Official MCP Apps extension — foundation for the Apps pillar                               |
