Skip to main content
Use the mcp-use TypeScript server framework when you want to build an MCP server with tools, resources, prompts, or interactive MCP App widgets. If you are starting from scratch, use the TypeScript quickstart to scaffold a server. Use Build your first MCP App when the server should return React widgets.

What mcp-use adds

  • One-command scaffolding: npx create-mcp-use-app creates a runnable server with scripts, TypeScript config, examples, and optional widgets.
  • Inspector-first development: npm run dev serves the MCP endpoint and Inspector so you can test tools, resources, prompts, and widgets locally.
  • Hot reload: tools, resources, prompts, and widgets update during development without restarting the server or dropping client sessions.
  • Typed server primitives: tools, prompts, and resource templates use Zod schemas for validation and TypeScript inference.
  • MCP Apps support: create interactive experiences in MCP Apps-compatible clients and ChatGPT.

Core server concepts

Server instance

Create one MCPServer instance in your entry file. It owns MCP registration, the Hono app, the HTTP transport, session handling, and local development routes.
instructions are returned during MCP initialization. Use them for server-wide workflow guidance that does not belong in a single tool description.

Tools

Tools are functions clients can invoke. Use tools for actions, lookups, and workflows.
Learn more in Tools.

Resources

Resources expose readable content by URI. Use resources for configuration, documents, generated data, or files that clients should inspect.
Learn more in Resources.

Prompts

Prompts are reusable templates for model interactions. Use prompts when you want clients to reuse a structured model instruction with typed arguments.
Learn more in Prompts.

MCP Apps

MCP Apps are React components rendered from MCP tool results. Put the component in resources/<widget-name>/widget.tsx, read data with useWidget(), and handle the initial loading state before reading props.
The recommended server pattern is to define a custom tool with a widget: { name } config and return widget({ props, output }) from the handler.
Learn more in MCP Apps and useWidget().

Local development loop

Run the dev server from a scaffolded project:
By default, local development gives you: Keep the Inspector open while editing index.ts and files under resources/. The dev server hot-reloads registrations and widget assets.

Next steps

TypeScript quickstart

Create and verify a TypeScript MCP server.

Tools

Build executable functions with parameters and validation.

Resources

Expose static and dynamic content by URI.

Prompts

Create reusable prompt templates.

MCP Apps

Return interactive React widgets from tools.

Configuration

Configure transport, sessions, middleware, CORS, and production settings.