Guanzeyu-96/nga-mcp-server
3.1
If you are the rightful owner of nga-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.
NGA MCP 服务器 is a Python-based server designed to interact with the NGA forum, providing functionalities like fetching topics and sections, and accessing topic details with login capabilities.
Tools
4
Resources
0
Prompts
0
NGA MCP 服务器(Python)
功能:
- 分页获取最新话题
- 获取今日热门话题
- 获取版块(Sections/Boards)列表
- 根据话题 ID 获取详情与回复(支持 Cookie 登录与登录状态检测)
环境要求
- Python 3.11+
- uv(包管理器)。安装命令:
curl -LsSf https://astral.sh/uv/install.sh | sh
安装
uv sync
运行
uv run server.py
# 或使用可执行脚本
uv run nga-mcp-server
Cookie 登录
部分内容需要登录才能访问。请在登录 https://bbs.nga.cn 后,从浏览器复制完整的 Cookie 字符串,并通过 cookie_string 参数传入各工具,以访问受限内容。
Cookie 示例:
ngaPassportUid=xxxx; ngaPassportCid=yyyy; myinf=...
工具列表
- list_latest_topics(page=1, cookie_string=None)
- list_hot_today(cookie_string=None)
- list_sections(cookie_string=None)
- get_topic_details(topic_id, page=1, cookie_string=None)
说明:
- 解析选择器采用启发式策略,以提高对页面结构变动的容错性。
- 当页面判断需要登录时,工具会返回
requires_login标记。