Files
NTrace-core/skills/nexttrace/references/validation.md
T
tsosunchia 11f6b48fa7 fix(mcp): 修复 PR review 反馈
- 为 stdin reader 使用 per-request response,避免并发调用串线
- 统一 Fast Trace IPv4/IPv6 非取消错误处理,移除 log.Fatal 分支
- 加固 deploy auth cookie 与 MCP session 测试 helper
- 显式断言 MTR MCP capability 工具存在
2026-05-01 08:05:22 +08:00

1.1 KiB

Validation

Startup

Loopback tokenless default:

nexttrace --deploy --mcp

External authenticated:

nexttrace --deploy --mcp --listen 0.0.0.0:1080 --deploy-token "$TOKEN"

Expected:

  • stdout prints the Web console listen URL.
  • stdout prints the MCP endpoint when --mcp is enabled.
  • external listen without manual token prints a generated token.
  • manual token does not echo the token.

Auth Smoke Checks

curl -i http://127.0.0.1:1080/api/options
curl -i -H "Authorization: Bearer $TOKEN" http://127.0.0.1:1080/api/options
curl -i -H "X-NextTrace-Token: $TOKEN" http://127.0.0.1:1080/api/options

Do not use query token URLs.

MCP Smoke Checks

Use an MCP client pointed at:

http://127.0.0.1:1080/mcp

Then call:

  1. nexttrace_capabilities
  2. nexttrace_traceroute with {"target":"example.com","protocol":"icmp"}
  3. nexttrace_globalping_limits
  4. nexttrace_globalping_trace with a small locations[] set

Repo Tests

go build ./...
go test ./...
node --test server/web/assets/*.test.cjs