์๋ช
๋ ํ๊ฒฝ์ ํนํ๋ MCP(Model Context Protocol) ์๋ฒ์
๋๋ค.
๋ฐฑ์๋๋ FastMCP(Python)๋ก ์์ฑํ๊ณ , ๋ฐฐํฌ/ํธ์คํ
์ Smithery๋ฅผ ์ฌ์ฉํ์ต๋๋ค.
๊ณต์ง/ํ์ฌ์ผ์ /์๋จ/์ํ ๋ฑ ํต์ฌ ์ ๋ณด๋ฅผ MCP ํด๋ก ์ ๊ณตํ๋ฉฐ, ์์ฐ์ด๋ก ์กฐํยท์์ฝยท์ผ์ ๋ฑ๋ก/์ญ์ ๊ฐ ๊ฐ๋ฅํฉ๋๋ค.
- ๊ณต์ ๋ฐฐํฌ(๋ด ์๋ฒ): https://smithery.ai/server/@hwruchan/smus
- ๋ ํฌ์งํ ๋ฆฌ: https://github.com/oneTeam-MCP/final_mcp_server
- Pythonic & ๋น ๋ฅธ ๊ฐ๋ฐ: ๋ฐ์ฝ๋ ์ดํฐ(
@mcp.tool,@mcp.prompt)๋ง์ผ๋ก MCP ํด/ํ๋กฌํํธ๋ฅผ ๋ ธ์ถ - MCP ํ์ค ์ค์: STDIO/HTTP(SSE) ์ ์ก์ ํฌํจํ MCP ์คํ์ ๊ฐ๋จํ ๊ตฌํ
- ์ด์ ์นํ: Uvicorn/Starlette์ ๊ถํฉ์ด ์ข์ ๋ก์ปฌยท์ปจํ ์ด๋ ๋ฐฐํฌ๊ฐ ์์
์ฐธ๊ณ ๋ฌธ์
- FastMCP ๊ณต์ ์ฌ์ดํธ: https://gofastmcp.com/
- FastMCP GitHub: https://github.com/jlowin/fastmcp
- MCP ๊ณต์ ๋ฌธ์(๋น๋ ๊ฐ์ด๋): https://modelcontextprotocol.io/docs/develop/build-server
- ์ํด๋ฆญ ๋ฐฐํฌ: MCP ์๋ฒ๋ฅผ URL/๋ช ๋ น ๊ธฐ๋ฐ์ผ๋ก ์ฐ๊ฒฐํด ๋ฐ๋ก ์ฌ์ฉ
- ํด๋ผ์ด์ธํธ ์ฐ๊ฒฐ ์ฉ์ด: MCP URL ํ๋๋ก ๋ค์ํ ์์ด์ ํธ/ํด๋ผ์ด์ธํธ์์ ์ฌ์ฉ ๊ฐ๋ฅ
- ์๋ฒ ์นดํ๋ก๊ทธ: ๊ณต๊ฐ ์๋ฒ๋ก ๋ฐฐํฌํด ๊ณต์ /๋ฐ๊ฒฌ์ด ์ฌ์
์ฐธ๊ณ ๋ฌธ์
- Smithery: https://smithery.ai/
- Connect to MCPs: https://smithery.ai/docs/use/connect
- Deploy ๊ฐ์ด๋(์์): https://smithery.ai/docs/build/deployments/typescript
[Frontend / MCP Client (์: Smithery, Chat UI)] โ JSON-RPC over HTTP (streamable-http) โผ [FastMCP Server (Python, Uvicorn/Starlette)] โโ @prompt : default_prompt (KST ์ต์ปค๋ง, ๋๊ตฌ ํธ์ถ ๊ท์น) โโ @tool : now_kr, query_smu_* (meals/notices/exam/schedule), add/delete schedule ... โโ RDS(MySQL) : PyMySQL๋ก ์ค๋ฐ์ดํฐ ์กฐํ/์ฐ๊ธฐ
- Transport: HTTP(JSON-RPC, streamable-http)
- Timezone: KST(Asia/Seoul) ๊ธฐ์ค ์ต์ปค๋ง
- DB: RDS MySQL (ํ๊ฒฝ๋ณ์๋ก ์ ์ ์ ๋ณด ๊ด๋ฆฌ)
- ํตํฉ ์กฐํ: ๊ณต์ง/ํ์ฌ์ผ์ /์๋จ/์ํ์ ํ ์ธํฐํ์ด์ค๋ก
- ์์ฐ์ด ์ํธ์์ฉ: โ์ค๋ ์ ์ฌ ๋ญ์ผ?โ, โ์ค๊ฐ๊ณ ์ฌ ์ผ์ ์ฐพ์์คโ
- ์ผ์ ๊ด๋ฆฌ: ๊ฐ์ธ ์ผ์ ๋ฑ๋ก/์ญ์ (
add_smu_schedule_structured,delete_smu_schedule_by_content) - ์์ ์ฅ์น ํ๋กฌํํธ: ๋ ์ง ์์กด ์ง๋ฌธ ์
now_krํธ์ถ, ๋์ด์ฐ๊ธฐ ๋ณํ ์๋ ๊ณ ๋ ค
git clone https://github.com/oneTeam-MCP/final_mcp_server.git
cd final_mcp_server
pip install -r requirements.txt
# ํ๊ฒฝ๋ณ์ (์์) โ ์ด์์ .env / Secret Manager ๊ถ์ฅ
export DB_HOST=your-host.rds.amazonaws.com
export DB_USER=your-user
export DB_PASSWORD=your-password
export DB_NAME=oneteam_DB
export DB_PORT=3306
export PORT=8081
python server.py
# โ http://0.0.0.0:8081 ๋ก MCP HTTP ์๋ฒ๊ฐ ๋น๋๋ค.
Smithery์์ ์ฌ์ฉ
์ ์๋ฒ๋ฅผ Smithery์ ๋ฑ๋กํ๊ฑฐ๋, ๊ณต๊ฐ ๋ฐฐํฌ๋ณธ(https://smithery.ai/server/@hwruchan/smus)์
๋ฐ๋ก ์ฐ๊ฒฐํด ์ฌ์ฉํ ์ ์์ต๋๋ค.