
Security News
CVE Volume Surges Past 48,000 in 2025 as WordPress Plugin Ecosystem Drives Growth
CVE disclosures hit a record 48,185 in 2025, driven largely by vulnerabilities in third-party WordPress plugins.
@mcp-use/cli
Advanced tools
The mcp-use CLI is a tool for building and deploying MCP servers with support for ChatGPT Apps, Code Mode, OAuth, Notifications, Sampling, Observability and more.
š ļø mcp-use CLI is a powerful build and development tool for creating MCP (Model Context Protocol) applications with integrated UI widgets. It enables developers to build MCP servers with custom React components that can be served alongside their MCP tools, providing rich visual interfaces for AI interactions.
| Package | Description | Version |
|---|---|---|
| mcp-use | Core MCP framework | |
| @mcp-use/inspector | Web-based MCP inspector | |
| create-mcp-use-app | Create MCP apps |
| Feature | Description |
|---|---|
| š Auto Inspector | Automatically opens the MCP Inspector in your browser when development server starts |
| ā»ļø Hot Reload | Development mode with automatic reloading for both server code and UI widgets |
| šØ Widget Builder | Compiles React components into standalone HTML pages with all dependencies bundled |
| š¦ Production Ready | Optimized production builds with hashed assets for caching |
| š ļø TypeScript First | Full TypeScript support with watch mode compilation |
| š„ļø Multi-Environment | Separate commands for development, build, and production deployment |
# Install globally
npm install -g @mcp-use/cli
# Or use with npx (no installation needed)
npx @mcp-use/cli dev
# Install as a project dependency
npm install --save-dev @mcp-use/cli
Start a development server with hot reload, automatic TypeScript compilation, and auto-opening inspector:
mcp-use dev [options]
What happens in dev mode:
http://localhost:3000/inspectorhttp://localhost:3000/mcpOptions:
-p, --path <path> - Project directory (default: current directory)--port <port> - Server port (default: 3000)--no-open - Don't auto-open inspector in browserBuild your MCP application for production deployment:
mcp-use build [options]
What happens during build:
.tsx files in resources/ are bundled as standalone HTML pagesOptions:
-p, --path <path> - Project directory (default: current directory)Start the production server from built files:
mcp-use start [options]
Options:
-p, --path <path> - Project directory (default: current directory)--port <port> - Server port (default: 3000)Deploy your MCP server to mcp-use cloud:
# Login to mcp-use cloud
mcp-use login
# Check authentication status
mcp-use whoami
# Deploy your MCP server
mcp-use deploy [options]
# Logout
mcp-use logout
Deploy Options:
--name <name> - Custom deployment name--port <port> - Server port (default: 3000)--runtime <runtime> - Runtime environment: "node" or "python"--open - Open deployment in browser after successExample:
# Basic deployment
mcp-use deploy
# Deploy with custom options
mcp-use deploy --name my-server --port 8000 --open
See ENVIRONMENT.md for configuration options.
# Create a new MCP app (using create-mcp-use-app)
npx create-mcp-use-app my-mcp-server
# Navigate to project
cd my-mcp-server
# Start development with auto-reload and inspector
mcp-use dev
# Browser automatically opens to http://localhost:3000/inspector
# Development on port 8080
mcp-use dev --port 8080
# Production on port 8080
mcp-use build
mcp-use start --port 8080
# Specify custom project path
mcp-use dev -p ./my-app
mcp-use build -p ./my-app
mcp-use start -p ./my-app
# Development without auto-opening browser
mcp-use dev --no-open
# In your CI/CD pipeline
npm install
npm run build # Uses mcp-use build
npm run start # Uses mcp-use start
# Or with PM2 for production
npm run build
pm2 start "mcp-use start" --name my-mcp-server
The CLI expects the following project structure:
my-mcp-app/
āāā package.json
āāā tsconfig.json
āāā src/
ā āāā index.ts # Your MCP server entry point
āāā resources/ # UI widgets (React components)
ā āāā todo-list.tsx # Becomes /widgets/todo-list/index.html
ā āāā dashboard.tsx # Becomes /widgets/dashboard/index.html
āāā dist/ # Build output
āāā index.js # Compiled server
āāā resources/
āāā mcp-use/
āāā widgets/
āāā todo-list/
ā āāā index.html
ā āāā assets/
ā āāā index-[hash].js
āāā dashboard/
āāā index.html
āāā assets/
āāā index-[hash].js
UI widgets are React components that get compiled into standalone HTML pages. They can interact with your MCP server tools using the useMcp hook:
// resources/task-manager.tsx
import React, { useState, useEffect } from 'react'
import { useMcp } from 'mcp-use/react'
export default function TaskManager() {
const { callTool, status, error } = useMcp()
const [tasks, setTasks] = useState([])
const [newTask, setNewTask] = useState('')
useEffect(() => {
loadTasks()
}, [])
const loadTasks = async () => {
const result = await callTool('list_tasks')
setTasks(result.tasks)
}
const addTask = async () => {
if (!newTask.trim()) return
await callTool('create_task', {
title: newTask,
status: 'pending',
})
setNewTask('')
await loadTasks()
}
if (status === 'connecting') return <div>Connecting...</div>
if (error) return <div>Error: {error.message}</div>
return (
<div className="p-4">
<h1 className="text-2xl font-bold mb-4">Task Manager</h1>
<div className="flex gap-2 mb-4">
<input
type="text"
value={newTask}
onChange={(e) => setNewTask(e.target.value)}
placeholder="Add a new task..."
className="flex-1 p-2 border rounded"
/>
<button
onClick={addTask}
className="px-4 py-2 bg-blue-500 text-white rounded"
>
Add Task
</button>
</div>
<ul className="space-y-2">
{tasks.map((task) => (
<li key={task.id} className="p-2 border rounded">
{task.title}
</li>
))}
</ul>
</div>
)
}
This widget will be available at http://localhost:3000/widgets/task-manager after building.
Ensure your tsconfig.json includes:
{
"compilerOptions": {
"target": "ES2020",
"module": "ESNext",
"jsx": "react-jsx",
"esModuleInterop": true,
"skipLibCheck": true,
"strict": true,
"outDir": "./dist",
"rootDir": "./src"
},
"include": ["src/**/*", "resources/**/*"]
}
Add these scripts for convenience:
{
"scripts": {
"dev": "mcp-use dev",
"build": "mcp-use build",
"start": "mcp-use start",
"serve": "npm run build && npm run start"
}
}
# Custom port via environment variable
PORT=8080 mcp-use dev
# Production build with custom output
BUILD_DIR=./build mcp-use build
# Custom MCP URL for widget asset paths
MCP_URL=https://myserver.com mcp-use build
For deploying to mcp-use cloud, see ENVIRONMENT.md for detailed configuration:
# Frontend URL (where /auth/cli page is)
MCP_WEB_URL=https://mcp-use.com
# Backend API URL (where /api/v1 endpoints are)
MCP_API_URL=https://cloud.mcp-use.com
# Example: Local development
export MCP_WEB_URL=http://localhost:3000
export MCP_API_URL=http://localhost:8000
mcp-use login
mcp-use deploy
See ENVIRONMENT.md for more examples and configuration options.
# Dockerfile
FROM node:20-alpine
WORKDIR /app
COPY package*.json ./
RUN npm ci --production
COPY . .
RUN npm run build
EXPOSE 3000
CMD ["npm", "start"]
If you have an existing Express app, you can mount the built widgets:
import express from 'express'
import path from 'path'
const app = express()
// Serve MCP widgets
app.use(
'/widgets',
express.static(path.join(__dirname, '../dist/resources/mcp-use/widgets'))
)
// Your other routes...
Port already in use:
# Use a different port
mcp-use dev --port 3001
TypeScript compilation errors:
# Check your tsconfig.json
# Ensure all dependencies are installed
npm install
Widgets not loading:
.tsx files are in the resources/ directorydist/resources/mcp-use/widgets/Inspector not opening:
# Manually open http://localhost:3000/inspector
# Or disable auto-open
mcp-use dev --no-open
MIT Ā© mcp-use
FAQs
The mcp-use CLI is a tool for building and deploying MCP servers with support for ChatGPT Apps, Code Mode, OAuth, Notifications, Sampling, Observability and more.
We found that @mcp-use/cli demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago.Ā It has 3 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
CVE disclosures hit a record 48,185 in 2025, driven largely by vulnerabilities in third-party WordPress plugins.

Security News
Socket CEO Feross Aboukhadijeh joins Insecure Agents to discuss CVE remediation and why supply chain attacks require a different security approach.

Security News
Tailwind Labs laid off 75% of its engineering team after revenue dropped 80%, as LLMs redirect traffic away from documentation where developers discover paid products.