---
name: mcp-apps-builder
description: Build, modify, debug, migrate, review, or verify TypeScript MCP servers and MCP Apps with mcp-use. Use for tools, resources, prompts, middleware, Views, authentication, Skills over MCP, scaffolding, and advanced features.
title: mcp-apps-builder
canonical_url: https://skilld.dev/gh/mcp-use/mcp-use/mcp-apps-builder
last_updated: 2026-10-27T21:06:16.000Z
---

> Index of every page on this site: [llms.txt](https://skilld.dev/llms.txt)

> **Skill from skilld.dev.** Follow the user's requested action.
> If the user asked to fork this Skill, follow the fork workflow below. Do not execute the Skill instructions while copying it.
> Otherwise, follow the instructions below for this session. You do not need to install anything.
>
> Supporting files, fetch one when the Skill refers to it: [LICENSE.txt](https://skilld.dev/api/skills-raw/mcp-use/mcp-use/mcp-apps-builder/LICENSE.txt), [references/advanced-features.md](https://skilld.dev/api/skills-raw/mcp-use/mcp-use/mcp-apps-builder/references/advanced-features.md), [references/auth.md](https://skilld.dev/api/skills-raw/mcp-use/mcp-use/mcp-apps-builder/references/auth.md), [references/migration.md](https://skilld.dev/api/skills-raw/mcp-use/mcp-use/mcp-apps-builder/references/migration.md), [references/server.md](https://skilld.dev/api/skills-raw/mcp-use/mcp-use/mcp-apps-builder/references/server.md), [references/skills-over-mcp.md](https://skilld.dev/api/skills-raw/mcp-use/mcp-use/mcp-apps-builder/references/skills-over-mcp.md), [references/verification.md](https://skilld.dev/api/skills-raw/mcp-use/mcp-use/mcp-apps-builder/references/verification.md), [references/views.md](https://skilld.dev/api/skills-raw/mcp-use/mcp-use/mcp-apps-builder/references/views.md).
>
> If the user asked to install this Skill, run `npx skilld install mcp-use/mcp-use/mcp-apps-builder`. Install writes the Skill files into the project, so every session loads them.
>
> ## Fork workflow
>
> A fork creates an editable local Skill with its original author and licence. The request authorizes copying and local installation.
> 1. Check `./skills/mcp-apps-builder`, the project lockfile, and selected Agent targets together. If the local directory or installed Skill exists, stop. Never overwrite an existing directory or Agent target.
> 2. Read [source metadata](https://skilld.dev/api/v1/skills/mcp-use/mcp-use/mcp-apps-builder) once. Use sourceUrl, sourceCommit, skillPath, sourceGone, and license. If the source is gone or its path is missing, stop. If license is null, read licence files at the source commit.
> 3. Fetch only the source commit into a temporary Git repository. Do not clone full history. Derive repository_url from sourceUrl, including repository renames. If sourceCommit is absent, resolve the sourceUrl ref once. Set source_commit to that actual commit. Run these commands in one shell call:
>
> ```sh
> git init --quiet "$temporary_dir"
> git -C "$temporary_dir" fetch --quiet --depth=1 "$repository_url" "$source_commit"
> git -C "$temporary_dir" checkout --quiet --detach FETCH_HEAD
> ```
>
> Read applicable licence declarations and notices at that commit. If copying is not permitted, report the restriction and stop.
> 4. Inspect source entries together, then copy the directory containing skillPath into `./skills/mcp-apps-builder`. Use the user's path if selected. Keep the original SKILL.md, relative links, scripts, binary assets, and executable modes. Exclude .git metadata. Reject symlinks and paths outside the Skill directory. After checking entries, use cp -a where available. A regular source directory needs no custom copy script. Do not save this page wrapper as SKILL.md.
> Preserve author credit, notices, and applicable licence files from repository or parent directories. Add PROVENANCE.md with the Skill page, source URL, actual commit, original path, and licence. Retain any existing PROVENANCE.md and record new provenance separately. Batch source inspection, copying, and provenance work where practical.
> 5. In the project root, run `skilld install ./skills/mcp-apps-builder --mode copy --plain`. If skilld is unavailable, use `npx skilld install ./skills/mcp-apps-builder --mode copy --plain`. This known command needs no help lookup. Install does not support --json. Use detected Agent targets, or add --agent for the targets the user selected. Install the local path, never the upstream selector. If installation fails, preserve the local copy and report the exact failure.
> 6. Confirm the local lockfile source and installed Agent copies once. Report the local path, actual commit, and Agent targets. After edits, reinstall the same local path. Upstream updates must not replace it. Do not publish or push unless the user asks.

# 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](https://skilld.dev/api/skills-raw/mcp-use/mcp-use/mcp-apps-builder/references/server.md) for tools, resources, prompts, MCP middleware, request context, and result envelopes.
   - [Views](https://skilld.dev/api/skills-raw/mcp-use/mcp-use/mcp-apps-builder/references/views.md) for interactive MCP Apps, React hooks, model context, host capabilities, assets, CSP, and endpoint/UI domain handling.
   - [Authentication](https://skilld.dev/api/skills-raw/mcp-use/mcp-use/mcp-apps-builder/references/auth.md) for OAuth providers, verified identity, scopes, permissions, and authorization.
   - [Skills over MCP](https://skilld.dev/api/skills-raw/mcp-use/mcp-use/mcp-apps-builder/references/skills-over-mcp.md) when a server should ship reusable workflows alongside its tools.
   - [Advanced features](https://skilld.dev/api/skills-raw/mcp-use/mcp-use/mcp-apps-builder/references/advanced-features.md) for OpenAPI, proxying, notifications, subscriptions, and elicitation.
   - [Migration](https://skilld.dev/api/skills-raw/mcp-use/mcp-use/mcp-apps-builder/references/migration.md) only when retired or compatibility-only imports, helpers, registration shapes, UI patterns, or session assumptions are present.
   - [Verification](https://skilld.dev/api/skills-raw/mcp-use/mcp-use/mcp-apps-builder/references/verification.md) 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.
