Token导航 LogoToken导航

Agent Skill · 前端设计

mcp-apps-builder(MCP apps 构建器)

mcp-apps-builder 用于记录任务执行中的错误、用户纠正、经验和能力缺口,适合在 Codex、Claude、Cursor、Gemini CLI 中希望让 Agent 持续沉淀问题、修正和最佳实践时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

mcp-apps-builder 是前端设计类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为操作浏览器;许可证信息还不明确,第三方扫描有提醒项,按安装量在前端设计类的 10,216 个 Skill 里排第 98。

总安装 220,320周安装 9,013GitHub Stars 9,935下载 70,560核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:mcp-apps-builder(MCP apps 构建器)
来源仓库:https://github.com/mcp-use/mcp-use
仓库路径:skills/mcp-apps-builder
安装命令:
npx skills add https://github.com/mcp-use/mcp-use --skill mcp-apps-builder
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/mcp-use/mcp-use --skill mcp-apps-builder

这个 Skill 是做什么的

前端设计类 Skill 关注页面结构、视觉规范和组件写法,输出通常是可运行的界面代码。

使用工具、资源、提示和小部件构建生产 MCP 服务器的强制性参考指南。

涵盖基本概念(工具、资源、提示、Widget 原语)、服务器架构、身份验证模式(OAuth、Supabase、自定义)和部署策略 包括用于实现工具、资源、提示、响应格式以及具有状态管理和主题的基于小部件的 UI 的详细指南 记录常见的反模式(缺少验证、错误处理不当、小部件状态错误)和黄金规则(每种功能一个工具、小部件拥有自己的状态、在边界进行验证) 为天气应用程序、待办事项列表和其他常见用例提供决策树、快速参考和端到端示例

来源仓库内路径:skills/mcp-apps-builder

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/mcp-use/mcp-use --skill mcp-apps-builder;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要操作浏览器,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

mcp-apps-builder 怎么安装?

在终端执行 npx skills add https://github.com/mcp-use/mcp-use --skill mcp-apps-builder。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

mcp-apps-builder 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

mcp-apps-builder 需要什么权限?

权限级别是操作浏览器。该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

mcp-apps-builder 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

mcp-apps-builder 用的人多吗?

公开数据是累计安装 220,320 次,近一周安装 9,013 次,下载 70,560 次,GitHub 9,935 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

mcp-apps-builder 安全吗?

第三方扫描有提醒项,说明存在需要人工确认的行为。安装前请打开源码看清它读了什么、联网到哪里。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 来源仓库有 9,935 星,维护活跃度相对可查。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理前端设计类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

前端设计类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
frontend-design

前端设计 · Codex、Claude

8,823,360126,072只读MIT通过
vercel-composition-patterns

Vercel 组合模式 · Codex、Claude

3,858,81625,893需要联网MIT通过
vercel-react-native-skills

Vercel React native skills 前端 · Codex、Claude

2,468,66425,878只读MIT通过
adapt

adapt 搜索 · Codex、Claude

2,027,04023,125操作浏览器未明确通过
bolder

bolder 分析 · Codex、Claude

2,004,28823,130只读未明确通过
mcp-apps-builder

MCP apps 构建器 · 本页

220,3209,935操作浏览器未明确有提醒

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

IMPORTANT: How to Use This Skill

This file provides a NAVIGATION GUIDE ONLY. Before implementing any MCP server features, you MUST:

  1. Read this overview to understand which reference files are relevant
  2. ALWAYS read the specific reference file(s) for the features you're implementing
  3. Apply the detailed patterns from those files to your implementation

Do NOT rely solely on the quick reference examples in this file - they are minimal examples only. The reference files contain critical best practices, security considerations, and advanced patterns.


MCP Server Best Practices

Comprehensive guide for building production-ready MCP servers with tools, resources, prompts, and widgets using mcp-use.

⚠️ FIRST: New Project or Existing Project?

