๐ HTTP-4-MCP ๋ฏธ๋ค์จ์ด ์๋ฒ
๐ ๋ฒ์
๐ ํ์ด์ฌ
๐ ํนํ
๐ ์๊ฐ
HTTP-4-MCP๋ ์ผ๋ฐ HTTP ์ธํฐํ์ด์ค๋ฅผ MCP(๋ชจ๋ธ ์ ์ด ํ๋กํ ์ฝ) ์ธํฐํ์ด์ค๋ก ๋ง๋ฒ์ฒ๋ผ ๋ณํํด ์ฃผ๋ ๊ฐ๋ ฅํ ๋ฏธ๋ค์จ์ด ์๋ฒ์ ๋๋ค. ๊ฐ๋จํ ์ค์ ๋ง์ผ๋ก HTTP API๋ฅผ ์ฆ์ MCP ๋๊ตฌ๋ก ํ์ฉํ ์ ์์ต๋๋ค!
โจ ์ฃผ์ ํน์ง
๐ HTTP์์ MCP๋ก : HTTP API๋ฅผ MCP ์ธํฐํ์ด์ค๋ก ํ ๋ฒ์ ํด๋ฆญ์ผ๋ก ๋ณํ
๐ JSON ๊ตฌ์ฑ : ๊ฐ๋จํ๊ณ ์ง๊ด์ ์ธ ๊ตฌ์ฑ
๐ SSE ์ง์ : ์ค์๊ฐ ๋ฐ์ดํฐ ์คํธ๋ฆฌ๋ฐ
๐จ ์๊ฐ์ ๊ตฌ์ฑ : API ๊ตฌ์ฑ์ ์ํ ๋๋๊ทธ ์ค ๋๋กญ ์ธํฐํ์ด์ค
๐ฅ ํซ ๋ฆฌ๋ก๋ : ์ฌ์์ ์์ด ์ฆ์ ๊ตฌ์ฑ ์ ๋ฐ์ดํธ
๐ ์๋ฒฝํ ๋ชจ๋ํฐ๋ง : ์์ธํ ๋ก๊น ๋ฐ ์ค๋ฅ ์ถ์
๐ก๏ธ ์์ ํ๊ณ ์์ ์ : ๋ด์ฅ๋ ์ค๋ฅ ์ฒ๋ฆฌ ๋ฐ ๋งค๊ฐ๋ณ์ ๊ฒ์ฆ
Related MCP server: MCP Swagger Server
๐จโ๐ป ์ ์ ์ ๋ณด
๐ธ ์์คํ ๋ฐ๋ชจ
๐ฅ๏ธ ์ง๊ด์ ์ธ ์๊ฐ์ ๊ตฌ์ฑ ์ธํฐํ์ด์ค
๐ ์๊ฐ์ ๊ตฌ์ฑ ์ธํฐํ์ด์ค
๐ ๊ฐ๋ ฅํ API ๋ณํ
๐ cURL ๊ฐ์ ธ์ค๊ธฐ ์ง์
๐ ๋๊ตฌ ์ค๋ช
๐ ๋น ๋ฅธ ์์
๐ฆ ์ค์น
์ง์์คํผ1
๐ฎ ์๋น์ค ์์
# Activate virtual environment
.venv/Scripts/activate # Windows
source .venv/bin/activate # Linux/Mac
# Start main server
uv run run.py
# Start configuration UI (optional)
uv run run_config_ui.py๐ฏ ์ฌ์ฉ ๊ฐ์ด๋
1๏ธโฃ API ๊ตฌ์ฑ
๋ฐฉ๋ฒ 1: ๐จ ์๊ฐ์ ๊ตฌ์ฑ(๊ถ์ฅ)
http://localhost:8002๋ฐฉ๋ฌธํ์ธ์"์ ์ธํฐํ์ด์ค ์ถ๊ฐ"๋ฅผ ํด๋ฆญํ์ธ์
๊ตฌ์ฑ ๋งค๊ฐ๋ณ์๋ฅผ ์ ๋ ฅํ์ธ์
์ ์ฅํ๊ณ ์ฆ์ ์ ์ฉํ์ธ์!
๋ฐฉ๋ฒ 2: ๐ JSON ๊ตฌ์ฑ
{
"tools": [
{
"name": "weather_api",
"description": "Get real-time weather information for a specified city, including temperature, humidity, weather conditions, wind direction, and wind speed.\n \n This tool uses a two-step query process:\n 1. First, get the precise location ID through city name\n 2. Then, query real-time weather data using the location ID\n \n Example usage:\n - Get weather information for \"Beijing\"\n - Get real-time weather conditions for \"Shanghai\"\n - Query temperature and humidity for \"Guangzhou\"\n \n Returns formatted weather information text, including city name, weather conditions, temperature, humidity, wind direction, and wind speed.",
"url": "https://devapi.qweather.com/v7/weather/now",
"method": "GET",
"params": {
"location": {
"type": "string",
"desc": "City name or ID",
"required": true,
"default": "101010100"
},
"key": {
"type": "string",
"desc": "API key",
"required": true,
"default": "05a3e2c04b65416e912088b76a7a487e"
},
"lang": {
"type": "string",
"desc": "Language",
"required": false,
"default": "zh"
},
"unit": {
"type": "string",
"desc": "Unit system",
"required": false,
"default": "m"
}
},
"headers": {
"User-Agent": "weather-app/1.0"
},
"response": {
"code": {
"path": "code",
"desc": "Response status code"
},
"updateTime": {
"path": "updateTime",
"desc": "Data update time"
},
"fxLink": {
"path": "fxLink",
"desc": "Detailed weather information link"
},
"now": {
"path": "now",
"desc": "Real-time weather data object"
},
"now_obsTime": {
"path": "now.obsTime",
"desc": "Actual observation time"
},
"now_temp": {
"path": "now.temp",
"desc": "Current temperature (Celsius)"
},
"now_feelsLike": {
"path": "now.feelsLike",
"desc": "Feels like temperature (Celsius)"
},
"now_icon": {
"path": "now.icon",
"desc": "Weather icon code"
},
"now_text": {
"path": "now.text",
"desc": "Weather phenomenon text description"
},
"now_wind360": {
"path": "now.wind360",
"desc": "Wind direction 360-degree angle"
},
"now_windDir": {
"path": "now.windDir",
"desc": "Wind direction description"
},
"now_windScale": {
"path": "now.windScale",
"desc": "Wind scale"
},
"now_windSpeed": {
"path": "now.windSpeed",
"desc": "Wind speed (km/h)"
},
"now_humidity": {
"path": "now.humidity",
"desc": "Relative humidity percentage"
},
"now_precip": {
"path": "now.precip",
"desc": "Precipitation (mm)"
},
"now_pressure": {
"path": "now.pressure",
"desc": "Atmospheric pressure (hPa)"
},
"now_vis": {
"path": "now.vis",
"desc": "Visibility (km)"
},
"now_cloud": {
"path": "now.cloud",
"desc": "Cloud coverage percentage"
},
"now_dew": {
"path": "now.dew",
"desc": "Dew point temperature (Celsius)"
}
},
"response_mode": "metadata"
}
]
}2๏ธโฃ MCP์ ์ฐ๊ฒฐ
# SSE connection URL
ws_url = "http://localhost:8000/mcp/sse"๐ ๏ธ ํ๋ก์ ํธ ๊ตฌ์กฐ
๐ฆ http-for-mcp-server
โฃ ๐ config/ # Configuration files
โฃ ๐ demo/ # Example code
โฃ ๐ static/ # Static resources
โฃ ๐ mcp_server.py # Main server
โฃ ๐ config_ui.py # Configuration UI
โฃ ๐ run.py # Startup script
โ ๐ requirements.txt # Dependencies๐ ๊ตฌ์ฑ ์ฐธ์กฐ
๐ง ๊ธ๋ก๋ฒ ๊ตฌ์ฑ
๊ตฌ์ฑ | ์ค๋ช | ๊ธฐ๋ณธ |
๐ ํธ์คํธ | ์๋ฒ ์ฃผ์ | "0.0.0.0" |
๐ ํฌํธ | ์๋ฒ ํฌํธ | 8000 |
๐ ๋๋ฒ๊ทธ | ๋๋ฒ๊ทธ ๋ชจ๋ | ๊ฑฐ์ง |
๐ ๋ก๊ทธ ๋ ๋ฒจ | ๋ก๊ทธ ๋ ๋ฒจ | "์ ๋ณด" |
๐ ํน๋ณ ๊ธฐ๋ฅ
๐ cURL ๊ฐ์ ธ์ค๊ธฐ
cURL ๋ช ๋ น์ ์ง์ ๋ถ์ฌ๋ฃ์ผ๋ฉด ๊ตฌ์ฑ์ด ์๋์ผ๋ก ์์ฑ๋ฉ๋๋ค.
curl -X GET 'https://api.example.com/weather?city=beijing'๐จ ํฝ์ ์ํธ ์ธํฐํ์ด์ค
๐ฎ ๊ฒ์๊ณผ ๊ฐ์ ๊ตฌ์ฑ ๊ฒฝํ
๐ฏ ๋๋๊ทธ ์ค ๋๋กญ ๋งค๊ฐ๋ณ์ ์ค์
๐ ์ค์๊ฐ ์์ฒญ ํ ์คํธ
๐ ๊ตฌ์ฑ์ ์๋์ผ๋ก ์์ฑํฉ๋๋ค
๐ค ๊ธฐ์ฌ ๊ฐ์ด๋
๐ด ์ด ์ ์ฅ์๋ฅผ ํฌํฌํ์ธ์
๐ง ๊ธฐ๋ฅ ๋ธ๋์น ์์ฑ
๐ ๋ณ๊ฒฝ ์ฌํญ ์ ์ถ
๐ ๋ธ๋์น ํธ์
๐ฌ ํ ๋ฆฌํ์คํธ ์ ์ถ
๐ ๋์ ๋ฐ๊ธฐ
๐ง ๋ฌธ์ ์ ์ถ
๐ฌ ํ ๋ก ๊ทธ๋ฃน์ ์ฐธ์ฌํ์ธ์
๐ ์ํค ๋ณด๊ธฐ
๐ ์คํ์์ค ๋ผ์ด์ ์ค
์ด ํ๋ก์ ํธ๋ MIT ๋ผ์ด์ ์ค๋ฅผ ์ฌ์ฉํฉ๋๋ค. ๋ผ์ด์ ์ค ํ์ผ์ ์ฐธ์กฐํ์ธ์.
This server cannot be installed
Maintenance
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Tght1211/http-4-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
