Skip to main content

Templates

Choose from three official templates or use any GitHub repository as a custom template.

Official Templates

Starter

Full-featured with all examples

MCP Apps

OpenAI Apps SDK optimized

Blank

Minimal clean slate

Starter Template

The starter template is a comprehensive starting point with examples of all MCP features.

Use Case

Best for:
  • Learning MCP concepts
  • Exploring all features
  • Prototyping quickly
  • Building full-featured servers

What’s Included

Example tool implementations:
src/index.ts
// Weather fetching tool
server.tool(
  {
    name: "fetch-weather",
    description: "Fetch weather for a city",
    schema: z.object({
      city: z.string().describe("City name"),
    }),
  },
  async ({ city }) => {
    return text(`Weather in ${city}: Sunny, 72°F`);
  }
);

Features

  • Tools with Zod validation
  • Resources (static and dynamic)
  • Prompts with argument templates
  • Both MCP-UI and OpenAI Apps SDK widgets
  • Full type safety
  • Proper tsconfig.json
  • Type declarations included
  • Hot reload configured
  • Auto-opening inspector
  • Example implementations
  • Comprehensive README

Create with Starter

npx create-mcp-use-app my-project --template starter

MCP Apps Template

The mcp-apps template is optimized for OpenAI Apps SDK integration and ChatGPT compatibility.

Use Case

Best for:
  • OpenAI ChatGPT integration
  • Apps SDK widgets
  • Ecommerce applications
  • ChatGPT-compatible UIs

What’s Included

Pre-built OpenAI-compatible widgets:1. Display Weather
resources/display-weather.tsx
// Weather card with theme support
import { useWidget } from 'mcp-use/react';

export default function DisplayWeather() {
  const { props, theme } = useWidget();
  // theme is 'dark' or 'light' from ChatGPT
  return (
    <div className={theme === 'dark' ? 'bg-gray-800' : 'bg-white'}>
      {/* ... */}
    </div>
  );
}
2. Ecommerce Carousel
resources/ecommerce-carousel.tsx
// Product carousel with OpenAI SDK UI components
import { Card, Button } from '@openai/apps-sdk-ui';

export default function EcommerceCarousel() {
  const { props, sendFollowUpMessage } = useWidget();

  return (
    <div className="carousel">
      {props.products.map(product => (
        <Card key={product.id}>
          <img src={product.image} />
          <h3>{product.name}</h3>
          <Button onClick={() => sendFollowUpMessage(
            `Tell me more about ${product.name}`
          )}>
            Learn More
          </Button>
        </Card>
      ))}
    </div>
  );
}
3. Product Search
resources/product-search-result.tsx
// Search results with filters
4. Store Locations Map
resources/stores-locations-map.tsx
// Interactive map showing store locations
5. Order Confirmation
resources/order-confirmation.tsx
// Order summary and confirmation

Features

  • Full ChatGPT compatibility
  • Theme detection
  • Official UI components
  • Persistent state
  • Widgets auto-register from resources/
  • Props schema validation
  • Type-safe props
  • Product carousel
  • Search with filters
  • Store locator map
  • Order confirmation

Create with MCP Apps

npx create-mcp-use-app my-project --template mcp-apps

Blank Template

The blank template provides a minimal starting point for custom projects.

Use Case

Best for:
  • Custom implementations
  • Minimal dependencies
  • Learning from scratch
  • Specific use cases

What’s Included

Minimal server setup:
src/index.ts
import { MCPServer } from "mcp-use/server";

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

// Add your tools, resources, and prompts here

server.listen(3000);
No example implementations - clean slate.

Features

  • Only essential packages
  • No example code
  • Clean starting point
  • Dev server with hot reload
  • Build and deployment scripts
  • Inspector integration

Create with Blank

npx create-mcp-use-app my-project --template blank

Custom GitHub Templates

Use any GitHub repository as a template.

Syntax

npx create-mcp-use-app my-project --template owner/repo

# Example:
npx create-mcp-use-app my-project --template acme/mcp-template

Requirements

Git must be installed and available in your PATH to use GitHub templates.
1

Public Repository

Repository must be publicly accessible (or you must have access).
2

Valid Structure

Repository should contain:
  • package.json
  • src/ directory (or TypeScript files)
  • Optional: tsconfig.json, README.md
3

Template Variables

Files can include placeholders:
  • {{PROJECT_NAME}} - Replaced with your project name
  • {{mcp-use_version}} - Replaced with latest mcp-use version

Example Custom Template

Create your own template repository:
package.json
{
  "name": "{{PROJECT_NAME}}",
  "version": "1.0.0",
  "dependencies": {
    "mcp-use": "{{mcp-use_version}}"
  }
}
src/index.ts
// Your custom template code
import { MCPServer } from "mcp-use/server";

const server = new MCPServer({
  name: "{{PROJECT_NAME}}",
  version: "1.0.0",
});

// Your custom tools and resources

server.listen(3000);
Users can then use:
npx create-mcp-use-app my-project --template your-org/your-template

Template Comparison

FeatureStarterMCP AppsBlank
Tools✅ Examples✅ Brand info❌ None
Resources✅ Examples❌ None❌ None
Prompts✅ Examples❌ None❌ None
Widgets✅ Both types✅ Apps SDK❌ None
Documentation✅ Comprehensive✅ Apps-focused✅ Minimal
DependenciesFullMediumMinimal
Best ForLearningChatGPTCustom

Choosing a Template

1

Learning?

Use starter template:
npx create-mcp-use-app my-project --template starter
See all features with examples.
2

Building for ChatGPT?

Use mcp-apps template:
npx create-mcp-use-app my-project --template mcp-apps
Get OpenAI Apps SDK integration.
3

Starting Fresh?

Use blank template:
npx create-mcp-use-app my-project --template blank
Build from scratch.
4

Have Custom Template?

Use GitHub repository:
npx create-mcp-use-app my-project --template owner/repo
Use your organization’s template.

Next Steps

Customization

Customize your generated project

CLI Commands

Learn about development commands

Build docs developers (and LLMs) love