MCP Server
mcp-use has a complete MCP server framework implementation for TypeScript. It improves the official Model Context Protocol SDK with support for Edge Runtime, ChatGPT Apps SDK and MCP-UI. In addition, it supports all official MCP features and achieves a conformance score of 100/100 based on the official MCP Conformance Tests.Key Features
- Full MCP compatibility: MCP servers built with mcp-use are 100% compatible with the MCP specs.
- Apps SDK & MCP-UI support: UI widgets are compatible with Apps SDK for ChatGPT and MCP-UI resources. UI Widgets.
- Edge runtime support: Built-in Edge runtime support
- Built-in Inspector: An handy MCP inspector is launched for you to test you MCP server.
- Hot Module Reloading: Add, remove, or update tools, prompts, and resources without restarting the server or dropping connections.
- One command to get started: Use
npx create-mcp-use-appcommand to scaffold a complete MCP server.
Installation
Using create-mcp-use-app (recommended)
The easiest way to get started is to use thecreate-mcp-use-app command, which scaffolds a complete MCP server project with all necessary configuration:
- A complete TypeScript MCP server project structure.
- Example MCP Tools and Resources to get you started.
- Example UI Widgets React components in
resources/folder exposed as tools and resources in Apps SDK for ChatGPT and MCP-UI format. - Pre-configured build tools and dev server.
- All necessary dependencies installed.
- MCP Inspector to test your server.
Project Structure
After creation, your project will have this structure:Running Your MCP Server
Commands:- MCP Endpoint:
http://localhost:3000/mcp- For MCP client connections - MCP Inspector:
http://localhost:3000/inspector
Hot Module Reloading (HMR)
The development server supports Hot Module Reloading for tools, prompts, and resources. When you modify your server file, changes are applied instantly without restarting the server or dropping client connections.- Add tools/prompts/resources: New registrations appear immediately
- Update existing ones: Changes to descriptions, schemas, or handlers are applied in-place
- Remove registrations: Deleted tools/prompts/resources are removed from the server
- Notify clients: Connected clients (like the Inspector) receive
list_changednotifications and auto-refresh
Deploy Your MCP Server
You can deploy your MCP server on any platform. Build your MCP server withnpm run build and start the production server with npm run start.
Or you can deploy it on mcp-use Cloud.
For detailed instructions, see the Deploy Your Server guide.
Next Steps
- Core features: Learn how to create MCP tools, prompts and resources.
- UI Widgets: Expose UI components to chat clients compatible with ChatGPT Apps SDK and MCP-UI.
- Configuration: Advanced configuration and deployment options.
- Deploy Your Server - Deploy to production with one command
Manual Installation
If you prefer to set up manually or add mcp-use to an existing project, install the package via npm:Example server file
The easiest way to start is withcreate-mcp-use-app, which provides a working example. After running the scaffold command above, your server is ready to go!
For manual setup, here’s a minimal example:
- MCP Endpoint:
http://localhost:3000/mcp- For MCP client connections - Inspector UI:
http://localhost:3000/inspector- Development and testing interface
Architecture Overview
The mcp-use server framework is designed around a modular architecture that seamlessly integrates MCP protocol features with Express.js flexibility. Understanding this architecture helps you build powerful, production-ready MCP servers. The framework is built on six fundamental components that work together:Server Instance
The mainMCPServer class created via new MCPServer(). It orchestrates all MCP functionality, manages the Express application, and handles client connections.
Learn more: See Configuration for server setup options.
Tools
Executable functions that MCP clients can invoke with typed parameters. Tools perform actions, fetch data, or trigger operations and return structured results. Learn more: Tools Guide →Resources
Static or dynamic content accessible via URIs. Resources can be configuration files, documentation, data feeds, or any content that clients need to read. Learn more: Resources Guide →Prompts
Reusable, parameterized templates for AI model interactions. Prompts standardize how your server generates context for LLM conversations. Learn more: Prompts Guide →UI Widgets
Rich, interactive React components that render in chat clients. Widgets are automatically registered from yourresources/ folder and work with both ChatGPT Apps SDK and MCP-UI.

- Automatic Registration: Drop
.tsxfiles inresources/and they become MCP tools - Zero Boilerplate: No manual
server.tool()orserver.uiResource()calls needed - Hot Module Replacement: Changes reflect instantly during development
- Type-Safe Props: Zod schemas provide full TypeScript type safety
- Interactive: Widgets can call tools, manage state, and respond to user actions
Custom Endpoints Integration
Full Express.js and Hono functionality for custom routes, middleware, authentication, static file serving, and more. The server instance is also an Express app.McpServer API
TheMcpServer class provides a clean, chainable API:
- OAuth Authentication: Configure OAuth providers for secure authentication
- Sampling: Request LLM completions from the client during tool execution
- Notifications: Send real-time notifications to connected clients
- Inspector UI: Interactive debugging interface automatically served at
/inspectorendpoint
Next Steps
Tools
Build executable functions with parameters and validation
Resources
Expose static and dynamic content via URI-based resources
Prompts
Create reusable prompt templates for AI interactions
UI Widgets
Build interactive React components with auto-registration
Configuration
Configure your server for production deployment
Deploy to Production
Deploy your server to mcp-use Cloud with one command