
pomerium/mcp-app-typescript-template
Developer tools이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기
Pomerium을 사용하는 MCP 앱 템플릿, Model Context Protocol (MCP) TypeScript SDK, Vite가 제공하는 Node.js 서버 및 React 위젯이 있습니다.
개요
MCP 앱 구축을 위한 모범 사례를 데모 템플릿으로 React 위젯을 사용하여 Model Context Protocol (MCP)를 사용하여 MCP Apps를 구축할 수 있습니다. TypeScript, Tailwind CSS v4, Pino logging, Storybook 및 강력한 개발 경험을 위한 Vitest를 활용합니다. - McpServer 및 MCP Apps 헬퍼와 Node.js 서버 - Zod validation 및 UI 바인딩이있는 예 도구 - MCP Apps App API 데모와 상호 작용하는 에코 구성 요소 - 인라인, 그림 - 인 - 그림 및 요청을 통해 실행 시간 투글링이있는 풀 스크린DisplayMode () - - callServerTool, openLink, sendMessage, updateModelContext는 Echo 위젯에 전시되었습니다 - 전송 세션 또는 서버가없는 서버 공장 - Wi-Findity에서 Hdget을 사용하여.
개요(AI 번역)
MCP 앱 구축을 위한 모범 사례를 데모 템플릿으로 React 위젯을 사용하여 Model Context Protocol (MCP)를 사용하여 MCP Apps를 구축할 수 있습니다. TypeScript, Tailwind CSS v4, Pino logging, Storybook 및 강력한 개발 경험을 위한 Vitest를 활용합니다.
특징
- MCP Server - Node.js 서버 -
McpServer및 MCP 앱 도우미 - Echo Tool - Zod Validation 및 UI 바인딩을 가진 예제 도구
-React Widgets - MCP 앱과 상호 작용하는 에코 컴포넌트 [T1]] API 데모
-Display Mode - Inline, picture-in-picture, and fullscreen with runtime toggling via
requestDisplayMode()] -App API 데모 -callServerTool,openLink],sendMessage,updateModelContext] Echo 위젯에 전시 - Stateless MCP HTTP - 전송 세션이나 세션 친화 없이 Per-request 서버 공장
- **No-Build Dev Loop ** - Claude.ai 및 ChatGPT의 HMR와 Vite dev 서버에서 Widgets로드 라이브
- **컨테이너 치수 ** - 호스트 프로vided
containerDimensions를 사용하여 응답 위젯 -Mock App - Drop-increateMockApp()] 실시간 MCP 연결 없이 테스트 및 스토리북에 대한 도움말
이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요.
README
원문 README의 일부입니다. 원문 보기.
MCP Apps Template
A well-architected starter template demonstrating best practices for building MCP Apps using the Model Context Protocol (MCP) with React widgets. It leverages TypeScript, Tailwind CSS v4, Pino logging, Storybook, and Vitest for a robust development experience.
Features
- MCP Server - Node.js server with
McpServerand MCP Apps helpers - Echo Tool - Example tool with Zod validation and UI binding
- React Widgets - Interactive Echo component with MCP Apps
AppAPI demo - Display Modes - Inline, picture-in-picture, and fullscreen with runtime toggling via
requestDisplayMode() - App API Demo -
callServerTool,openLink,sendMessage,updateModelContextshowcased in the Echo widget - Stateless MCP HTTP - Per-request server factories with no transport sessions or session affinity
- No-Build Dev Loop - Widgets load live from the Vite dev server with HMR in Claude.ai and ChatGPT
- Container Dimensions - Responsive widget sizing using host-provided
containerDimensions - Mock App - Drop-in
createMockApp()helper for testing and Storybook without a live MCP connection - Pino Logging - Structured logging with pretty printing in development
- TypeScript - Strict mode with ES2023 target
- Tailwind CSS v4 - Modern styling with dark mode support
- Storybook - Component development with a11y addon
- Testing - Vitest for server and widgets with accessibility checks
- Build Optimizations - Parallel builds, content hashing, compression
- Docker - Multi-stage builds with health checks
- Production Ready - Stateless transport, graceful shutdown, and error handling
Architecture
graph TD
A[MCP Host] -->|HTTPStreamable| B[MCP ServerNode.js + Express]
B -->|_meta.ui.resourceUri| C[App ViewReact in iframe]
B -.-> B1[Echo Tool]
B -.-> B2[Resource Registration]
B -.-> B3[text/html;profile=mcp-appMIME type]
C -.-> C1[Receives App.ontoolresult]
C -.-> C2[callServerTool, openLink,sendMessage, updateModelContext]
C -.-> C3[Theme, displayMode, safeArea,containerDimensions]
style A fill:#e1f5ff
style B fill:#fff4e6
style C fill:#f3e5f5
Quick Start
Setup time: ~5 minutes (first time)
Prerequisites
- Node.js 24+ (required for ES2023 support and native type stripping)
- Verify:
node -v(should show v24.0.0 or higher)
- Verify:
- npm 11+ (ships with Node 24)
- Verify:
npm -v(should show v10.0.0 or higher)
- Verify:
Supported platforms: macOS, Linux, Windows (via WSL2)
Installation & Setup
git clone https://github.com/pomerium/mcp-app-typescript-template your-mcp-app
cd your-mcp-app
npm install
npm run dev
설치
npx playwright install --with-deps chromium`.