Skip to main content

MCP Server (STDIO) to fetch and parse Chengdu Youth Center activities

Project description

MCP Server · 成都青年之家活动抓取器(Python)

一个基于 Model Context Protocol (MCP) 的服务端,抓取并解析 成都青年之家 的最新「精彩活动」列表,返回结构化活动数组

  • 语言:Python 3.9+
  • 传输:SSE(Server-Sent Events)
  • 框架:Starlette + Uvicorn
  • SDK:mcp(官方 Python SDK)+ FastMCP
  • 解析:httpx + BeautifulSoup4 + lxml

✨ 功能特性

  • 🔍 GET 抓取:请求 https://cdyouth.cdcyl.org.cn/jgc/,直接解析首页 HTML。
  • 📝 结构化输出:活动 ID、标题、标签、分类、时间、地址、状态、浏览量、封面图、详情链接等。
  • 🧩 MCP Toolfetch_chengdu_youth_activities(limit?: int)
  • 🔄 SSE 传输:提供 /sse(建立会话)与 /messages(客户端发消息)端点。
  • ❤️ 健康检查/healthz 返回 200 ok,便于托管/监控。

📦 安装

方式 A:从源代码本地安装(推荐开发用)

# 创建虚拟环境(可用 uv/pipenv/venv,以下以 uv 为例)
uv venv
uv pip install -e .

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mcp_knowledge_server-1.0.0.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mcp_knowledge_server-1.0.0-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

Details for the file mcp_knowledge_server-1.0.0.tar.gz.

File metadata

File hashes

Hashes for mcp_knowledge_server-1.0.0.tar.gz
Algorithm Hash digest
SHA256 99f4c2d68181c381d5832171bd6e30823811b36b03071b0da0d9804a467de975
MD5 46ad1ff242fa8b405daba135420f5dda
BLAKE2b-256 d9ee45ba8fc09394edf2f27d5e86581ca34e127d614529eb4c28f2574bb5b3ba

See more details on using hashes here.

File details

Details for the file mcp_knowledge_server-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for mcp_knowledge_server-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a7d7f5194ec7168739c9463553cb8da512efea0b754e90bda9f7fd0d40c17fdb
MD5 7c7ba53206ef71eed7e4334dbe16f53c
BLAKE2b-256 c9ccebbb6515efb82f730ddbb987a08870175e005ea2d38082444b78f8d46b7b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page