mcp-apps-builder

bởi mcp-use

Hướng dẫn tham khảo bắt buộc để xây dựng máy chủ MCP sản xuất với các công cụ, tài nguyên, lời nhắc và widget. Bao gồm các khái niệm nền tảng (công cụ, tài nguyên, lời nhắc, nguyên thủy widget), kiến trúc máy chủ, các mẫu xác thực (OAuth, Supabase, tùy chỉnh) và chiến lược triển khai. Có hướng dẫn chi tiết để triển khai công cụ, tài nguyên, lời nhắc, định dạng phản hồi và giao diện người dùng dựa trên widget với quản lý trạng thái và chủ đề. Ghi lại các phản mẫu phổ biến (thiếu xác thực, lỗi không đúng cách...

npx skills add https://github.com/mcp-use/mcp-use --skill mcp-apps-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.

Thêm skills từ mcp-use

mcp-builder
mcp-use
Xây dựng máy chủ MCP sẵn sàng sản xuất với framework mcp-use và đăng ký widget tự động. Khởi tạo bằng npx create-mcp-use-app và chọn từ ba mẫu: starter (đầy đủ tính năng), mcp-apps (tối ưu cho ChatGPT), hoặc blank (tối thiểu). Xác định công cụ, tài nguyên và lời nhắc bằng lược đồ Zod với xác thực tự động và mô tả tham số rõ ràng. Tự động đăng ký widget React từ thư mục resources/ dưới dạng Công cụ và Tài nguyên MCP với hỗ trợ giao thức kép cho Ứng dụng MCP và...
chatgpt-app-builder
mcp-use
Xây dựng ứng dụng ChatGPT với các widget tương tác sử dụng mcp-use và OpenAI Apps SDK. Sử dụng khi tạo ứng dụng ChatGPT, xây dựng máy chủ MCP với widget, định nghĩa…
chatgpt-app-builder
mcp-use
KHÔNG DÙNG NỮA: Sử dụng mcp-app-builder thay thế. Xây dựng ứng dụng ChatGPT với widget tương tác và phát triển React không cần cấu hình. Kỹ năng này đã ngừng hoạt động; hãy di chuyển sang mcp-app-builder để tiếp tục được hỗ trợ và cập nhật. Cho phép giao diện người dùng cộng tác giữa người dùng và LLM thông qua widget tương tác chia sẻ. Cung cấp trình xử lý máy chủ, khung widget React, quản lý trạng thái và các hook tích hợp sẵn cho lệnh gọi công cụ và tin nhắn theo dõi. Bao gồm chế độ hiển thị (nội tuyến, toàn màn hình, hình trong hình), tạo
mcp-builder
mcp-use
KHÔNG DÙNG NỮA: Xây dựng máy chủ MCP với công cụ, tài nguyên, lời nhắc và widget tương tác bằng mcp-use. Kỹ năng này đã không còn được dùng; hãy sử dụng mcp-app-builder thay thế. Hỗ trợ định nghĩa công cụ, tài nguyên, lời nhắc và widget React tương tác trong một máy chủ MCP duy nhất. Bao gồm các trình trợ giúp phản hồi để định dạng đầu ra dưới dạng văn bản, markdown, HTML, hình ảnh, đối tượng và widget tùy chỉnh. Cung cấp khả năng tổng hợp và ủy quyền máy chủ để tập hợp nhiều máy chủ MCP thành một giao diện thống nhất.
openapi-to-mcp
mcp-use
Xây dựng và triển khai máy chủ MCP từ đặc tả OpenAPI / Swagger bằng cách sử dụng SDK TypeScript mcp-use. Sử dụng kỹ năng này bất cứ khi nào người dùng muốn "chuyển đổi OpenAPI này…