NGA MCP Server

NGA MCP Server

Enables AI assistants to browse and search NGA forum posts, including browsing forum sections, viewing post details with replies, and searching posts by keyword.

Category
Visit Server

README

NGA MCP Server

基于 MCP (Model Context Protocol) 的 NGA 论坛浏览服务器,允许 AI 助手(如 Claude)直接浏览和搜索 NGA 论坛的帖子。

功能

工具 说明
browse_forum 浏览指定版块的帖子列表,支持分页
browse_post 查看指定帖子的详细内容(主帖 + 回复),支持翻页
search_post 按关键词搜索帖子,支持全站或指定版块搜索

环境要求

  • Python ≥ 3.10

快速开始

1. 安装依赖

pip install -e ".[dev]"

2. 启动服务

Windows: 双击运行 start.bat,或在命令行中执行:

python src/nga_server.py

Linux / macOS:

chmod +x start.sh
./start.sh

服务默认运行在 http://0.0.0.0:8001,MCP 端点为 /mcp

3. 配置环境变量(可选)

变量 默认值 说明
NGA_MCP_HOST 0.0.0.0 监听地址
NGA_MCP_PORT 8001 监听端口

MCP 客户端配置

在 MCP 客户端的配置文件中添加:

{
  "mcpServers": {
    "nga-bbs": {
      "url": "http://localhost:8001/mcp"
    }
  }
}
  • Claude Desktop: 编辑 claude_desktop_config.json
  • Claude Code / VS Code 插件: 编辑项目或用户级的 mcp.json

工具详情

browse_forum — 浏览版块

参数 类型 必填 默认值 说明
fid int 706 版块 ID(706 为大时代)
page int 1 页码

browse_post — 浏览帖子

参数 类型 必填 默认值 说明
tid int 帖子 ID
page int 1 页码

search_post — 搜索帖子

参数 类型 必填 默认值 说明
keyword string 搜索关键词
fid int 0 版块 ID(0 为全站搜索)
page int 1 页码

项目结构

nga_mcp/
├── src/
│   └── nga_server.py    # MCP 服务入口
├── pyproject.toml        # 项目配置与依赖
├── start.bat             # Windows 启动脚本
├── start.sh              # Linux/macOS 启动脚本
└── README.md

常见问题

端口被占用

修改环境变量 NGA_MCP_PORT 更换端口,并相应更新 MCP 客户端配置中的 URL。

被反爬拦截

NGA 对高频请求有限流和反爬机制。如遇到 429guestJs 拦截,请稍等片刻再试。

页面编码

NGA WAP 页面使用 GBK 编码,服务端会自动处理解码。

技术栈

License

MIT

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured