MCP.Market

mcp-apps-builder skill

by Shubhamsaboo·Shubhamsaboo/awesome-llm-apps·145k stars·Apache-2.0

**MANDATORY for ALL MCP server work** - mcp-use framework best practices and patterns.

A90/100content scan

Is the mcp-apps-builder skill safe?

Clean: nothing in its files matched our rules. We read 20 files in the folder on 2026-10-25.

  • mediumreferences/widgets/basics.md:389

    Edits shell startup files, cron or launch agents, so something runs again after the skill is done.

    <p>{user.profile.bio}</p>

Install the mcp-apps-builder skill

A skill is a folder. Copy it into your agent's skills folder and the agent loads it when the task matches its description.

git clone --depth 1 https://github.com/Shubhamsaboo/awesome-llm-apps.git /tmp/awesome-llm-apps
mkdir -p ~/.claude/skills
cp -r /tmp/awesome-llm-apps/generative_ui_agents/ai-mcp-app-builder/apps/mcp-use-server/.agent/skills/mcp-apps-builder ~/.claude/skills/mcp-apps-builder
available in every project

In the Claude apps, zip the folder and upload it from the Skills settings. The folder on GitHub

The instructions your agent would load

SKILL.md as published, without the frontmatter. Read it on GitHub

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 (WorkOS, Supabase, or custom)

  • overview.md
  • When: First time adding auth, understanding ctx.auth, or choosing a provider
  • Covers: oauth config, user context shape, provider comparison, common mistakes
  • workos.md
  • When: Using WorkOS AuthKit for authentication
  • Covers: Setup, env vars, DCR vs pre-registered, roles/permissions, WorkOS API calls
  • supabase.md
  • When: Using Supabase for authentication
  • Covers: Setup, env vars, HS256 vs ES256, RLS-aware API calls
  • custom.md
  • When: Using any other identity provider (GitHub, Okta, Azure AD, Google, etc.)
  • Covers: Custom verification, user info extraction, provider examples

🔧 Building Server Backend (No UI)?

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

  • tools.md
  • When: Creating backend actions the AI can call (send-email, fetch-data, create-user)
  • Covers: Tool definition, schemas, annotations, context, error handling
  • resources.md
  • When: Exposing read-only data clients can fetch (config, user profiles, documentation)
  • Covers: Static resources, dynamic resources, parameterized resource templates, URI completion
  • prompts.md
  • When: Creating reusable message templates for AI interactions (code-review, summarize)
  • Covers: Prompt definition, parameterization, argument completion, prompt best practices
  • response-helpers.md
  • When: Formatting responses from tools/resources (text, JSON, markdown, images, errors)
  • Covers: text(), object(), markdown(), image(), error(), mix()

🎨 Building Visual Widgets (Interactive UI)?

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

  • basics.md
  • When: Creating your first widget or adding UI to an existing tool
  • Covers: Widget setup, useWidget() hook, isPending checks, props handling
  • state.md
  • When: Managing UI state (selections, filters, tabs) within widgets
  • Covers: useState, setState, state persistence, when to use tool vs widget state
  • interactivity.md
  • When: Adding buttons, forms, or calling tools from within widgets
  • Covers: useCallTool(), form handling, action buttons, optimistic updates
  • ui-guidelines.md
  • When: Styling widgets to support themes, responsive layouts, or accessibility
  • Covers: useWidgetTheme(), light/dark mode, autoSize, layout patterns, CSS best practices
  • advanced.md
  • When: Building complex widgets with async data, error boundaries, or performance optimizations
  • Covers: Loading states, error handling, memoization, code splitting

📚 Need Complete Examples?

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

  • common-patterns.md
  • 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
│
├─ Visual/interactive UI
│  └─> Use Widget: widgets/basics.md
│
└─ 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
  • ❌ Widget handles server state (filters, selections)
  • ✅ Widgets manage their own UI state with useState
  • ❌ Missing McpUseProvider wrapper or autoSize
  • ✅ Wrap root component:
  • ❌ 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

More skills from Shubhamsaboo/awesome-llm-apps

  • Aadvisor-orchestrator-workerUse when a task is too large for one model pass, needs parallel research or generation across many subtasks (like researching a dozen competitors at once), or the user asks to orchestrate multiple models, split work across a model team, run an advisor-worker loop, have a stronger model review the plan while cheap workers execute, or says "too big for one model" or "fan this out". Not for single-file edits or tasks one model handles in one pass.
  • Achatgpt-app-builderDEPRECATED: This skill has been replaced by `mcp-app-builder`. Check if `mcp-app-builder` is available in the skills folder. If not, install it: `npx skills install mcp-use/mcp-use --skill mcp-app-builder` Use `mcp-app-builder` instead of this skill.
  • Acommit-archaeologistReconstructs why code exists from local git history, including the introducing commit, later changes, current authors, repeated companion files, and likely intent. Use when the user asks "why does this code exist", "who wrote this function and why", or to "explain the history of this function" before a rewrite, refactor, or risky edit. Runs entirely locally.
  • Adependency-doctorChecks requirements.txt, pyproject.toml, and package.json dependency manifests for surface-level direct-dependency footguns: standard-library shadowing pins, abandoned backports, unpinned dependencies, and obvious intra-manifest conflicts, plus opt-in PyPI yanked releases. Use when the user asks to check a manifest for dependency problems, asks why dependencies won't install or whether anything is wrong with their dependencies, wants a dependency autopsy, or suspects dependency manifest rot. Runs offline by default as a local tool for the user's own project, not repository CI.
  • Afirst-readerBeta readers for any draft, run by simulating how a real reader experiences it, moment by moment. A skim gate, a no-lookahead timed read producing an attention transcript with quit points, a recall test of what a reader remembers the next day, and a trust ledger of the implied author. Use when the user asks for a beta read, beta readers, test readers, human review, reader review, to read something like a human, to be a first reader, whether a piece holds attention or will actually get read, for a quick read of whether a busy skimmer would even open a post, what readers will remember or take away tomorrow, where readers stop reading or bounce, or why a draft still feels off or hollow after anti-slop or humanizer edits. Final gate before publishing; reports where the reading broke; never rewrites.
  • Amcp-builderDEPRECATED: This skill has been replaced by `mcp-app-builder`. Check if `mcp-app-builder` is available in the skills folder. If not, install it: `npx skills install mcp-use/mcp-use --skill mcp-app-builder` Use `mcp-app-builder` instead of this skill.
  • Aproject-graveyardScans the developer's machine for dead side projects, autopsies each one from its git history (died at the payments wall, killed by a newer project, finished but never shipped), surfaces their personal death patterns, and picks the corpse most worth resurrecting — then helps ship it. Use when the user mentions abandoned, unfinished, or old side projects, asks "what should I finish", wants to revive or resurrect a project, says "run the graveyard", wonders why they never finish anything, or is about to start a new project that sounds like one they already built. Runs entirely locally.
  • Ascope-creep-detectorAnalyzes git diffs against a stated intent to detect scope creep, unrelated files, broad pull requests, changes that grew beyond a fix, dependency additions, public API renames, config or CI edits, oversized hunks, and formatting-only files. Use when the user asks whether a change grew beyond the fix, a PR is too broad, or what unrelated stuff they touched, and wants keep, split, or justify guidance. Operates locally and offline.
  • Athinking-out-loudA contract for what the agent does when a long, messy, stream-of-consciousness ramble arrives (usually voice dictation): act on nothing until the echo brief is approved. The echo audits the entire transfer, mission, locked decisions and constraints, open questions, flips and parked tangents, with the model's inferences and guesses quarantined away from the user's own phrasing, so the user verifies what the model believes, not just what it doubts. Use when the user says "let me think out loud" or wants to ramble a bit before building anything, when a message opens with a speech-to-text preamble like "switching to voice, sorry for typos", when input is a long weakly punctuated stream with restarts and mid-message reversals ("actually no, wait, scrap that idea entirely"), or when the user asks to be interviewed about a fuzzy half-formed idea. Includes an optional capture mode for rambles spread across several messages and an optional targeted interview.

All agent skills → · MCP servers