Skip to content

fix: exclude servers without a valid MCP tool listing - #154

Merged
gaojude merged 1 commit into
mainfrom
codex/fix-verified-discovery
Sep 9, 2026
Merged

fix: exclude servers without a valid MCP tool listing#154
gaojude merged 1 commit into
mainfrom
codex/fix-verified-discovery

Conversation

@gaojude

@gaojude gaojude commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Automatic discovery currently counts an ordinary HTTP catch-all server as a Next.js MCP server, even after its tool listing fails and returns zero tools. The response can report a successful discovery consisting entirely of unusable candidates.

Filter candidates after listing their MCP tools, and compute the count and no-server guidance from the remaining servers. This matches the existing explicit-port behavior. Adds a patch changeset.

Validation:

  • The mixed-candidate and all-invalid regression cases failed against the original implementation.
  • pnpm build, pnpm typecheck, and the complete pnpm exec vitest run: 36 tests passed.
  • Started a real HTML catch-all on port 3001 alongside Next.js 16.3.4 on 3000 and 16.0.7 on 3456. Stdio discovery excluded 3001 and retained both Next.js servers; an explicit 3001 query also failed correctly.

Local validation used macOS arm64, Node.js 24.19.0, and pnpm 9.15.9. The uploaded GitHub-signed commit has the same Git tree as the tested checkout.

@gaojude
gaojude merged commit 7a14fa6 into main Sep 9, 2026
5 checks passed
@gaojude
gaojude deleted the codex/fix-verified-discovery branch September 9, 2026 17:01
@github-actions github-actions Bot mentioned this pull request Sep 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants