# mcp-use

> Fullstack framework to build, test, and deploy MCP servers and MCP apps

- Category: Agents & Automation / Agent Frameworks & Builders
- Language: TypeScript
- Licence: MIT
- Repository: https://github.com/mcp-use/mcp-use
- Website: https://manufact.com
- Canonical page: https://ai-tldr.dev/tools/mcp-use/

## In short

mcp-use is a fullstack framework for the Model Context Protocol (MCP), the open standard that lets AI assistants like Claude and ChatGPT call external tools. With one SDK, available in both TypeScript and Python, you can define tools, build interactive widgets, and expose them to any MCP client. It sits in the Agent Frameworks & Builders category of the Agents & Automation tools and is open-source, written in TypeScript and licensed MIT.

## Overview

mcp-use is a fullstack framework for the Model Context Protocol (MCP), the open standard that lets AI assistants like Claude and ChatGPT call external tools. With one SDK, available in both TypeScript and Python, you can define tools, build interactive widgets, and expose them to any MCP client.

Beyond writing servers, mcp-use ships a built-in Inspector to test and debug your tools, a CLI to deploy to production, and a Python agent SDK for connecting models to MCP tools. Templates and a starter command help you get a working server running in minutes.

## What it does

- Define MCP tools in TypeScript or Python with typed input schemas (Zod or Pydantic)
- Build MCP Apps: React widgets that render inside Claude, ChatGPT, and other MCP clients
- Auto-discovered widgets placed in a resources/ folder need no manual registration
- Built-in Inspector to test and debug any MCP server interactively from the browser
- CLI to log in and deploy servers to production, with logs, metrics, and branch deployments
- Ready-to-use templates such as chart, diagram, slide deck, and map builders to remix

## Getting started

You can scaffold a new project, write a server by hand, or start with Python. The examples below come straight from the project README.

1. Scaffold a TypeScript project

   Use the starter command to create a ready-to-run MCP server or MCP app.

```bash
npx create-mcp-use-app@latest
```

2. Define a tool and start the server

   Create a server, register a tool with a typed schema, and start listening. The Inspector is served automatically.

```typescript
import { MCPServer, text } from "mcp-use/server";
import { z } from "zod";

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

server.tool({
  name: "get_weather",
  description: "Get weather for a city",
  schema: z.object({ city: z.string() }),
}, async ({ city }) => {
  return text(`Temperature: 72°F, Condition: sunny, City: ${city}`);
});

await server.listen(3000);
// Inspector at http://localhost:3000/inspector
```

3. Or build a server in Python

   Install the package and define tools with Pydantic-annotated arguments, then run over streamable HTTP.

```bash
pip install mcp-use
```

4. Deploy to production

   Log in and deploy your server with the mcp-use CLI, or connect a GitHub repo for managed hosting.

```bash
npx @mcp-use/cli login
npx @mcp-use/cli deploy
```

## When to use it

- Expose your own APIs and data as MCP tools so AI agents like Claude can call them
- Build interactive MCP App widgets that render once and run across Claude, ChatGPT, and other clients
- Test and debug MCP servers locally or online with the built-in Inspector before shipping
- Connect an AI model to MCP tools in Python using the agent SDK to automate tasks