Before doing anything else, determine whether you are inside an existing mcp-use project.

Detection: Check the workspace for a package.json that lists "mcp-use" as a dependency, OR any .ts file that imports from "mcp-use/server".

├─ mcp-use project FOUND → Do NOT scaffold. You are already in a project.
│  └─ Skip to "Quick Navigation" below to add features.
│
├─ NO mcp-use project (empty dir, unrelated project, or greenfield)
│  └─ Scaffold first with npx create-mcp-use-app, then add features.
│     See "Scaffolding a New Project" below.
│
└─ Inside an UNRELATED project (e.g. Next.js app) and user wants an MCP server
   └─ Ask the user where to create it, then scaffold in that directory.
      Do NOT scaffold inside an existing unrelated project root.

NEVER manually create MCPServer boilerplate, package.json, or project structure by hand. The CLI sets up TypeScript config, dev scripts, inspector integration, hot reload, and widget compilation that are difficult to replicate manually.


Scaffolding a New Project

npx create-mcp-use-app my-server
cd my-server
npm run dev

For full scaffolding details and CLI flags, see quickstart.md.


Quick Navigation

Choose your path based on what you're building:

🚀 Foundations

When: ALWAYS read these first when starting MCP work in a new conversation. Reference later for architecture/concept clarification.

  1. concepts.md - MCP primitives (Tool, Resource, Prompt, Widget) and when to use each
  2. architecture.md - Server structure (Hono-based), middleware system, server.use() vs server.app
  3. quickstart.md - Scaffolding, setup, and first tool example
  4. deployment.md - Deploying to Manufact Cloud, self-hosting, Docker, managing deployments

Load these before diving into tools/resources/widgets sections.


🔐 Adding Authentication?

When: Protecting your server with OAuth (Auth0, Better Auth, WorkOS, Supabase, Keycloak, or any other provider)

- When: First time adding auth, understanding ctx.auth, or choosing a provider / integration mode - Covers: Remote auth vs OAuth proxy, oauth config, ctx.auth shape, provider comparison, common mistakes

- When: Using Auth0 — DCR (Early Access) or a standard Regular Web App via oauthProxy - Covers: Setup for both modes, extraAuthorizeParams.audience, permissions via rfc9068_profile_authz

- When: Using Better Auth with the @better-auth/oauth-provider plugin (self-hosted OAuth 2.1) - Covers: oauthBetterAuthProvider, auth URL / metadata routes, login and consent flows

- When: Using WorkOS AuthKit (DCR only) - Covers: Setup, env vars, roles/permissions, multi-tenant org filtering, WorkOS API calls

- When: Using Supabase's OAuth 2.1 server - Covers: Setup, publishable keys, ES256 vs HS256, hosting the consent UI, RLS-aware SDK calls

- When: Using Keycloak via native DCR - Covers: DCR trusted hosts + web origins, audience enforcement, realm vs resource roles, userinfo

- When: Any other provider — DCR-capable via oauthCustomProvider, or pre-registered (Google, GitHub, Okta, Azure AD) via oauthProxy - Covers: oauthCustomProvider, oauthProxy + jwksVerifier, provider examples, opaque-token verification


🔧 Building Server Backend (No UI)?

When: Implementing MCP features (actions, data, templates). Read the specific file for the primitive you're building.

- When: Creating backend actions the AI can call (send-email, fetch-data, create-user) - Covers: Tool definition, schemas, annotations, context, error handling

- When: Exposing read-only data clients can fetch (config, user profiles, documentation) - Covers: Static resources, dynamic resources, parameterized resource templates, URI completion

- When: Creating reusable message templates for AI interactions (code-review, summarize) - Covers: Prompt definition, parameterization, argument completion, prompt best practices

- When: Formatting responses from tools/resources (text, JSON, markdown, images, errors) - Covers: text(), object(), markdown(), image(), error(), mix()

