mcp-builder

Build MCP servers with tools, resources, prompts, and React widgets using mcp-use.

Updated May 9, 2026
One-click install
npx skills add https://github.com/diegoc1005/hackAI --skill mcp-builder-diegoc1005
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: mcp-builder
Source: https://github.com/diegoc1005/hackAI/tree/main/.cursor/skills/mcp-builder
Command: npx skills add https://github.com/diegoc1005/hackAI --skill mcp-builder-diegoc1005

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires mcp-use, zod, and includes references (resource) components.

What problem does it solve? Building Model Context Protocol servers requires coordinating tools, resources, prompts, and interactive UI widgets, and developers often struggle to decide what needs a visual interface versus plain text output and how to structure the server code correctly. ## Core Features & Use Cases - Server Scaffolding Guidance: Provides patterns for defining tools, resources, prompts, and parameterized resource templates with the mcp-use TypeScript SDK and Zod schemas. - Interactive Widgets: Covers creating React TSX widget components in a resources folder, wiring them to tools via the widget() response helper, and managing state with the useWidget hook. - Architecture Decision Support: Helps decompose user requests into focused tools and decide when a widget improves the experience, with mock data strategies and server proxying for composing multiple MCP servers. - Use Case: A developer asked to build a weather app for ChatGPT uses this Skill to create a get-weather widget tool rendering a styled weather card, plus a forecast tool returning text, all with mock data. ## Quick Start Ask the agent to build an MCP server for your use case, such as a todo list manager with an interactive checklist widget, using the mcp-use framework.

Frequently Asked Questions about mcp-builder

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a tool in mcp-use?▼

Define a tool with server.tool() by passing a name, description, and Zod schema, plus an async callback that returns a response helper like text() or object(). Add .describe() to every schema field and use the error() helper inside try/catch for failures.

How do I add an interactive widget to an MCP tool?▼

Create a React component in the resources folder exporting widgetMetadata with a props Zod schema and a default component, then reference it in the tool's widget config by name. Return widget() from the tool callback with props for the UI and output text for the model.

When should a tool use a widget versus plain text?▼

Use a widget when browsing multiple items, displaying visual data like charts or colors, or enabling interactive selection. Use plain text tools for simple outputs like translations, calculations, or status checks where no visual element adds value.

Why does my widget show undefined for prop values?▼

Widgets render before the tool finishes executing, so props are initially empty. Check the isPending flag from useWidget() first and render a loading state until it becomes false, then access props safely.

Can mcp-use combine multiple MCP servers into one endpoint?▼

Yes, server.proxy() composes multiple local or remote MCP servers into a single aggregator server with namespaced tools. It handles schema translation, progress notifications, and state synchronization automatically.

How do I fix a duplicate tool registration error for a widget?▼

The error occurs when widgetMetadata sets exposeAsTool to true while a custom tool also references the widget. Remove exposeAsTool since it defaults to false and the custom tool definition handles registration.