Skip to main content
Use this quickstart to scaffold a working TypeScript MCP server, run it locally, and verify it with the Inspector.
This quickstart covers the mcp-use Server SDK.Building an AI agent or MCP Client instead? Head to the MCP Agent or MCP Client introductions instead.

Prerequisites

  • Node.js 20.19+ or 22.12+
  • Basic familiarity with React and TypeScript

Create your server

Scaffold a new project:
The CLI asks four questions. The first needs an answer; the rest have a default you accept by pressing Enter.
  1. What is your project name? Sets the folder name and the server’s name. Enter . to scaffold into the current directory.
  2. Select a template: Pick one of the three below with the arrow keys. mcp-apps is highlighted by default.
  3. Install AI coding skills for Cursor, Claude Code, and Codex? Adds mcp-use skills so your coding agent understands the framework. Defaults to yes.
  4. Install dependencies? Installs with the package manager you ran the command with (npm, pnpm, or yarn). Defaults to yes.
To skip the questions, pass the name and template as arguments:

Start the dev server

npm run dev runs mcp-use dev, which:
  • serves the MCP endpoint at http://localhost:3000/mcp
  • opens the Inspector at http://localhost:3000/inspector
  • hot-reloads tools, resources, prompts, and widgets as you edit, with no restart and no dropped connections
Open the Inspector, go to the Tools tab, and run a tool to see it respond. With the mcp-apps template, calling search-tools renders the widget inline. You can also test the running server from the terminal with the mcp-use client CLI. This is the quickest path for scripts and coding agents, which can’t drive the Inspector’s UI:
The first command saves the server under the name local; later commands address it by that name. See the CLI client reference for the full command set.

Explore the project

index.ts is where you register your tools, resources, and prompts. Each folder under resources/ is a widget; its folder name matches the widget.name a tool references.

Add a tool

Open index.ts and add a tool to the existing server. text, widget, and z are already imported at the top of the file:
Instead of returning plain text, this tool returns a widget. widget.name (greeting-card) points at a folder under resources/, and widget({ props }) passes that data to the widget’s useWidget().props. The widget doesn’t exist yet, so build it next.

Add a widget

Create resources/greeting-card/widget.tsx. The folder name must match the tool’s widget.name:
Save the file. The dev server discovers the new widget and hot-reloads, so reload the Tools tab in the Inspector and call greeting-card with { name: "Ada", message: "Welcome aboard!" }. The card renders inline.
See Tools, Resources, and Prompts for the full API, and MCP Apps to build widgets.

Deploy to Manufact Cloud

When you’re ready to share your server, deploy it with one command:
This runs mcp-use deploy, which builds your server and deploys it to Manufact Cloud with a public MCP URL, logs, and metrics. The first run walks you through logging in and connecting your project.

Deployment guide

GitHub connection, environment variables, regions, and redeploys.

Next steps

MCP Server

Tools, resources, prompts, and server configuration.

MCP Apps

Build interactive widgets for ChatGPT and Claude.

Inspector

Test and debug your server interactively.

MCP 101

How clients, servers, and the three primitives fit together.
Need help? Join our Discord or check out GitHub.