Content
# FastAPI MCP Workshop
This repository contains sample code for a workshop to implement MCP (Model Context Protocol) using FastAPI.
## Setup
Run the following command to install the Python package manager uv (https://docs.astral.sh/uv/getting-started/installation/).
### MacOS/Linux
```bash
curl -LsSf https://astral.sh/uv/install.sh | sh
```
### Windows
```bash
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
```
## Project Setup
Clone the source code with the following command.
```bash
git clone https://github.com/Miura55/fastapi-mcp-workshop
cd fastapi-mcp-workshop
```
Prepare a virtual environment.
```bash
uv venv
```
## Starting the Application
Start the application with the following command.
```bash
uv run uvicorn main:api.app --host 0.0.0.0 --reload
```
## Connecting with mcp-proxy
Additionally, install mcp-proxy.
```bash
uv tool install mcp-proxy
```
Open the configuration file for Claude Desktop (`claude_desktop_config.json`) and make the following settings according to your OS.
- Windows
```json
{
"mcpServers": {
"my-api-mcp-proxy": {
"command": "mcp-proxy",
"args": ["http://127.0.0.1:8000/mcp"]
}
}
}
```
- MacOS
For MacOS, you need to specify the full path to mcp-proxy. You can check the full path with `which mcp-proxy`.
```json
{
"mcpServers": {
"my-api-mcp-proxy": {
"command": "/Full/Path/To/Your/Executable/mcp-proxy",
"args": ["http://127.0.0.1:8000/mcp"]
}
}
}
```
Connection Info
You Might Also Like
everything-claude-code
Complete Claude Code configuration collection - agents, skills, hooks,...
markitdown
MarkItDown-MCP is a lightweight server for converting URIs to Markdown.
firecrawl
Firecrawl MCP Server enables web scraping, crawling, and content extraction.
servers
Model Context Protocol Servers
servers
Model Context Protocol Servers
Time
A Model Context Protocol server for time and timezone conversions.