loading…
Search for a command to run...
loading…
A framework for building interactive UI applications and React-based widgets for ChatGPT and Claude using the Model Context Protocol. It enables developers to c
A framework for building interactive UI applications and React-based widgets for ChatGPT and Claude using the Model Context Protocol. It enables developers to create custom tools and visual components that facilitate rich, bidirectional interaction between AI models and users.
ChatGPT와 Claude에서 실행되는 인터랙티브 UI 애플리케이션을 구축하는 MCP 앱입니다.
🔗 Repository: github.com/mimsut/mcp_kkebi
# Clone
git clone https://github.com/mimsut/mcp_kkebi.git
cd mcp_kkebi
# 설치
npm install
# 개발 모드
npm run dev
# 빌드
npm run build
my-mcp-app/
├── src/
│ └── index.ts # MCP 서버 진입점 (TypeScript)
├── dist/
│ └── index.js # 빌드된 서버 (JavaScript)
├── resources/
│ ├── example-widget/ # 예제 위젯
│ │ ├── widget.tsx # React 컴포넌트
│ │ └── types.ts # Props 타입
│ └── counter-widget/ # 인터랙티브 카운터 위젯
│ ├── widget.tsx
│ └── types.ts
├── package.json
├── tsconfig.json
├── mcp-config.json # MCP 설정 파일
└── README.md
src/index.ts)resources/ 폴더의 React 컴포넌트로 클라이언트에서 렌더링npm install
npm run build
npm run dev
npm start
nano ~/Library/Application\ Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"my-mcp-app": {
"command": "node",
"args": [
"/Users/user/Downloads/b_ru8Xi2QdWzH-1771717682115/my-mcp-app/dist/index.js"
]
}
}
}
설정 파일 위치: %APPDATA%\Claude\claude_desktop_config.json
환영 메시지와 기본 정보를 표시하는 간단한 위젯입니다.
사용법:
widget://example
특징:
사용자 상호작용을 보여주는 인터랙티브 카운터 위젯입니다.
사용법:
widget://counter
특징:
사용자에게 환영 메시지를 표시합니다.
파라미터:
name (string, 필수): 사용자 이름예제:
{
"name": "홍길동"
}
응답:
안녕하세요, 홍길동님! MCP 앱에 오신 것을 환영합니다! 🎉
# 개발 모드로 실행
npm run dev
# 다른 터미널에서 MCP Inspector 사용
npx @modelcontextprotocol/inspector node dist/index.js
MCP Inspector를 사용하면 다음을 할 수 있습니다:
resources/ 폴더에 새 디렉토리 생성:mkdir resources/my-widget
types.ts 파일 생성:export interface MyWidgetProps {
// props 정의
}
widget.tsx 파일 생성:import React from "react";
import type { MyWidgetProps } from "./types";
export default function MyWidget(props: MyWidgetProps) {
return <div>{/* 위젯 UI */}</div>;
}
src/index.ts에 리소스 핸들러 추가:server.setRequestHandler(ReadResourceRequestSchema, async (request) => {
// ...
if (uri === "widget://my-widget") {
return {
contents: [{
uri: "widget://my-widget",
mimeType: "application/vnd.mcp.widget+json",
text: JSON.stringify({
type: "my-widget",
props: { /* props */ },
}),
}],
};
}
// ...
});
main 브랜치에 push → 자동 배포또는 CLI 사용:
npx @mcp-use/cli deploy
프로덕션 환경에서 필요한 환경 변수가 있다면 .env 파일 생성:
# .env
API_KEY=your_api_key
DATABASE_URL=your_database_url
프로젝트는 다음 기준으로 평가됩니다:
useCallTool(), sendFollowUpMessage() 등 양방향 통신 활용state(), setState() 활용이슈나 PR은 언제나 환영합니다!
MIT License
# 1. 의존성 설치
npm install
# 2. 빌드
npm run build
# 3. Claude Desktop에 연결
# ~/Library/Application Support/Claude/claude_desktop_config.json 편집
# 4. Claude Desktop 재시작
# 5. Claude에서 테스트
# "greet" 도구 호출하거나 위젯 표시 요청
이제 ChatGPT와 Claude에서 실행되는 멋진 인터랙티브 MCP 앱을 만들 준비가 되었습니다! 🚀✨
Добавь это в claude_desktop_config.json и перезапусти Claude Desktop.
{
"mcpServers": {
"mcp-kkebi": {
"command": "npx",
"args": []
}
}
}