Skip to main content
Glama

🐮 Nowcoder MCP Server

MCP Node TypeScript License: MIT

让 AI 直接访问牛客网——搜索题目、浏览面经、获取题解,一切通过 Model Context Protocol


✨ 功能一览

工具

描述

nowcoder_search

全站搜索(讨论、题目、职位)

nowcoder_list_problems

浏览 ACM/OJ 题库,支持难度筛选

nowcoder_get_problem

获取题目完整描述、示例、限制

nowcoder_get_problem_solutions

获取社区题解列表

nowcoder_list_topic_problems

浏览专题题库(面试 TOP101、SQL 篇等)

nowcoder_get_discussion

获取讨论帖 / 动态的完整内容

nowcoder_get_hot_topics

获取首页热门讨论

nowcoder_browse_interview

浏览面经,支持按公司筛选

Related MCP server: Baidu Search MCP Server

🚀 快速开始

前置条件

  • Node.js ≥ 18

  • 系统已安装 Chromium 依赖(用于 Playwright)

安装

git clone https://github.com/yourname/nowcoder-mcp-server.git
cd nowcoder-mcp-server
npm install
npm run build

postinstall 脚本会自动下载 Playwright Chromium。

运行

Stdio 模式(默认,用于 Claude Desktop / Cursor 等本地客户端):

npm start

HTTP 模式(用于远程部署):

npm run start:http
# 默认监听 http://0.0.0.0:3000/mcp

🔌 接入你的 AI 工具

Claude Desktop

编辑 ~/Library/Application Support/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "nowcoder": {
      "command": "node",
      "args": ["/path/to/nowcoder-mcp-server/dist/index.js"]
    }
  }
}

Cursor

编辑 .cursor/mcp.json

{
  "mcpServers": {
    "nowcoder": {
      "command": "node",
      "args": ["/path/to/nowcoder-mcp-server/dist/index.js"]
    }
  }
}

VS Code (GitHub Copilot)

编辑 .vscode/mcp.json

{
  "servers": {
    "nowcoder": {
      "type": "stdio",
      "command": "node",
      "args": ["/path/to/nowcoder-mcp-server/dist/index.js"]
    }
  }
}

远程 HTTP 连接

如果你已将服务部署到公网(参见部署指南),在支持 Streamable HTTP 的客户端中直接填入 URL:

{
  "mcpServers": {
    "nowcoder": {
      "url": "https://your-domain.com/mcp"
    }
  }
}

🛠 工具详细说明

所有工具均支持 response_format 参数("markdown""json",默认 "markdown")。设为 "json" 时,列表类工具返回带分页元数据的结构化 JSON,详情类工具返回结构化对象。错误响应统一携带 isError: true 标记。

在牛客网上搜索讨论帖、面经、编程题、职位等内容。

// 搜索 Java 面经
{ "query": "Java面经", "type": "discuss", "page": 1 }

// 搜索算法题,返回 JSON
{ "query": "二叉树", "type": "problem", "response_format": "json" }

参数

类型

必填

说明

query

string

搜索关键词

type

string

"all" / "discuss" / "problem" / "job",默认 "all"

page

number

页码,默认 1

response_format

string

"markdown" / "json",默认 "markdown"

nowcoder_list_problems — 浏览题库

列出 ACM/OJ 编程题目,返回 ID、标题、难度、通过率。

{ "difficulty": 3, "page": 1 }
{ "keyword": "二叉树", "response_format": "json" }

参数

类型

必填

说明

keyword

string

搜索关键词

difficulty

number

0(全部) 1-5(星级),默认 0

page

number

页码,默认 1

response_format

string

"markdown" / "json"

nowcoder_get_problem — 题目详情

获取完整的题目描述,包含输入输出格式、示例数据和时空限制。

{ "problemId": "1001" }
{ "problemId": "1001", "response_format": "json" }

参数

类型

必填

说明

problemId

string

题目 ID

