MCP ExplorerExplorer

Geeknews Mcp Server

@the0807on a year ago
10ย MIT
FreeCommunity
AI Systems
๐Ÿ“ฐ GeekNews MCP Server

Overview

What is Geeknews Mcp Server

GeekNews MCP Server is a Model Context Protocol server implemented in Python that scrapes articles from GeekNews. It utilizes BeautifulSoup for web scraping and provides functionality to cache data and reduce server load by parsing data once a day.

Use cases

This server can be used to fetch articles from GeekNews by type (top, new, ask, show) up to a specified number, and to retrieve weekly news either by ID or the most recent. Its caching ability helps maintain quick access to data while reducing requests to the GeekNews server.

How to use

To use the GeekNews MCP Server, you can install it via Smithery or clone the repository from GitHub. After setting up your environment, add server configuration to your MCP settings and use the MCP Inspector to test the server functionality.

Key features

Key features include the โ€˜get_articlesโ€™ tool for fetching articles with various details, the โ€˜get_weekly_newsโ€™ tool to access weekly news summaries, and an automated caching system that refreshes data every 24 hours, minimizing server load.

Where to use

The server is ideal for developers and applications needing access to GeekNews articles and news summaries, particularly in environments where rapid data retrieval from GeekNews is crucial, such as news aggregators or applications that provide curated content.

Content

GeekNews MCP Server

smithery badge

์ด ํ”„๋กœ์ ํŠธ๋Š” GeekNews์—์„œ ์•„ํ‹ฐํด์„ ๊ฐ€์ ธ์˜ค๋Š” Model Context Protocol(MCP) ์„œ๋ฒ„์ž…๋‹ˆ๋‹ค. Python์œผ๋กœ ๊ตฌํ˜„๋˜์—ˆ์œผ๋ฉฐ, BeautifulSoup์„ ์‚ฌ์šฉํ•˜์—ฌ ์›น ์Šคํฌ๋ž˜ํ•‘์„ ์ˆ˜ํ–‰ํ•ฉ๋‹ˆ๋‹ค. ์„œ๋ฒ„ ๋ถ€ํ•˜๋ฅผ ์ค„์ด๊ธฐ ์œ„ํ•ด ํ•˜๋ฃจ์— ํ•œ ๋ฒˆ ์ž๋™์œผ๋กœ ๋ฐ์ดํ„ฐ๋ฅผ ํŒŒ์‹ฑํ•˜๊ณ  ์บ์‹œ์— ์ €์žฅํ•˜๋Š” ๊ธฐ๋Šฅ์„ ์ œ๊ณตํ•ฉ๋‹ˆ๋‹ค.

๊ธฐ๋Šฅ

tool1 tool2
example example

๋„๊ตฌ (Tools)

  • get_articles ๋„๊ตฌ: GeekNews์—์„œ ์•„ํ‹ฐํด์„ ๊ฐ€์ ธ์˜ค๋Š” ๊ธฐ๋Šฅ

    • ์•„ํ‹ฐํด ์œ ํ˜•(top, new, ask, show)๊ณผ ๋ฐ˜ํ™˜ํ•  ์•„ํ‹ฐํด ์ˆ˜๋ฅผ ์ง€์ •ํ•  ์ˆ˜ ์žˆ์Œ
    • ๊ฐ ์‘๋‹ต์—๋Š” ์ œ๋ชฉ, URL, ํฌ์ธํŠธ, ์ž‘์„ฑ์ž, ์‹œ๊ฐ„, ๋Œ“๊ธ€ ์ˆ˜, ์ˆœ์œ„ ์ •๋ณด๊ฐ€ ํฌํ•จ๋จ
    • ์บ์‹œ๋œ ๋ฐ์ดํ„ฐ๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ์„œ๋ฒ„ ๋ถ€ํ•˜ ๊ฐ์†Œ
  • get_weekly_news ๋„๊ตฌ: GeekNews์—์„œ ์ฃผ๊ฐ„ ๋‰ด์Šค๋ฅผ ๊ฐ€์ ธ์˜ค๋Š” ๊ธฐ๋Šฅ

    • ํŠน์ • ์ฃผ๊ฐ„ ๋‰ด์Šค ID๋ฅผ ์ง€์ •ํ•˜๊ฑฐ๋‚˜ ๊ฐ€์žฅ ์ตœ๊ทผ ์ฃผ๊ฐ„ ๋‰ด์Šค๋ฅผ ๊ฐ€์ ธ์˜ฌ ์ˆ˜ ์žˆ์Œ
    • ์ฃผ๊ฐ„ ๋‰ด์Šค์˜ ์ œ๋ชฉ, ๋ฒˆํ˜ธ, ID, ๋‚ด์šฉ, URL, ์•„์ดํ…œ ๋ชฉ๋ก ๋“ฑ์˜ ์ •๋ณด๋ฅผ ์ œ๊ณต
    • ๊ฐ ์•„์ดํ…œ์—๋Š” ์ œ๋ชฉ, URL, ์ˆœ์œ„ ์ •๋ณด๊ฐ€ ํฌํ•จ๋จ
    • ์บ์‹œ๋œ ๋ฐ์ดํ„ฐ๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ์„œ๋ฒ„ ๋ถ€ํ•˜ ๊ฐ์†Œ

