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
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
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
13
Gemini CLI のはじめ方
ttnyt8701
1
340
ObsidianをMCP連携させてみる
ttnyt8701
4
8.1k
Claude Codeの使い方
ttnyt8701
3
490
LangChain Open Deep Researchとは?
ttnyt8701
2
510
Vertex AI Agent Builderとは?
ttnyt8701
4
470
A2A(Agent2Agent )とは?
ttnyt8701
2
570
Amazon Bedrock LLM as a Judgeを試す
ttnyt8701
3
280
Amazon Sagemaker Jump Startを用いて爆速でモデルを作成してみる
ttnyt8701
3
140
Other Decks in Programming
See All in Programming
App Intentsのビルドプロセスを支える技術
kntkymt
0
490
カツオ、ご期待ください
suneo3476
0
130
Omarchy Tokyo やると聞いて UMPC 買ってセットアップしてきた
mtsmfm
0
200
App Storeの外へ──日本のiOSサイドローディング入門 for iOSDC Japan 2026
yuukiw00w
0
280
Go × SIMDで高速化するベクトル検索 ~ルーフラインモデルでSIMDが効く境界を探れ! ~
po3rin
1
5.6k
動作中のプログラムの中身をリアルタイムに覗く / Realtime Debugger for CSharp with Roslyn
prota
1
1.7k
FreeBSDでZabbixを動かす
kenkino
0
340
[2026-09-26]空論ジェネリックプロセス~テスト資産とAIで紡ぐ、再現可能なパフォーマンスチューニングの話~
tosite
0
250
The Rails Doctrine Decade
koic
2
440
モジュールの視点からSwiftを読み解く #iosdc
s_shimotori
0
290
Security issues being discussed on Web Platforms
petamoriken
0
1.4k
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
370
Featured
See All Featured
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.6k
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
470
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
380
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
1k
Leo the Paperboy
mayatellez
10
2.3k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.9k
SEO for Brand Visibility & Recognition
aleyda
0
4.8k
Git: the NoSQL Database
bkeepers
PRO
432
67k
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4.4k
Mobile First: as difficult as doing things right
swwweet
225
10k
We Are The Robots
honzajavorek
0
380
Building AI with AI
inesmontani
PRO
1
1.3k
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