跳到正文
DEV Community· Faizan Khan·· 5 天前AI 評分53

MCPSense 0.5.1 透過 GitHub Actions 檢查 MCP 設定變更

A small GitHub Actions check for MCP configuration changes

AI 導讀

MCPSense 0.5.1 的 GitHub Actions 檢查可在 Pull Request 中呈現 MCP 設定掃描發現,並把發現數列入工作摘要。離線掃描範例中的明文 HTTP 時,會回報一項高級別發現 SEC-016;只將 HTTP 改為 HTTPS 後,該發現便清除。此測試只涵蓋檔案中的傳輸設定,伺服器行為、授權和工具回應仍須另行審查;有發現時檢查維持綠色,掃描失敗則令工作失敗。

正文

Faizan Khan

I wanted a reviewer to see what an MCP config scan found in the same pull request where the team was already reviewing the change. I tried a report-only GitHub Actions check with MCPSense 0.5.1 and a disposable config.

Reproduce the two results

Save this in an empty folder as review-mcp.json:

{
  "mcpServers": {
    "sample": { "url": "http://example.invalid/mcp" }
  }
}

With MCPSense 0.5.1 installed, run:

mcpsense scan ./review-mcp.json --mode config --offline --no-baseline

The offline scan reported one high finding, SEC-016, for plain HTTP. Change only http:// to https:// and run it again. The finding clears. This test covers the transport setting in the file. Server behavior, authorization, and tool responses still need separate review.

Try it in one pull request

The public Actions run shows both results. The setup guide links to the pinned workflow and explains how to point it at your config file.

The workflow puts the finding count in the job summary. During the trial, findings leave the check green and a failed scan fails the job. Run the same scan locally when you need the details.

If you already review MCP config changes in GitHub, I’d like to hear what the report changes about one review. There’s an option in the guide to try it together for 20 minutes. Your repo and results can stay private.

Disclosure: I maintain MCPSense. I used AI assistance to draft this post and verified the demo against the published release.

來源:DEV Community · dev.to