mcp-builder

作者: mcp-use

已弃用:使用mcp-use构建包含工具、资源、提示和交互式小部件的MCP服务器。此技能已弃用;请改用mcp-app-builder。支持在单个MCP服务器中定义工具、资源、提示和交互式React小部件。包含响应辅助工具,可将输出格式化为文本、Markdown、HTML、图像、对象和自定义小部件。提供服务器组合和代理功能,将多个MCP服务器聚合为统一接口。

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

Build with mcp-use

Treat the installed mcp-use package, its exported types, generated declarations, and the project's existing code as the source of truth. Inspect the installed version before choosing APIs or changing code.

Workflow

  1. Inspect package.json, the server entry, exported tool refs, mcp-env.d.ts, views/, skills/, and the installed mcp-use version.
  2. Scaffold a new stable project with create-mcp-use-app@latest and the appropriate template. Match the package version or dist-tag when working on beta, canary, or an existing versioned project.
  3. Read only the references needed for the task:
    • Server for tools, resources, prompts, MCP middleware, request context, and result envelopes.
    • Views for interactive MCP Apps, React hooks, model context, host capabilities, assets, and CSP.
    • Authentication for OAuth providers, verified identity, scopes, permissions, and authorization.
    • Skills over MCP when a server should ship reusable workflows alongside its tools.
    • Advanced features for OpenAPI, proxying, notifications, subscriptions, and elicitation.
    • Migration only when retired or compatibility-only imports, helpers, registration shapes, UI patterns, or session assumptions are present.
    • Verification before reporting implementation work complete.
  4. Implement against installed types. Prefer the framework's current conventions over copied examples or historical changelogs.
  5. Validate the smallest real lifecycle that proves the changed behavior, then expand checks in proportion to risk.

Core invariants

  • Import server APIs from mcp-use, React APIs from mcp-use/react, and OAuth provider adapters from their mcp-use/oauth/* subpaths.
  • Define tool arguments with inputSchema. Add outputSchema for structured results and every View-bound tool.
  • Return raw MCP result envelopes. A successful schema-backed tool must include matching structuredContent; an expected failure may return isError: true with model-readable content.
  • Put each View at views/<name>/view.tsx and bind it with view: { name: "<name>" }.
  • Export every statically declared tool ref consumed by a View. Default-export the server entry used by mcp-use dev, build, and start.
  • Keep identity and mutable workflow state request-scoped or in an external store. Treat client-reported metadata as unverified.
  • Consider Skills over MCP when a server exposes a repeatable, multi-step workflow that would otherwise inflate tool descriptions.

Guardrails

  • Do not invent exports, configuration fields, or callback shapes. Confirm uncertain details in installed declarations or source.
  • Do not preserve APIs that are absent from the installed version merely because they appear in an existing project.
  • Do not return a plain domain object from a tool callback.
  • Do not bind a View without a matching outputSchema and structuredContent result.
  • Do not use module globals for cross-request identity, elicitation continuity, or durable business state.
  • Do not claim success from a source build alone when types, package exports, authentication, or interactive behavior changed.
  • Do not deploy or mutate external systems unless the user explicitly requests it.

来自 mcp-use 的更多技能

mcp-builder
mcp-use
使用mcp-use框架和自动组件注册构建生产级MCP服务器。通过npx create-mcp-use-app引导启动,从三个模板中选择:starter(全功能)、mcp-apps(ChatGPT优化版)或blank(极简版)。使用Zod模式定义工具、资源和提示,支持自动验证和清晰的参数描述。自动将resources/文件夹中的React组件注册为MCP工具和资源,提供MCP应用的双协议支持...
chatgpt-app-builder
mcp-use
使用mcp-use和OpenAI Apps SDK构建带有交互式小部件的ChatGPT应用。在创建ChatGPT应用、构建带有小部件的MCP服务器、定义…时使用。
chatgpt-app-builder
mcp-use
已弃用:请改用 mcp-app-builder。通过交互式小部件和零配置 React 开发构建 ChatGPT 应用。此技能已弃用;请迁移至 mcp-app-builder 以获取持续支持与更新。支持人类用户与 LLM 之间通过共享交互式小部件进行协作式 UI 交互。提供服务器处理器、React 小部件脚手架、状态管理以及用于工具调用和后续消息的内置钩子。涵盖显示模式(内联、全屏、画中画)、主题设置……
mcp-apps-builder
mcp-use
构建生产级MCP服务器的强制性参考指南,涵盖工具、资源、提示和组件。包括基础概念(工具、资源、提示、组件原语)、服务器架构、认证模式(OAuth、Supabase、自定义)以及部署策略。提供实现工具、资源、提示、响应格式以及基于组件的UI(含状态管理和主题)的详细指南。记录常见反模式(缺少验证、错误处理不当...)
openapi-to-mcp
mcp-use
使用 mcp-use TypeScript SDK 从 OpenAPI / Swagger 规范构建并部署 MCP 服务器。当用户想要“将这个 OpenAPI…