๐ฆ
chohi22TEST
MCP ์๋ฒ ํ ์คํธ
0 installs
Trust: 34 โ Low
Devtools
Ask AI about chohi22TEST
Powered by Claude ยท Grounded in docs
I know everything about chohi22TEST. Ask me about installation, configuration, usage, or troubleshooting.
0/500
Loading tools...
Reviews
Documentation
Simple MCP Server (Python Flask)
๊ฐ๋จํ ํ ์คํธ์ฉ MCP (Model Context Protocol) ์๋ฒ์ ๋๋ค. Python Flask๋ก ๊ตฌํ๋์ด ์์ ์ ์ธ HTTP ์๋ํฌ์ธํธ๋ฅผ ์ ๊ณตํฉ๋๋ค.
๊ธฐ๋ฅ
์ด ์๋ฒ๋ ๋ค์๊ณผ ๊ฐ์ ๊ธฐ๋ณธ ๋๊ตฌ๋ค์ ์ ๊ณตํฉ๋๋ค:
- hello_world: ๊ฐ๋จํ ์ธ์ฌ ๋ฉ์์ง ๋ฐํ
- calculate: ๊ธฐ๋ณธ ์ฐ์ ์ฐ์ฐ (๋ง์ , ๋บ์ , ๊ณฑ์ , ๋๋์ )
- get_time: ํ์ฌ ์๊ฐ ๋ฐํ
์ค์น
pip install -r requirements.txt
์คํ
๋ก์ปฌ ๊ฐ๋ฐ
python app.py
ํ๋ก๋์ (Gunicorn)
gunicorn --bind 0.0.0.0:3000 --workers 1 app:app
ํ ์คํธ
python test.py
๋ฐฐํฌ
smithery.ai์ ๋ฐฐํฌํ๋ ค๋ฉด:
./deploy.sh
๊ฐ๋ฐ
Python Flask ๊ธฐ๋ฐ์ผ๋ก ์์ฑ๋์์ผ๋ฉฐ, ๋ค์๊ณผ ๊ฐ์ ๊ตฌ์กฐ๋ฅผ ๊ฐ์ง๋๋ค:
app.py- Flask ๊ธฐ๋ฐ MCP ์๋ฒ (๋ฉ์ธ ์ ํ๋ฆฌ์ผ์ด์ )requirements.txt- Python ์์กด์ฑ ์ค์ Dockerfile- Docker ์ปจํ ์ด๋ ์ค์ (Python ๊ธฐ๋ฐ)smithery.yaml- smithery.ai ๋ฐฐํฌ ์ค์ (Custom Deploy)test.py- Python ํ ์คํธ ์คํฌ๋ฆฝํธdeploy.sh- ๋ฐฐํฌ ์คํฌ๋ฆฝํธ
๋ฐฐํฌ ๋ฐฉ์
- ๋ก์ปฌ ๊ฐ๋ฐ:
python app.py(Flask ๊ฐ๋ฐ ์๋ฒ) - smithery.ai ๋ฐฐํฌ: Custom Deploy (Docker ์ปจํ
์ด๋)
- Flask ์ฑ์ด HTTP ์๋ํฌ์ธํธ ์ ๊ณต
/mcp์๋ํฌ์ธํธ์์ lazy loading ์ง์- Gunicorn์ผ๋ก ํ๋ก๋์ ์๋ฒ ์คํ
- CORS ์ง์์ผ๋ก ๋ธ๋ผ์ฐ์ ํธํ์ฑ ํ๋ณด
API ์๋ํฌ์ธํธ
GET /: ํฌ์ค์ฒดํฌGET /health: ํฌ์ค์ฒดํฌ (๋ณ์นญ)GET /mcp: ๋๊ตฌ ๋ชฉ๋ก ๋ฐํ (lazy loading)POST /mcp: MCP ํ๋กํ ์ฝ ์์ฒญ ์ฒ๋ฆฌDELETE /mcp: ์๋ฒ ์ข ๋ฃ ์์ฒญ
์ฌ์ฉ ์์
hello_world ๋๊ตฌ
{
"name": "hello_world",
"arguments": {
"name": "Alice"
}
}
calculate ๋๊ตฌ
{
"name": "calculate",
"arguments": {
"operation": "add",
"a": 10,
"b": 5
}
}
get_time ๋๊ตฌ
{
"name": "get_time",
"arguments": {}
}
์๊ตฌ์ฌํญ
- Node.js 18 ์ด์
- npm ๋๋ yarn
๋ผ์ด์ผ์ค
MIT