- When: Composing multiple MCP servers into one unified aggregator server - Covers: server.proxy(), config API, explicit sessions, sampling routing

- When: Adding cross-cutting logic (logging, auth checks, rate limiting, tool filtering) that spans multiple tools/resources - Covers: server.use('mcp:...') middleware, MiddlewareContext (method, params, auth, state), pattern matching, HTTP vs MCP middleware


🎨 Building Visual Widgets (Interactive UI)?

When: Creating React-based visual interfaces for browsing, comparing, or selecting data

- When: Creating your first widget or adding UI to an existing tool - Covers: Widget setup, useWidget() hook, isPending checks, props handling

- When: Managing UI state (selections, filters, tabs) within widgets - Covers: useState, setState, state persistence, when to use tool vs widget state

- When: Adding buttons, forms, or calling tools from within widgets - Covers: useCallTool(), form handling, action buttons, optimistic updates

- When: Styling widgets to support themes, responsive layouts, or accessibility - Covers: useWidgetTheme(), light/dark mode, autoSize, layout patterns, CSS best practices

- When: Building complex widgets with async data, error boundaries, or performance optimizations - Covers: Loading states, error handling, memoization, code splitting

- When: Keeping the AI model aware of what the user is currently seeing (active tab, hovered item, selected product) without requiring tool calls - Covers: <ModelContext> component, modelContext.set/remove imperative API, nesting, tree serialization, lifecycle rules

- When: Uploading or downloading files from within a widget (ChatGPT Apps SDK only) - Covers: useFiles() hook, isSupported guard, model visibility (modelVisible), storing fileId, temporary download URLs


📚 Need Complete Examples?

When: You want to see full implementations of common use cases

- End-to-end examples: weather app, todo list, recipe browser - Shows: Server code + widget code + best practices in context


Decision Tree

What do you need?

├─ New project from scratch
│  └─> quickstart.md (scaffolding + setup)
│
├─ OAuth / user authentication
│  └─> authentication/overview.md → provider-specific guide
│
├─ Simple backend action (no UI)
│  └─> Use Tool: server/tools.md
│
├─ Read-only data for clients
│  └─> Use Resource: server/resources.md
│
├─ Reusable prompt template
│  └─> Use Prompt: server/prompts.md
│
├─ Cross-cutting logic (logging, auth checks, rate limiting, tool filtering)
│  └─> Use Middleware: architecture.md#mcp-middleware
│
├─ Visual/interactive UI
│  └─> Use Widget: widgets/basics.md
│
├─ Keep model aware of what user is seeing in widget
│  └─> widgets/model-context.md
├─ Upload/download files in a widget
│  └─> widgets/files.md (ChatGPT Apps SDK only)
│
└─ Deploy to production
   └─> deployment.md (cloud deploy, self-hosting, Docker)

Core Principles

  1. Tools for actions - Backend operations with input/output
  2. Resources for data - Read-only data clients can fetch
  3. Prompts for templates - Reusable message templates
  4. Widgets for UI - Visual interfaces when helpful
  5. Mock data first - Prototype quickly, connect APIs later

❌ Common Mistakes

Avoid these anti-patterns found in production MCP servers:

Tool Definition

  • ❌ Returning raw objects instead of using response helpers

- ✅ Use text(), object(), widget(), error() helpers

  • ❌ Skipping Zod schema .describe() on every field

- ✅ Add descriptions to all schema fields for better AI understanding

  • ❌ No input validation or sanitization

- ✅ Validate inputs with Zod, sanitize user-provided data

  • ❌ Throwing errors instead of returning error() helper

- ✅ Use error("message") for graceful error responses

Widget Development

  • ❌ Accessing props without checking isPending

- ✅ Always check if (isPending) return <Loading/>

  • ❌ Widget handles server state (filters, selections)

- ✅ Widgets manage their own UI state with useState

  • ❌ Missing McpUseProvider wrapper or autoSize

