Build Model Context Protocol (MCP) servers with mcp-use framework. Use when creating MCP servers, defining tools/resources/prompts, working with mcp-use, bootstrapping MCP projects, deploying MCP servers, or when user mentions MCP development, MCP tools, MCP resources, or MCP prompts.
View on GitHubskills/mcp-builder/SKILL.md
February 3, 2026
Select agents to install to:
npx add-skill https://github.com/mcp-use/mcp-use/blob/main/skills/mcp-builder/SKILL.md -a claude-code --skill mcp-builderInstallation paths:
.claude/skills/mcp-builder/# MCP Server Builder
Build production-ready MCP servers with the mcp-use framework. This Skill provides quick-start instructions and best practices for creating MCP servers.
## Quick Start
**Always bootstrap with `npx create-mcp-use-app`:**
```bash
npx create-mcp-use-app my-mcp-server
cd my-mcp-server
```
**Choose template based on needs:**
- `--template starter` - Full-featured with all MCP primitives (tools, resources, prompts) + example widgets
- `--template mcp-apps` - Optimized for ChatGPT widgets with product search example
- `--template blank` - Minimal starting point for custom implementation
```bash
# Example: MCP Apps template
npx create-mcp-use-app my-server --template mcp-apps
cd my-server
yarn install
```
**Template Details:**
- **starter**: Best for learning - includes all MCP features plus widgets
- **mcp-apps**: Best for ChatGPT apps - includes product carousel/accordion example
- **blank**: Best for experts - minimal boilerplate
## MCP Apps Structure
### Automatic Widget Registration
The mcp-apps and starter templates automatically discover and register React widgets from the `resources/` folder:
**Single-file widget pattern:**
```
resources/
└── weather-display.tsx # Widget name becomes "weather-display"
```
**Folder-based widget pattern:**
```
resources/
└── product-search/ # Widget name becomes "product-search"
├── widget.tsx # Entry point (required name!)
├── components/ # Sub-components
├── hooks/ # Custom hooks
├── types.ts
└── constants.ts
```
**What happens automatically:**
1. Server scans `resources/` folder at startup
2. Finds `.tsx` files or `widget.tsx` in folders
3. Extracts `widgetMetadata` from each component
4. Registers as MCP Tool (e.g., `weather-display`)
5. Registers as MCP Resource (e.g., `ui://widget/weather-display.html`)
6. Builds widget bundles with Vite
**No manual registration needed!** Just export `widgetMetadata` and a default component.
## Defining Tools
Too