Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
TypeScript を活かしてデザインシステム MCP を作る / #tskaigi_aft...
Search
izumin5210
May 27, 2025
Programming
1k
5
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
TypeScript を活かしてデザインシステム MCP を作る / #tskaigi_after_night
izumin5210
May 27, 2025
Transcript
15 slides
TypeScript を活かしてデザインシステム MCP を作る 2025-05-27 TSKaigi 2025 After Night 〜セッションおかわりの会!〜
@izumin5210
@izumin5210 © LayerX Inc. whoami LayerX バクラク事業部 (2022-09 -) Platform
Engineering 部 Enabling チーム Staff Software Engineer ISUCON14 4位 飛び入り LT だ!(イベント始まってから作り始めました)
TSKaigi 2025 でも話したよ! © LayerX Inc. 3
LayerX バクラク事業部 @shota8511_tech の発表 デザインシステムのデザイントークンと共通 UI コンポーネントの情報を返す MCP server を作っています
© LayerX Inc. 4
この MCP server の、とくに UI コンポーネントに関する情報は Storybook から抽出しています https://zenn.dev/layerx/articles/7e9f87fca65e94 ©
LayerX Inc. 5
Storybook は React コンポーネントの Props の定義をうまく輸出し、ドキュメントとして表示できます © LayerX Inc. 6
© LayerX Inc. Storybook は何を、どうやって抽出しているか Storybook の情報をどうやって MCP で利用するか 7
Button コンポーネントの props 定義 型はもちろん、その props の意味や使い方・注意点などもコメントに残しています(これはもともと人間用) この型やコメントが Storybook にも反映されています
© LayerX Inc. Storybook はどこから、何を、どうやって抽出しているか 8
Storybook における React コンポーネントの情報取得 © LayerX Inc. Storybook では react-docgen
or react-docgen-typescript を利用し、 コードから情報を抜き出してドキュメントを生成している デフォルトは react-docgen だが、 react-docgen-typescript に変更可能 react-docgen-typescript は型情報も利用してくれるが、ビルドに時間がかかる react-docgen-typescript は TSDoc(JSDoc) + 型情報を見てくれる さっきの Button の例もそうでしたね 9
react-docgen-typescript を使えばコンポーネントの情報を抜き出せるのでは? © LayerX Inc. 10
なんかそれっぽい感じで呼び出して… © LayerX Inc. 11
なんかそれっぽい感じで使ってみる © LayerX Inc. 12
できた? © LayerX Inc. 13
それっぽい © LayerX Inc. 14
雑感 © LayerX Inc. 実はコンポーネントの実装をそのまま渡すだけでもそれなりにいい感じになるらしい Storybook で必要な情報に絞ることで AI 的にはノイズが減り、精度もいいはずと信じてる 実際に
Agent に利用してもらった感じだと、 TSDoc に @example を書いているのが Few-shot prompting 的に効いてそう これも Ubie さんのブログを見て悔しくなって半日くらいで試したやつなので もっといい感じの方法もたぶんある キミだけの最強の MCP server を作ろう! 15
More Decks by izumin5210
See All by izumin5210
コンパウンドプロダクト開発のためのローカルプロセスマネージャー再発明 #layerxgo
izumin5210
0
1k
in-process GraphQL のすすめ #ginzajs
izumin5210
4
1.6k
開発体験を左右するライブラリの API 設計 - GraphQL スキーマ構築ライブラリから考える #tskaigi
izumin5210
2
2.3k
izumin5210のプロポーザルのネタ探し #tskaigi_msup
izumin5210
2
1.1k
AI Agent の開発と運用を支える Durable Execution #AgentsInProd
izumin5210
8
3.2k
AI Agent Tool のためのバックエンドアーキテクチャを考える #encraft
izumin5210
6
2.5k
Building AI Agents with TypeScript #TSKaigiHokuriku
izumin5210
6
1.9k
Web エンジニアが JavaScript で AI Agent を作る / JSConf JP 2025 sponsor session
izumin5210
4
3.7k
AI Coding Meetup #3 - 導入セッション / ai-coding-meetup-3
izumin5210
0
3.8k
Other Decks in Programming
See All in Programming
Next.js: The final boss of Web Performance
guaca
0
410
當我們開始不讀 Code - AI Agent 時代,Code Review 與 Clean Code 還剩下什麼?
jame2408
1
370
Performance Optimization With LLMs
xleitix
0
260
AI駆動開発4年目の現在地(『あなたはFDEになるべきか?』イベント資料)
kumaiu
0
620
はじめてのPLATEAU
nokonoko1203
1
650
社内AIエージェント「Askワンバン」における コストチューニングの取り組み
t0yohei
0
170
止まらない比較を止める — 余帰納法で無限ストリームを比べる
tarao
0
140
[DroidKnights 2026] Workflow AX: From Auto-Documented Policies to E2E Testing
raeminkang
0
570
プロジェクトコードをキレイキレイしよう!暗黙的な参照を読み解く静的解析
ostk0069
0
210
Web Framework Benchmark Battle 2026, Any%
a_matsuda
3
3.2k
Enforcing Your Architecture with Unit Tests in the AI Era (Swift Connection X)
steliosf
PRO
1
170
우리의 Nitro Modules는 당신의 Turbo Modules보다 아름답다
l2hyunwoo
0
260
Featured
See All Featured
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
1
610
Fireside Chat
paigeccino
43
4.1k
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
430
The browser strikes back
jonoalderson
0
1.9k
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
690
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
610
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
640
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.5k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
Jamie Indigo - Trashchat’s Guide to Black Boxes: Technical SEO Tactics for LLMs
techseoconnect
PRO
0
750
Fantastic passwords and where to find them - at NoRuKo
philnash
53
4k
Producing Creativity
orderedlist
PRO
348
41k