Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
TypeScript を活かしてデザインシステム MCP を作る / #tskaigi_aft...
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
izumin5210
May 27, 2025
Programming
920
5
Share
TypeScript を活かしてデザインシステム MCP を作る / #tskaigi_after_night
izumin5210
May 27, 2025
More Decks by izumin5210
See All by izumin5210
izumin5210のプロポーザルのネタ探し #tskaigi_msup
izumin5210
2
810
AI Agent の開発と運用を支える Durable Execution #AgentsInProd
izumin5210
8
2.7k
AI Agent Tool のためのバックエンドアーキテクチャを考える #encraft
izumin5210
6
2.1k
Building AI Agents with TypeScript #TSKaigiHokuriku
izumin5210
6
1.7k
Web エンジニアが JavaScript で AI Agent を作る / JSConf JP 2025 sponsor session
izumin5210
4
3.3k
AI Coding Meetup #3 - 導入セッション / ai-coding-meetup-3
izumin5210
0
3.7k
Web フロントエンドエンジニアに開かれる AI Agent プロダクト開発 - Vercel AI SDK を観察して AI Agent と仲良くなろう! #FEC余熱NIGHT
izumin5210
3
1.2k
複雑なフォームを継続的に開発していくための技術選定・設計・実装 #tskaigi / #tskaigi2025
izumin5210
15
10k
複雑なフォームの jotai 設計 / Designing jotai(state) for Complex Forms #layerx_frontend
izumin5210
10
4.5k
Other Decks in Programming
See All in Programming
GitHubCopilotCLIをはじめよう.pdf
htkym
0
330
Firefoxにコントリビューションして得られた学び
ken7253
2
160
運転動画を検索可能にする〜Cosmos-Embed1とDatabricks Vector Searchで〜/cosmos-embed1-databricks-vector-search
studio_graph
1
690
JCON - Create Agentic AI Apps, The Easy Way!
kdubois
1
100
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
260
空間オーディオの活用
objectiveaudio
0
150
サプライチェーン攻撃対策「層を重ねて落ちない壁」を10日間で組み上げた話 #TechLeadConf2026
kashewnuts
1
250
Liberating Ruby's Parser from Lexer Hacks
ydah
2
2.7k
エラー処理の温故知新 / history of error handling technic
ryotanakaya
7
1.9k
SREに優しいTerraform構成 modulesとstateの組み方
hiyanger
2
170
検索設計から 推論設計への重心移動と Recall-First Retrieval
po3rin
5
1.6k
Are We Really Coding 10× Faster with AI?
kohzas
0
150
Featured
See All Featured
Typedesign – Prime Four
hannesfritz
42
3k
Building Flexible Design Systems
yeseniaperezcruz
330
40k
How to make the Groovebox
asonas
2
2.2k
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
550
Odyssey Design
rkendrick25
PRO
2
610
Site-Speed That Sticks
csswizardry
13
1.2k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.4k
Discover your Explorer Soul
emna__ayadi
2
1.1k
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
1
210
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
530
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
350
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8.1k
Transcript
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