Overview
When you create a new project withsunpeak new, the sunpeak framework gives you a minimal, convention-based project structure with everything needed for MCP App development.
Key Files & Directories
src/resources/- Directory containing all your MCP Resources (MCP App UIs).- Each resource lives in its own folder:
src/resources/{name}/ - Each folder contains:
{name}.tsx- React component + resource metadata (export const resource: ResourceConfig)components/- Optional subfolder for resource-specific components
- Each resource lives in its own folder:
src/tools/- Directory containing MCP tool files.- Each tool is a
.tsfile that exportstool(metadata with optional resource link),schema(Zod), and adefaulthandler. Tools without aresourcefield are registered as plain MCP tools (no UI). - Multiple tools can reference the same resource.
- Each tool is a
src/server.ts- Optional server entry for auth and server configuration.tests/simulations/- Directory containing simulation files for local development and testing.- Simulation files are flat
*.jsonfiles with atoolstring field referencing a tool filename. - Any filename works — multiple simulations can reference the same tool.
- Simulation files are flat
tests/e2e/- Directory containing end-to-end Playwright tests for each resource. Uses the Inspector to test your resources render properly across hosts (ChatGPT, Claude) and states (tool calls, saved state, dark mode, pip display mode, etc.).tests/live/- Directory containing live tests that run against real ChatGPT. These tests open your browser, send messages to ChatGPT, and validate your app renders correctly in the real host environment.
No entry point files needed! The framework automatically discovers your resources, tools, and simulations using conventions.
Examples
Example sunpeak resource, tool, & simulation files for an MCP App called “Review”.Resource
Each resource.tsx file exports both a ResourceConfig metadata object and the React component:
Tool
Each tool.ts file exports metadata (with a resource name), a Zod schema, and a handler:
Simulation
Simulation files provide fixture data for testing. Each references a tool by filename and contains the mock input/output:Included Tooling
The template includes minimal, essential tooling:Vite
Fast build tool with hot-reload (HMR) for instant development feedback. The framework owns the dev server configuration - just runsunpeak dev.
Tailwind CSS 4
Utility-first CSS framework for rapid UI development. Pre-configured via Vite plugin.TypeScript
Type safety with TypeScript 5. Configured viatsconfig.json.
Vitest (Unit Tests)
Vite-native testing framework for component testing. Run withpnpm test.
Playwright (E2E Tests)
End-to-end testing against the ChatGPT Inspector. Tests live intests/e2e/. Run with pnpm test:e2e.
Playwright (Live Tests)
Automated testing against real ChatGPT. Tests live intests/live/. Run with pnpm test:live. See the Testing Guide for setup details.
Add Your Own Tooling
The template is intentionally minimal. Add your preferred tools as needed:- Linting: ESLint
- Formatting: Prettier
- Type checking: Run
tsc --noEmitas a script
sunpeak CLI API Reference
All sunpeak CLI commands and configurations.