์บ์‹œ ๊ธฐ๋Šฅ

  • ํ•˜๋ฃจ์— ํ•œ ๋ฒˆ ์ž๋™์œผ๋กœ ๋ฐ์ดํ„ฐ๋ฅผ ํŒŒ์‹ฑํ•˜๊ณ  ์บ์‹œ์— ์ €์žฅ
  • ์บ์‹œ๋œ ๋ฐ์ดํ„ฐ๊ฐ€ ์œ ํšจํ•œ ๊ฒฝ์šฐ GeekNews ์„œ๋ฒ„์— ์š”์ฒญํ•˜์ง€ ์•Š๊ณ  ์บ์‹œ๋œ ๋ฐ์ดํ„ฐ ์‚ฌ์šฉ
  • ์บ์‹œ ๋ฐ์ดํ„ฐ๋Š” 24์‹œ๊ฐ„ ๋™์•ˆ ์œ ํšจํ•˜๋ฉฐ, ์ดํ›„ ์ž๋™์œผ๋กœ ๊ฐฑ์‹ 
  • ์Šค์ผ€์ค„๋Ÿฌ๊ฐ€ ์ฃผ๊ธฐ์ ์œผ๋กœ ์บ์‹œ ์œ ํšจ์„ฑ์„ ๊ฒ€์‚ฌํ•˜๊ณ  ํ•„์š”์‹œ ๊ฐฑ์‹ 

์‚ฌ์šฉ๋ฒ•

  • Smithery๋ฅผ ์ด์šฉํ•œ ์„ค์น˜

    ๐Ÿš€ geeknews-mcp-server

  • MCP ์„ค์ • ํŒŒ์ผ์— ์„œ๋ฒ„ ์ •๋ณด๋ฅผ ์ถ”๊ฐ€

    {
      "mcpServers": {
        "geeknews-mcp-server": {
          "command": "npx",
          "args": [
            "-y",
            "@smithery/cli@latest",
            "run",
            "@the0807/geeknews-mcp-server",
            "--key",
            "smithery์—์„œ ๋ฐœ๊ธ‰ ๋ฐ›์€ ํ‚ค"
          ]
        }
      }
    }

๋กœ์ปฌ ์„ค์น˜ ๋ฐฉ๋ฒ•

  1. Git Clone

    git clone https://github.com/the0807/GeekNews-MCP-Server
    cd GeekNews-MCP-Server
    
  2. uv๋กœ ํ™˜๊ฒฝ ์„ธํŒ…

    uv sync
    
  3. ๊ฐ€์ƒํ™˜๊ฒฝ ์‹คํ–‰

    uv venv
    source .venv/bin/activate
    
  4. 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 ํด๋”์— ์ €์žฅ๋ฉ๋‹ˆ๋‹ค.

Tools

No tools

Comments

Recommend MCP Servers

View All MCP Servers