Hosted search_issues silently returns incorrect keyword results

未关闭
#3,188 1 条评论 2 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
48/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
github, go

调研方向

首先,针对托管的 MCP 端点复现列出的 search_issues 查询,并将其与 GitHub REST GET /search/issues 进行比较。然后跟踪 search_issues 的实现和托管请求路径;当关键词查询保留 GitHub 搜索语义,或返回明确的不支持查询/错误信号,而不是静默返回错误的成功结果时,即视为完成。

由索引模型根据 Issue 内容生成。

描述

bug

Bug description

The hosted GitHub MCP search_issues tool silently returns materially incorrect keyword search results while reporting incomplete_results: false.

This reproduces when calling the hosted endpoint directly, without an MCP aggregator.

Environment

  • Endpoint: https://api.githubcopilot.com/mcp
  • Server: github-mcp-server
  • Reported version: github-mcp-server/remote-34ac9c16f8fd3e2a5af74929de89de3a11e98f9b
  • Protocol negotiated: 2025-11-25
  • Date verified: 2026-08-31

Reproduction

Call search_issues with ordinary GitHub issue search syntax already scoped to issues.

Query Hosted MCP total_count GitHub REST GET /search/issues
repo:modelcontextprotocol/python-sdk transport 0 410
repo:modelcontextprotocol/python-sdk windows 0 95
repo:anthropics/claude-code hooks 3 8016
memory leak 40 407744 at verification time

The three returned hooks results were titled plugins, trap, and Hook before Exit, which also does not match normal GitHub full-text search behavior.

Passing owner and repo separately with a keyword-only query produced the same incorrect results, so this is not limited to embedding repo: in query.

Qualifier-only searches such as repo:modelcontextprotocol/python-sdk label:bug return plausible counts, which makes the keyword failure easy for an agent to trust silently.

Expected behavior

search_issues should preserve GitHub issue search semantics and return counts/results consistent with the GitHub REST Search API for the same effective query, or return an explicit error/unsupported-query signal.

Actual behavior

The tool returns a successful response with incomplete_results: false, but keyword matches are missing or unrelated.

Impact

Agents can incorrectly conclude that an issue, bug report, or prior discussion does not exist. This is a correctness failure rather than only a ranking-quality difference.

主要语言
Go
星标
33.1k
派生
5k
平均合并
2 天 15 小时
30 天内合并 PR
27

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

github/github-mcp-server 的其他 Issue

查看 github/github-mcp-server 的全部 Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。