- ✅ Wrap root component: <McpUseProvider autoSize>

  • ❌ Inline styles without theme awareness

- ✅ Use useWidgetTheme() for light/dark mode support

Security & Production

  • ❌ Hardcoded API keys or secrets in code

- ✅ Use process.env.API_KEY, document in .env.example

  • ❌ No error handling in tool handlers

- ✅ Wrap in try/catch, return error() on failure

  • ❌ Expensive operations without caching

- ✅ Cache API calls, computations with TTL

  • ❌ Missing CORS configuration

- ✅ Configure CORS for production deployments


🔒 Golden Rules

Opinionated architectural guidelines:

1. One Tool = One Capability

Split broad actions into focused tools:

  • ❌ manage-users (too vague)
  • ✅ create-user, delete-user, list-users

2. Return Complete Data Upfront

Tool calls are expensive. Avoid lazy-loading:

  • ❌ list-products + get-product-details (2 calls)
  • ✅ list-products returns full data including details

3. Widgets Own Their State

UI state lives in the widget, not in separate tools:

  • ❌ select-item tool, set-filter tool
  • ✅ Widget manages with useState or setState

4. exposeAsTool Defaults to false

Widgets are registered as resources only by default. Use a custom tool (recommended) or set exposeAsTool: true to expose a widget to the model:

// ✅ ALL 4 STEPS REQUIRED for proper type inference:

// Step 1: Define schema separately
const propsSchema = z.object({
  title: z.string(),
  items: z.array(z.string())
});

// Step 2: Reference schema variable in metadata
export const widgetMetadata: WidgetMetadata = {
  description: "...",
  props: propsSchema,  // ← NOT inline z.object()
  exposeAsTool: false
};

// Step 3: Infer Props type from schema variable
type Props = z.infer<typeof propsSchema>;

// Step 4: Use typed Props with useWidget
export default function MyWidget() {
  const { props, isPending } = useWidget<Props>();  // ← Add <Props>
  // ...
}

⚠️ Common mistake: Only doing steps 1-2 but skipping 3-4 (loses type safety)

5. Validate at Boundaries Only

  • Trust internal code and framework guarantees
  • Validate user input, external API responses
  • Don't add error handling for scenarios that can't happen

6. Prefer Widgets for Browsing/Comparing

When in doubt, add a widget. Visual UI improves:

  • Browsing multiple items
  • Comparing data side-by-side
  • Interactive selection workflows

Quick Reference

Minimal Server

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

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

server.tool(
  {
    name: "greet",
    description: "Greet a user",
    schema: z.object({ name: z.string().describe("User's name") })
  },
  async ({ name }) => text("Hello " + name + "!"),
);

server.listen();

Response Helpers

HelperUse WhenExample
text()Simple string responsetext("Success!")
object()Structured dataobject({status: "ok"})
markdown()Formatted textmarkdown("# Title\nContent")
widget()Visual UIwidget({props: {...}, output: text(...)})
mix()Multiple contentsmix(text("Hi"), image(url))
error()Error responseserror("Failed to fetch data")
resource()Embed resource refsresource("docs://guide", "text/markdown")

Server methods:

  • server.tool() - Define executable tool
  • server.resource() - Define static/dynamic resource
  • server.resourceTemplate() - Define parameterized resource
  • server.prompt() - Define prompt template
  • server.proxy() - Compose/Proxy multiple MCP servers
  • server.uiResource() - Define widget resource
  • server.listen() - Start server
  • server.use('mcp:tools/call', fn) - MCP middleware (tools, resources, prompts, list ops)
  • server.use('mcp:*', fn) - Catch-all MCP middleware
  • server.use(fn) - HTTP middleware (Hono)

平台分布

Codex

32.78%
按下载量换算23,130

Claude

29.66%
按下载量换算20,928

Cursor

18.69%
按下载量换算13,188

Gemini CLI

9.97%
按下载量换算7,035

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

操作浏览器

该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills