- Explore MCP Servers
- fastapi-mcp-workshop
Fastapi Mcp Workshop
What is Fastapi Mcp Workshop
fastapi-mcp-workshop is a sample code repository for implementing the Model Context Protocol (MCP) using FastAPI.
Use cases
Use cases include building APIs that interact with machine learning models, creating data processing pipelines, and developing applications that require real-time data communication.
How to use
To use fastapi-mcp-workshop, clone the repository, set up a virtual environment using ‘uv’, and run the application with ‘uv run uvicorn main:api.app --host 0.0.0.0 --reload’. Additionally, install ‘mcp-proxy’ for connecting to the MCP server.
Key features
Key features include easy setup with uv, integration with FastAPI, and the ability to connect to MCP servers using mcp-proxy.
Where to use
fastapi-mcp-workshop can be used in web development projects that require communication with MCP servers, particularly in applications involving machine learning and data processing.
Clients Supporting MCP
The following are the main client software that supports the Model Context Protocol. Click the link to visit the official website for more information.
Overview
What is Fastapi Mcp Workshop
fastapi-mcp-workshop is a sample code repository for implementing the Model Context Protocol (MCP) using FastAPI.
Use cases
Use cases include building APIs that interact with machine learning models, creating data processing pipelines, and developing applications that require real-time data communication.
How to use
To use fastapi-mcp-workshop, clone the repository, set up a virtual environment using ‘uv’, and run the application with ‘uv run uvicorn main:api.app --host 0.0.0.0 --reload’. Additionally, install ‘mcp-proxy’ for connecting to the MCP server.
Key features
Key features include easy setup with uv, integration with FastAPI, and the ability to connect to MCP servers using mcp-proxy.
Where to use
fastapi-mcp-workshop can be used in web development projects that require communication with MCP servers, particularly in applications involving machine learning and data processing.
Clients Supporting MCP
The following are the main client software that supports the Model Context Protocol. Click the link to visit the official website for more information.
Content
FastAPI MCP Workshop
このレポジトリはMCP(Model Context Protocol)をFastAPIで実装するためのワークショップ用のサンプルコードです。
セットアップ
以下のコマンドを実行して、Pythonのパッケージ管理ツールのuv (https://docs.astral.sh/uv/getting-started/installation/) をインストールします。
MacOS/Linux
curl -LsSf https://astral.sh/uv/install.sh | sh
Windows
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
プロジェクトのセットアップ
以下のコマンドでソースコードをクローンします。
git clone https://github.com/Miura55/fastapi-mcp-workshop
cd fastapi-mcp-workshop
仮想環境を用意します。
uv venv
アプリケーションの起動
以下のコマンドでアプリケーションを起動します。
uv run uvicorn main:api.app --host 0.0.0.0 --reload
mcp-proxyを使って接続
追加でmcp-proxyをインストールします。
uv tool install mcp-proxy
Claude Desktopの設定ファイル( claude_desktop_config.json) を開き、お使いのOSに合わせて以下の設定を行います。
- Windows
{
"mcpServers": {
"my-api-mcp-proxy": {
"command": "mcp-proxy",
"args": [
"http://127.0.0.1:8000/mcp"
]
}
}
}
- MacOS
MacOSの場合、mcp=proxyのパスをフルパスで指定する必要があります。which mcp-proxyでフルパスを確認できます。
{
"mcpServers": {
"my-api-mcp-proxy": {
"command": "/Full/Path/To/Your/Executable/mcp-proxy",
"args": [
"http://127.0.0.1:8000/mcp"
]
}
}
}
Dev Tools Supporting MCP
The following are the main code editors that support the Model Context Protocol. Click the link to visit the official website for more information.










