Skip to main content
mcp-use is the fullstack MCP framework for TypeScript. Build MCP Servers, MCP Apps (interactive widgets that run inside ChatGPT and Claude), MCP Agents, and MCP Clients with end-to-end type safety.
import { MCPServer, widget } from "mcp-use/server";
import { z } from "zod";

const server = new MCPServer({
  name: "greeter",
  version: "1.0.0",
});

server.tool(
  {
    name: "greet",
    description: "Greet someone by name",
    schema: z.object({ name: z.string().describe("Who to greet") }),
    widget: { name: "greeting" },
  },
  async ({ name }) =>
    widget({
      props: { name },
      message: `Said hello to ${name}`,
    })
);

await server.listen(3000);
Looking for the Python docs? They’re here.

New to MCP?

Start with MCP 101 - principles of the protocol, its three primitives, and how clients, servers, and agents fit together.

Next Steps

Quickstart

Build your first MCP server in under 5 minutes.

Installation

Set up your Node project.

MCP Server

Expose tools, resources, and prompts to any AI agent.

MCP Apps

Build interactive widgets for Claude and ChatGPT.

MCP Client

Connect to any MCP server programmatically.

MCP Agent

AI agents with tool-calling capabilities.
Need help? Join our Discord or check out GitHub.