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
FastMCPでMCPサーバー/クライアントを構築してみる
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
ttnyt8701
May 29, 2025
Programming
780
3
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
FastMCPでMCPサーバー/クライアントを構築してみる
https://blueish.connpass.com/event/355753/
ttnyt8701
May 29, 2025
More Decks by ttnyt8701
See All by ttnyt8701
ユーザーシュミレーション AIプロダクトのバグを事前検知
ttnyt8701
0
10
Gemini CLI のはじめ方
ttnyt8701
1
330
ObsidianをMCP連携させてみる
ttnyt8701
4
7.9k
Claude Codeの使い方
ttnyt8701
3
480
LangChain Open Deep Researchとは?
ttnyt8701
2
500
Vertex AI Agent Builderとは?
ttnyt8701
4
460
A2A(Agent2Agent )とは?
ttnyt8701
2
550
Amazon Bedrock LLM as a Judgeを試す
ttnyt8701
3
250
Amazon Sagemaker Jump Startを用いて爆速でモデルを作成してみる
ttnyt8701
3
140
Other Decks in Programming
See All in Programming
DynamoDBの基礎を振り返りながらベクトル検索機能を理解する
musan
3
280
GraphRAGのKnowledge Graphを 直接!見る/View-GraphRAG's-KnowledgeGraph-directly!
tyumugi1113
1
280
数年滞っていたダークモード対応をおよそ2週間で完了させる
chigichan24
0
700
Gmail/Google DriveをトリガーにAIエージェントを動かそう! / Run AI agents with Gmail/Google Drive as triggers!
har1101
3
490
AI × TiDD / 2026.09.05 Redmine 大阪
tokudiro
1
120
不幸な GC
chencmd
0
900
一参加者から『中の人』へ 〜全通PHPerがブースに立って学んだ、カンファレンスを100倍楽しむコツ〜
wp_daisuke
0
140
GKE で Pod の見方を変えたら、スケールアウト時の挙動を真に捉えられた話
stkk
0
110
AIを上手に使っていこうとしたら越境せざるを得なくなった話 〜実践1年で見えた境界を越えなければならない理由と進め方〜 / Crossing borders with AI
tomoyakitaura
4
1.1k
AIは賢い。でも実行環境は? CLIおじさんがAI時代に伝えたいこと ~ CLIおじさんがAI時代に伝えたいこと ~
curekoshimizu
1
220
Hello, Hiroshima Geospatial Data! — Exploring DoboX with Python
ra0kley
0
180
Go × SIMDで高速化するベクトル検索 ~ルーフラインモデルでSIMDが効く境界を探れ! ~
po3rin
1
190
Featured
See All Featured
The Power of CSS Pseudo Elements
geoffreycrofte
82
6.6k
Facilitating Awesome Meetings
lara
57
7.1k
Producing Creativity
orderedlist
PRO
348
41k
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
490
KATA
mclloyd
PRO
35
15k
Claude Code のすすめ
schroneko
67
230k
Code Review Best Practice
trishagee
74
20k
How to Think Like a Performance Engineer
csswizardry
28
2.8k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.3k
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
Art, The Web, and Tiny UX
lynnandtonic
304
22k
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
380
Transcript
FastMCPでMCPサーバー/クライアントを構築してみる 2025.05.29 ©BLUEISH 2025. All rights reserved.
立野 祐太 Yuta Tateno LLMを用いた業務プロセス改善アプリケーションの開発従事しています エンジニア 自己紹介 ©BLUEISH 2025. All
rights reserved.
1. MCPとは? 2. FastMCPとは? 3. ハンズオン 4. 振り返り 目次
MCPとは? ©BLUEISH 2025. All rights reserved.
MCPとは? MCPはAIアプリケーションが外部システムとやり取りするためのオープンプロトコル → AIアプリケーション用の USB-Cのようなもの。USB-Cのように1つの規格で何にでも接続可能
MCPとは? MCPホスト 生成AIモデルを搭載したアプリケーション (claude desktop, cursorなど) MCPホストからMCP クライアントを通じて外部データやツールにアクセス
MCPとは? MCPクライアント MCP ホスト内に組み込まれたコンポーネント MCP サーバーとの1:1接続を確立し、機能を利用するためのリクエストを送信
MCPとは? MCPサーバー 特定のデータソースやツールへのアクセスを提供する軽量プログラム
FastMCPとは? ©BLUEISH 2025. All rights reserved.
FastMCPとは? FastMCPはMCPサーバー とMCPクライアント を高速かつ簡単に作成することができる Pythonのフレームワーク
FastMCPとは? なぜ必要なのか? 課題 MCPの実装にはサーバーのセットアップ、プロトコルハンドラー、コンテンツタイプ、エラー管理など、多くの定型処理 が必要 解決 FastMCPが複雑なプロトコルの詳細とサーバー管理をすべて処理するため、開発者はツールの構築に集中できる
FastMCPとは? FastMCP v1 公式MCP Python SDKに組み込まれている FastMCP v2 完全なクライアント サポート、サーバー構成、
OpenAPI/FastAPI 統合、リモートサーバー プロキシ、組み込みテスト ツールなどを導入することで、 v1の基本的なサーバー構築機能を大幅に拡張した、アクティブにメンテナンスされて いるバージョン v1とv2では高い互換性があり、基本的には import文を変更するだけで移行可能
ハンズオン ©BLUEISH 2025. All rights reserved.
インストール
MCPサーバー構築 1. ライブラリをインポート 2. MCPサーバーを初期化 3. 関数を定義 4. デコレータを使ってサーバーにツールを登録 5.
ローカル実行なのでトランスポートは stdioを指定
MCPサーバー構築 利用可能なトランスポート
MCPサーバー構築 ファイルを実行してサーバーが立ち上がることを確認 fastmcpコマンドでも実行可能で、このとき mainブロックは実行されない。 ソースコードの変更なしでトランスポートなどの設定が可能
MCPサーバー構築 MCPホストから構築したMCPサーバーを呼び出す → Cursorを利用 MPCサーバーを登録 設定画面
MCPサーバー構築 MCPホストから登録したMCPサーバーを利用していることを確認
MCPクライアント構築 1. ライブラリをインポート 2. 非同期関数を定義 3. スクリプトパスを指定 4. トランスポートを初期化 5.
クライアントからMCPサーバーのツール を呼び出し
MCPクライアント構築 実行してみると、登録してあるMPCサーバーのツー ル情報と呼び出し結果が確認できた
振り返り ©BLUEISH 2025. All rights reserved.
1. FastMCPとはMCPを簡単に構築できるPythonフレームワーク 2. 数行のコードでMCPサーバーとMCPクライアントを構築することが確認できた 振り返り
参考 https://modelcontextprotocol.io/introduction https://gofastmcp.cm/getting-started/welcome https://github.com/jlowin/fastmcp?tab=readme-ov-file