dani-mcp-sse-server

dani-mcp-sse-server

3.3

FastAPI-MCP is a tool for automatically exposing FastAPI endpoints as MCP (Model Context Protocol) tools without configuration.

dani-mcp-sse MCP server

FastAPI-MCP๋Š”FastAPI ์—”๋“œํฌ์ธํŠธ๋ฅผ MCP(Model Context Protocol) ๋„๊ตฌ๋กœ ์ž๋™ ๋…ธ์ถœํ•˜๊ธฐ ์œ„ํ•œ ๊ตฌ์„ฑ์ด ํ•„์š” ์—†๋Š” ๋„๊ตฌ์ž…๋‹ˆ๋‹ค. FastAPI๋ฅผ MCP ์„œ๋ฒ„๋กœ ์‚ฌ์šฉํ•˜๋Š” ๋ฐฉ๋ฒ•์„ ์„ค๋ช…ํ•ฉ๋‹ˆ๋‹ค.

FastAPI MCP ์„œ๋ฒ„ ํ…Œ์ŠคํŠธ์šฉ ํ”„๋กœ์ ํŠธ ๊ตฌ์กฐ๋Š” ๋‹ค์Œ๊ณผ ๊ฐ™์Šต๋‹ˆ๋‹ค.

.
โ”œโ”€ README.md
โ”œโ”€ pyproject.toml
โ””โ”€ src
   โ””โ”€ dani_mcp_sse_server
       โ”œโ”€ __init__.py
       โ””โ”€ server.py

1. ์„ค์น˜

FastAPI๋ฅผ MCP Server๋กœ ์‚ฌ์šฉํ•˜๊ธฐ ์œ„ํ•ด์„œ๋Š” ํด๋ผ์ด์–ธํŠธ์—์„œ mcp-proxy๋ฅผ ์‚ฌ์šฉํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.

# fastapi-mcp ์„ค์น˜ 
uv add fastapi-mcp
# mcp-proxy ์„ค์น˜ 
# Option 1: With uv (recommended)
uv tool install mcp-proxy

2. cluade_desktop_config.json

claude_desktop_config.json์— ๋‹ค์Œ์„ ์ถ”๊ฐ€ํ•ฉ๋‹ˆ๋‹ค.

{
  "mcpServers": {
    "my-api-mcp-proxy": {
        "command": "mcp-proxy",
        "args": ["http://127.0.0.1:8000/mcp"]
    }
  }
}

3. Server ์‹คํ–‰

uvicorn์„ ์‚ฌ์šฉํ•˜์—ฌ server๋ฅผ ๋”ฐ๋กœ ์‹คํ–‰ํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค. pyproject.toml์— scripts๋ฅผ ๋“ฑ๋กํ•ฉ๋‹ˆ๋‹ค.

[project.scripts]
dani-mcp-sse-server = "dani_mcp_sse_server:main"

๋‹ค์Œ์„ ์‹คํ–‰ํ•ฉ๋‹ˆ๋‹ค.

uv run dani-mcp-sse-server

4. ์ฐธ๊ณ