response_format

string

"markdown" / "json"

nowcoder_get_problem_solutions — 题解列表

获取社区提交的题解,包含作者、标题、摘要、点赞数。

{ "problemId": "1001", "page": 1 }
{ "problemId": "1001", "response_format": "json" }

参数

类型

必填

说明

problemId

string

题目 ID

page

number

页码,默认 1

response_format

string

"markdown" / "json"

nowcoder_list_topic_problems — 专题题库

获取牛客网特定专题的题目列表。

{ "topicId": "295", "page": 1 }
{ "topicId": "199", "response_format": "json" }

参数

类型

必填

说明

topicId

string

专题 ID(见下表)

page

number

页码,默认 1

response_format

string

"markdown" / "json"

常用专题:

ID

专题名称

295

面试 TOP101

199

SQL 篇

196

面试高频题目

182

笔试大厂真题

383

算法学习篇

389

笔试模板必刷

260

前端篇

nowcoder_get_discussion — 讨论帖详情

获取讨论帖的完整内容,支持 Markdown 或结构化 JSON 输出。

{ "url": "353154004265934848" }
{ "url": "https://www.nowcoder.com/discuss/353154004265934848", "response_format": "json" }

参数

类型

必填

说明

url

string

完整 URL、discuss ID 或 feed UUID

response_format

string

"markdown" / "json"

nowcoder_get_hot_topics — 热门内容

无需参数,返回牛客网当前热门讨论和话题(最多 20 条)。

nowcoder_browse_interview — 浏览面经

浏览面试经验分享,支持按公司名称筛选。

{ "page": 1 }
{ "company": "字节跳动", "page": 1, "response_format": "json" }

参数

类型

必填

说明

company

string

公司名称筛选

page

number

页码,默认 1

response_format

string

"markdown" / "json"

JSON 响应格式

列表类工具在 response_format: "json" 时返回 PaginatedResult 结构:

{
  "items": [ ... ],
  "page": 1,
  "count": 10,
  "has_more": true
}
  • has_more 基于当前页是否有结果推断(爬虫场景无法获取精确总数)

  • 详情类工具返回对应的结构化对象

⚙️ 环境变量

变量

默认值

说明

TRANSPORT

stdio

传输模式:stdio / http / https

PORT

3000

HTTP 模式监听端口

HOST

0.0.0.0

