An MCP Server that retrieves and processes news data from the GeekNews site.
์ด ํ๋ก์ ํธ๋ GeekNews์์ ์ํฐํด์ ๊ฐ์ ธ์ค๋ Model Context Protocol(MCP) ์๋ฒ์ ๋๋ค. Python์ผ๋ก ๊ตฌํ๋์์ผ๋ฉฐ, BeautifulSoup์ ์ฌ์ฉํ์ฌ ์น ์คํฌ๋ํ์ ์ํํฉ๋๋ค. ์๋ฒ ๋ถํ๋ฅผ ์ค์ด๊ธฐ ์ํด ํ๋ฃจ์ ํ ๋ฒ ์๋์ผ๋ก ๋ฐ์ดํฐ๋ฅผ ํ์ฑํ๊ณ ์บ์์ ์ ์ฅํ๋ ๊ธฐ๋ฅ์ ์ ๊ณตํฉ๋๋ค.
![]() |
![]() |
---|---|
![]() |
![]() |
get_articles
๋๊ตฌ: GeekNews์์ ์ํฐํด์ ๊ฐ์ ธ์ค๋ ๊ธฐ๋ฅ
get_weekly_news
๋๊ตฌ: GeekNews์์ ์ฃผ๊ฐ ๋ด์ค๋ฅผ ๊ฐ์ ธ์ค๋ ๊ธฐ๋ฅ
Smithery๋ฅผ ์ด์ฉํ ์ค์น
๐ geeknews-mcp-server
MCP ์ค์ ํ์ผ์ ์๋ฒ ์ ๋ณด๋ฅผ ์ถ๊ฐ
{
"mcpServers": {
"geeknews-mcp-server": {
"command": "npx",
"args": [
"-y",
"@smithery/cli@latest",
"run",
"@the0807/geeknews-mcp-server",
"--key",
"smithery์์ ๋ฐ๊ธ ๋ฐ์ ํค"
]
}
}
}
Git Clone
git clone https://github.com/the0807/GeekNews-MCP-Server
cd GeekNews-MCP-Server
uv๋ก ํ๊ฒฝ ์ธํ
uv sync
๊ฐ์ํ๊ฒฝ ์คํ
uv venv
source .venv/bin/activate
MCP Inspector๋ก ์๋ฒ ํ ์คํธ
uv run mcp
mcp dev main.py
# ํฐ๋ฏธ๋์ ๋์ค๋ URL(MCP Inspector)๋ก ์ ์ํ์ฌ ์๋ฒ ํ
์คํธ
src/models.py
: ์ํฐํด ์ ๋ณด๋ฅผ ์ ์ฅํ๋ ๋ฐ์ดํฐ ํด๋์ค ์ ์src/parser.py
: GeekNews ์น์ฌ์ดํธ์ HTML์ ํ์ฑํ์ฌ ์ํฐํด ์ ๋ณด๋ฅผ ์ถ์ถsrc/client.py
: GeekNews ์น์ฌ์ดํธ์์ ๋ฐ์ดํฐ๋ฅผ ๊ฐ์ ธ์ค๋ HTTP ํด๋ผ์ด์ธํธsrc/config.py
: ์ค์ ๊ณผ ์์ ์ ์src/cache.py
: ์บ์ ๊ด๋ฆฌ ๊ธฐ๋ฅ ์ ๊ณตsrc/scheduler.py
: ์ฃผ๊ธฐ์ ์ธ ๋ฐ์ดํฐ ๊ฐฑ์ ์ค์ผ์ค๋ฌsrc/server.py
: MCP ์๋ฒ ๊ตฌํmain.py
: ์๋ฒ ์คํ ์ง์
์ [!Note]
- ์ด ์๋ฒ๋ GeekNews ์น์ฌ์ดํธ์ HTML ๊ตฌ์กฐ์ ์์กดํฉ๋๋ค. ์น์ฌ์ดํธ ๊ตฌ์กฐ๊ฐ ๋ณ๊ฒฝ๋๋ฉด ํ์ฑ ๋ก์ง์ ์ ๋ฐ์ดํธํด์ผ ํ ์ ์์ต๋๋ค.
- ์บ์ ๋ฐ์ดํฐ๋ ์ฌ์ฉ์์ ํ ๋๋ ํ ๋ฆฌ ์๋
.cache/geeknews-mcp
ํด๋์ ์ ์ฅ๋ฉ๋๋ค.