HTTP 模式监听地址(本地开发建议 127.0.0.1

ALLOWED_ORIGINS

*

CORS 允许的来源,多个用逗号分隔

SSL_CERT

自定义 SSL 证书路径

SSL_KEY

自定义 SSL 私钥路径

🌐 部署到服务器

方案一:Caddy 反向代理(推荐)

最简单的公网部署方案,Caddy 自动管理 Let's Encrypt 证书:

# 1. 以 HTTP 模式启动 MCP 服务
TRANSPORT=http PORT=3001 node dist/index.js

# 2. 安装 Caddy 并配置反向代理
apt install caddy
cat > /etc/caddy/Caddyfile << EOF
your-domain.com {
    reverse_proxy localhost:3001
}
EOF
systemctl restart caddy

MCP 地址:https://your-domain.com/mcp

没有域名? 可以使用 your-ip.sslip.io 作为免费域名,Caddy 同样能自动获取证书。

方案二:Systemd 服务

cp deploy/nowcoder-mcp.service /etc/systemd/system/
systemctl daemon-reload
systemctl enable --now nowcoder-mcp

方案三:ngrok 内网穿透

# 启动 HTTP 模式
TRANSPORT=http node dist/index.js &

# 使用 ngrok 暴露
ngrok http 3000

MCP 地址:https://xxxx.ngrok-free.app/mcp

🏗 项目结构

src/
├── index.ts              # 入口,Stdio / HTTP / HTTPS 传输
├── constants.ts          # 配置常量
├── types.ts              # TypeScript 类型定义
├── schemas/
│   └── index.ts          # Zod 输入校验
├── services/
│   ├── browser.ts        # Playwright 浏览器管理(连接池、重试、反检测)
│   └── scraper.ts        # 页面解析工具(HTML→Markdown、截断)
└── tools/
    ├── search.ts         # 全站搜索
    ├── problems.ts       # 题库相关(列表、详情、题解、专题)
    ├── discussions.ts    # 讨论帖 & 热门内容
    └── interview.ts      # 面经浏览

🔧 开发

# 开发模式(热重载)
npm run dev

# HTTP 模式开发
npm run dev:http

# 构建
npm run build

# 清理
npm run clean

技术要点

  • MCP 规范合规:错误响应携带 isError: true,列表工具返回分页元数据(PaginatedResult),支持 response_format 双格式输出

  • 无状态 HTTP:每个请求独立处理,不维护服务端会话,适合水平扩展和无状态部署

  • Playwright + Stealth 插件:使用 playwright-extra 搭配反检测插件,规避网站的爬虫检测

  • 智能重试:对超时、网络错误、限流自动指数退避重试(最多 3 次)

  • 资源优化:拦截图片、字体、样式表等非必要资源,加速页面加载

  • CORS 安全:通过 ALLOWED_ORIGINS 环境变量配置允许的跨域来源,默认 *

  • 内容安全:25,000 字符自动截断,防止上下文窗口溢出

📄 License

MIT


免责声明:本项目仅供学习和研究使用。请遵守牛客网的使用条款,合理使用,避免高频请求对其服务造成影响。

Available Tools

8 tools
nowcoder_browse_interview浏览面经A
Read-onlyIdempotent

浏览牛客网面试经验,支持按公司名筛选。

Args:

  • company (string): 公司名称(可选),如 "字节跳动", "阿里巴巴", "腾讯"

  • page (number): 页码,从1开始

  • response_format (string): 输出格式 - "markdown"(默认, 人类可读) 或 "json"(机器可解析)

Returns: 面经列表,包含标题、公司、作者、摘要、时间

Examples:

  1. 浏览全部面经第1页: { "page": 1 }

  2. 按公司筛选面经: { "company": "字节跳动", "page": 1 }

  3. 获取JSON格式结果用于程序处理: { "company": "阿里巴巴", "page": 2, "response_format": "json" }

Error Handling:

  • 若页面加载超时,将返回超时错误提示,建议稍后重试

  • 若网络异常,将返回网络连接失败提示

  • 若未找到指定公司的面经,将返回空结果提示并建议更换关键词

ParametersJSON Schema
NameRequiredDescriptionDefault
pageNo页码,从1开始
companyNo公司名称筛选(可选),例如 '字节跳动', '阿里巴巴'
response_formatNo输出格式: 'markdown' 人类可读, 'json' 机器可解析markdown

TDQS

A3.5/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare the safe read-only, idempotent, open-world profile, so the bar is lower. The description adds genuine context beyond that: timeout behavior, network-failure messaging, and the empty-result case with advice to change keywords, which is useful operational detail.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The purpose is front-loaded, and the Args/Returns/Examples/Error Handling structure is easy to scan. The three usage examples largely repeat the schema defaults and could be trimmed, but nothing is bloated.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema, the description does list the returned fields (标题、公司、作者、摘要、时间) and covers failure modes, both required for an agent to interpret results. Missing only pagination/end-of-list behavior for the page parameter.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so all three parameters are already documented in the schema, including the enum for response_format. The description restates them with examples but adds no syntax or constraint details beyond the schema, so the baseline applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource (浏览牛客网面试经验) with the key filter (按公司名筛选), so an agent knows exactly what it retrieves. It does not explicitly differentiate itself from siblings like nowcoder_search or nowcoder_get_discussion, which is the only gap.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The examples show how to call it, but nothing states when to prefer this over nowcoder_search or nowcoder_get_discussion, and there are no exclusions or prerequisites. Usage context is only implied by the tool name.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

nowcoder_get_discussion获取讨论帖详情A
Read-onlyIdempotent

获取牛客网讨论帖或动态的完整内容。

Args:

Returns: 帖子内容,包含标题、作者、时间、正文、标签、链接

Examples:

  • 获取帖子详情 (markdown): { "url": "353154004265934848" }

  • 获取帖子详情 (json): { "url": "353154004265934848", "response_format": "json" }

Error Handling:

  • 页面加载超时时返回超时错误提示

  • 网络连接失败时返回网络错误提示

ParametersJSON Schema
NameRequiredDescriptionDefault
urlYes讨论帖的完整URL或ID。支持格式: 完整URL(https://www.nowcoder.com/discuss/123), discuss ID(123), feed UUID
response_formatNo输出格式: 'markdown' 人类可读, 'json' 机器可解析markdown

TDQS

A3.7/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnly/idempotent/non-destructive, so the safety profile is covered. The description adds genuinely useful behavioral context beyond that: it enumerates what the result contains (title, author, time, body, tags, link) and documents failure modes (page-load timeout, network failure). No rate limits or auth requirements are mentioned, keeping it from a 5.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded one-line purpose followed by clearly labeled Args, Returns, Examples, and Error Handling sections; no sentence is wasted. It is slightly longer than strictly necessary because the examples repeat the same call twice with only the format changed.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a read-only two-parameter tool with no output schema, the description covers return contents and error behavior, which is what an agent needs. It omits any mention of very long posts or truncation, so it is strong but not exhaustive.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% and the schema already documents accepted URL/ID formats and the response_format enum with default. The description's concrete example strings are helpful but largely restate the schema. Baseline 3 is appropriate when the schema carries the parameter burden.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource: retrieve the full content of a Nowcoder discussion post or feed item. The scope ('完整内容') and the object ('讨论帖或动态') are clear, and it is naturally distinct from siblings like nowcoder_search or nowcoder_get_problem. It does not, however, explicitly contrast itself with those siblings, so it stops short of a 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is implied by the name and by the examples, which show when to call it (fetch one post's detail). There is no explicit statement of when to prefer this over nowcoder_search or nowcoder_get_hot_topics, nor any exclusion or prerequisite guidance. Adequate but leaves the routing decision to inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

nowcoder_get_hot_topics获取热门内容A
Read-only

获取牛客网当前热门讨论和话题。

Returns: 热门话题列表,包含标题和链接(最多20条)

Examples:

  • 获取热门内容: 无需参数,直接调用即可

Error Handling:

  • 页面加载超时时返回超时错误提示

  • 网络连接失败时返回网络错误提示

  • 无热门内容时返回空结果提示

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A3.6/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint, destructiveHint=false, and openWorldHint, so the safety profile is covered. The description earns credit by adding behavior beyond the annotations: the return shape (max 20 items, title + link) and explicit error paths (timeout, network failure, empty results). It does not explain caching or rate limits, so it stops short of a 5.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded one-line purpose, then clearly labeled Returns/Examples/Error Handling sections — easy to scan. Slightly padded (the Examples line mostly repeats the no-parameter fact already stated), but no meaningful waste.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

There is no output schema and no parameters, so the description must carry the return contract — and it does, specifying item count, fields, and failure modes. An agent has enough to call it and interpret results; only pagination/staleness of 'hot' data is unaddressed.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool takes zero parameters and the description confirms no input is required ("无需参数,直接调用即可"). With no parameters to document, the baseline 4 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb+resource: fetching Nowcoder's current hot discussions and topics. An agent can tell this apart conceptually from list_problems or search, but the description never actually names or differentiates any sibling tool. Clear purpose, no explicit sibling differentiation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

"无需参数,直接调用即可" addresses invocation, not selection — it never says when to prefer this over nowcoder_get_discussion, nowcoder_search, or nowcoder_browse_interview. No alternatives, no when-not-to-use guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

nowcoder_get_problem获取题目详情A
Read-onlyIdempotent

获取牛客网特定编程题目的完整描述,包括题面、输入输出格式、示例和限制。

Args:

  • problemId (string): 题目ID

  • response_format (string): 输出格式 - "markdown"(默认) 或 "json"

Returns: 题目详情,包含标题、时间/内存限制、题目描述

Examples:

  • 获取题目: { "problemId": "1001" }

  • JSON格式: { "problemId": "1001", "response_format": "json" }

Error Handling:

  • 题目不存在时返回错误提示

  • 页面加载超时时返回超时提示

ParametersJSON Schema
NameRequiredDescriptionDefault
problemIdYes题目ID,例如 '1001'
response_formatNo输出格式: 'markdown' 人类可读, 'json' 机器可解析markdown

TDQS

A3.5/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnly, idempotent, non-destructive and closed-world, so the safety profile is covered. The description goes beyond them by disclosing failure behavior: an error message when the problem does not exist and a timeout message when the page fails to load, which is genuinely useful operational context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Purpose is front-loaded in the first sentence, then structured into Args/Returns/Examples/Error Handling sections that are easy to scan. The Examples block is somewhat redundant with the schema, costing a little density, but nothing is padded or vague.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema, the description must describe the return payload, and it does (标题、时间/内存限制、题目描述), which matches the stated purpose. Failure modes are also covered. It stops short of describing pagination or content-length limits, which is a minor gap for a single-item fetch.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, and the schema already documents problemId's format and the markdown/json enum with defaults. The Args section mostly restates this, adding only the 'markdown is default' note that the schema default already encodes. Baseline 3 is correct since the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource (获取牛客网特定编程题目的完整描述) and enumerates what the payload contains (题面、输入输出格式、示例和限制). It implicitly distinguishes itself from list/search siblings by being a single-problem fetch keyed on problemId, but it never names those siblings explicitly.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no when-to-use guidance relative to alternatives such as nowcoder_search or nowcoder_list_problems, and no stated prerequisite for how a problemId is obtained. The Examples block shows invocation syntax rather than selection guidance, so an agent must infer when this tool is the right choice.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

nowcoder_get_problem_solutions获取题解A
Read-onlyIdempotent

获取牛客网特定题目的社区题解列表。

Args:

  • problemId (string): 题目ID

  • page (number): 页码

  • response_format (string): 输出格式 - "markdown"(默认) 或 "json"

Returns: 题解列表,包含作者、标题、摘要、点赞数

Examples:

  • 获取题解: { "problemId": "1001", "page": 1 }

  • JSON格式: { "problemId": "1001", "response_format": "json" }

Error Handling:

  • 题目无题解时返回空结果提示

  • 页面加载超时时返回超时提示

ParametersJSON Schema
NameRequiredDescriptionDefault
pageNo页码,从1开始
problemIdYes题目ID
response_formatNo输出格式: 'markdown' 人类可读, 'json' 机器可解析markdown

TDQS

A3.7/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnly/idempotent/openWorld/non-destructive, so the safety profile is covered. The description adds value beyond that by disclosing return contents (author, title, summary, likes) and Error Handling behavior (empty result notice, timeout notice) — genuinely useful behavioral context for an open-world scraper.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loads the one-line purpose, then uses labeled Args/Returns/Examples/Error Handling blocks that are easy to scan. Slightly verbose because Args and Returns restate schema-visible information, but nothing is wasted or buried.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema, the description usefully summarizes the return fields, and it covers the empty/timeout failure modes. For a simple 3-param read tool this is close to complete; it only lacks guidance on paging behavior and how it relates to sibling solution/discussion tools.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so page and problemId are already fully documented in the schema; the description largely repeats them. It does restate the response_format default ('markdown' 默认), adding marginal emphasis but no new semantics. Baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource: 获取牛客网特定题目的社区题解列表 (get the community solution list for a specific problem). This is clearly distinct from sibling nowcoder_get_problem (problem statement) by naming the 'list of community solutions' resource. It stops short of explicitly contrasting with siblings, so 4 rather than 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is implied (fetch solutions for a given problem) and the Examples section shows concrete invocation shapes. However, there is no explicit when-to-use/when-not or routing against alternatives like nowcoder_get_problem or nowcoder_get_discussion, which is the key ambiguity for this family of tools.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

nowcoder_list_problems浏览编程题库A
Read-onlyIdempotent

列出牛客网 ACM/OJ 编程题目,支持按关键词和难度筛选。

Args:

  • keyword (string): 搜索关键词(可选)

  • difficulty (number): 难度 0(全部) 1-5(星级)

  • page (number): 页码

  • response_format (string): 输出格式 - "markdown"(默认, 人类可读) 或 "json"(机器可解析)

Returns: 题目列表,包含 ID、标题、难度、通过率、标签

Examples:

  • 浏览全部题目: { "page": 1 }

  • 按难度筛选: { "difficulty": 3, "page": 1 }

  • 搜索关键词(JSON格式): { "keyword": "二叉树", "response_format": "json" }

Error Handling:

  • 页面加载超时时返回超时提示

  • 网络连接失败时提示检查网络

  • 无匹配题目时建议调整筛选条件

ParametersJSON Schema
NameRequiredDescriptionDefault
pageNo页码,从1开始
keywordNo搜索关键词(可选)
difficultyNo难度筛选: 0(全部), 1-5(对应星级)
response_formatNo输出格式: 'markdown' 人类可读, 'json' 机器可解析markdown

TDQS

A3.7/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnly, idempotent, non-destructive and openWorld behavior, so safety is covered. The description adds genuinely useful behavioral context beyond that: page-load timeouts, network failure handling, and the empty-result fallback, which tell the agent how failures manifest.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded one-line purpose followed by clearly labeled Args/Returns/Examples/Error Handling sections. The Args block duplicates the schema, which is mild waste, but overall structure is tight and scannable.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

There is no output schema, and the description compensates by describing the returned fields (ID, title, difficulty, pass rate, tags). Combined with the annotation coverage of safety behavior, an agent has enough to call this correctly, though sibling differentiation remains missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all four parameters, and the 'Args' block largely restates them. The examples do add some combinatorial meaning (e.g., keyword + response_format=json), but the difficulty scale and defaults are already in the schema, so this stays at the baseline.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb (列出) and resource (牛客网 ACM/OJ 编程题目) plus the filtering dimensions (keyword, difficulty). However, it never differentiates itself from the sibling nowcoder_search or nowcoder_list_topic_problems, which an agent could easily confuse with this list operation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is implied through the examples (browse all, filter by difficulty, keyword search with JSON), but there is no explicit when-to-use vs when-not guidance and no routing to the alternative tools. The agent must infer that this is the generic listing tool versus the topic-scoped or search siblings.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

nowcoder_list_topic_problems浏览专题题库A
Read-onlyIdempotent

获取牛客网特定专题(如面试TOP101、SQL篇)的题目列表。

常用 topicId:

  • 295: 面试TOP101

  • 199: SQL篇

  • 196: 面试高频题目

  • 182: 笔试大厂真题

  • 383: 算法学习篇

  • 389: 笔试模板必刷

  • 372: 输入输出练习

  • 260: 前端篇

  • 301: Verilog篇

  • 195: SHELL篇

Args:

  • topicId (string): 专题ID

  • page (number): 页码

  • response_format (string): 输出格式 - "markdown"(默认) 或 "json"

Returns: 专题题目列表,包含编号、标题、难度、通过率

Examples:

  • 面试TOP101: { "topicId": "295", "page": 1 }

  • SQL篇(JSON格式): { "topicId": "199", "response_format": "json" }

Error Handling:

  • 专题不存在时返回错误提示

  • 页面加载超时时返回超时提示

ParametersJSON Schema
NameRequiredDescriptionDefault
pageNo页码,从1开始
topicIdYes专题ID。常用: 295(面试TOP101), 199(SQL篇), 196(面试高频), 182(笔试大厂真题), 383(算法学习篇)
response_formatNo输出格式: 'markdown' 人类可读, 'json' 机器可解析markdown

TDQS

A3.8/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnly, idempotent, non-destructive behavior, so the bar is lower. The description adds genuinely new context: error behavior for missing topics and page-load timeouts, plus the returned fields (编号、标题、难度、通过率). This goes beyond what annotations convey.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the purpose, then Args/Returns/Examples/Error Handling sections that are easy to scan. It is somewhat repetitive, restating parameters and topicIds that already exist in the schema, which costs a little efficiency but not readability.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema, the description carries return-value disclosure and does so (编号、标题、难度、通过率), and it covers the failure modes. The only gap is the absence of any explicit alternative-tool guidance for an agent choosing among seven siblings.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so baseline is 3, but the description adds value by expanding the topicId catalogue to ten entries versus the schema's five and clarifying the markdown-vs-json tradeoff in the examples. Page semantics are already covered by the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb (获取) and resource (专题题目列表) and scopes it to a named topic, which implicitly separates it from the generic nowcoder_list_problems. It does not explicitly name a sibling for differentiation, but the topic-scoping makes the boundary inferable.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is implied by the topicId list and the two examples, so an agent can see this is for topic-scoped browsing. However, it never says when to prefer this over nowcoder_list_problems or nowcoder_search, nor does it give exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 8 tool updatesv1.0.0
    • First observednowcoder_browse_interview
    • First observednowcoder_get_discussion
    • First observednowcoder_get_hot_topics
    • First observednowcoder_get_problem
    • First observednowcoder_get_problem_solutions
    • First observednowcoder_list_problems
    • First observednowcoder_list_topic_problems
    • First observednowcoder_search

TDQS

A3.8/5.0

Scored across 8 tools

Disambiguation4/5

Most tools target clearly distinct resources or actions, such as problem details, problem solutions, topic problem lists, discussions, and interview experiences. There is some overlap because nowcoder_search can search problems/discussions/jobs, which may overlap with nowcoder_list_problems, nowcoder_get_discussion, and nowcoder_browse_interview, but the type filters and descriptions make the intended use mostly clear.

Naming Consistency4/5

All tools use the nowcoder_ prefix and snake_case, and most follow a predictable verb_noun pattern. Minor deviations exist, such as nowcoder_search lacking a clear noun, browse_interview instead of list/get, and slight pluralization differences, but the set remains readable and consistent overall.

Tool Count5/5

Eight tools are well-scoped for a read-only Nowcoder browsing server. Each tool maps to a distinct content retrieval need, and there is no obvious redundancy or missing bulk operation that would justify a different count.

Completeness4/5

The surface covers the core browsing lifecycle for problems, solutions, topic lists, discussions, hot topics, and interview experiences. Some adjacent Nowcoder content such as contests, rankings, user profiles, or submission history is missing, but these are not central to the apparent read-only browsing purpose.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables AI assistants to perform intelligent web searches using the Baidu Wenxin API, supporting multiple models, search modes, and providing search results with reference sources.
    28 npm
    6
    MIT
  • F
    license
    Not graded
    quality
    D
    maintenance
    Provides AI-powered search capabilities through three specialized tools: web search, people search, and X platform (formerly Twitter) search, all accessible via a Model Context Protocol interface.
    83
    -
  • A
    license
    A
    quality
    D
    maintenance
    Enables AI agents and developers to search, retrieve, and analyze HackerNews content including advanced post search, front page access, full comment trees, and user profile lookups through the Model Context Protocol.
    4
    19 npm
    MIT