Skip to content

chore: remove unused check-mcp.sh diagnostic script#63

Merged
lxcong merged 1 commit into
chainbase-labs:mainfrom
fullstackjam:chore/remove-unused-check-mcp-script
Jun 26, 2026
Merged

chore: remove unused check-mcp.sh diagnostic script#63
lxcong merged 1 commit into
chainbase-labs:mainfrom
fullstackjam:chore/remove-unused-check-mcp-script

Conversation

@fullstackjam

Copy link
Copy Markdown
Contributor

What

Deletes skills/agentkey/scripts/check-mcp.sh (92 lines) and updates every doc that referenced it. The script has shipped since the initial public release but is dead code — nothing in the skill's runtime ever invokes it.

Why it's safe to remove (the receipts)

check-mcp.sh was never wired into the skill:

  • Never in SKILL.md, ever. git log -S check-mcp -- '*SKILL.md' returns no commits across all history — the script has never been referenced by the skill's decision tree in any version.
  • Superseded by a native check. The skill verifies MCP health by calling the MCP list_tools endpoint directly (SKILL.md → "Status" / Step 0.C), not a shell script. Its three status codes (MCP_OK / MCP_NO_KEY / MCP_NOT_CONFIGURED) are consumed by nothing.
  • Not in any runtime path. No reference in CI (scripts-test.yml), the bats suite, dev-smoke.sh, install.sh/install.ps1, or uninstall.sh/uninstall.ps1. The only mentions were prose: SECURITY.md, the ClawScan note, the PR template, and directory-tree comments.

(The companion @agentkey/cli is a separately-published npm package; it writes MCP config and has no reason to invoke a diagnostic bundled inside an already-installed skill.)

What removing it buys

  • Drops the skill's only python3 dependency. check-mcp.sh shelled out to python3 to parse ~/.claude.json; on a host without python3 it silently returned a false MCP_NO_KEY. The surviving check-update.sh is pure shell.
  • Shrinks the on-disk read footprint to zero. Post-removal the skill reads no agent config file and no AGENTKEY_API_KEY value from disk — it only talks to the MCP transport. SECURITY.md's "Files the skill reads or writes" table is updated to match.
  • Removes a security-scanner false-positive surface. The credential-read (*_API_KEY*) pattern in this script is precisely what required a dedicated SECURITY.md carve-out and a --clawscan-note item explaining "this is not credential exfiltration." Both are now unnecessary and removed.

Doc updates (no dangling references left)

  • SECURITY.md — "two helper scripts" → "one"; removed the check-mcp.sh bullet and the *_API_KEY* scanner note; fixed the file table (the skill no longer reads ~/.claude.json / ~/.env.local; ~/.claude.json re-characterized as CLI-written so the credential-handling reference stays accurate).
  • .github/workflows/release-please.yml — dropped item (3) from the ClawScan note.
  • .github/PULL_REQUEST_TEMPLATE.md — removed the obsolete "check-mcp.sh still works" checkbox.
  • README.md / docs/README_zh.md / .claude/CLAUDE.md — directory-tree comments.

grep -rn check-mcp now returns nothing.

Verification

  • bats tests/ — all 10 pass (they cover the untouched check-update.sh).
  • grep -rn 'check-mcp\|MCP_OK\|MCP_NO_KEY\|MCP_NOT_CONFIGURED\|env.local' → zero hits.
  • release-please.yml still parses as valid YAML.

Why chore: and not fix:

Typed chore: deliberately so release-please does not cut a version bump / GitHub Release for an internal cleanup — a release would push a no-op plugin update to every user. No end-user runtime behavior changes.

🤖 Generated with Claude Code

@fullstackjam
fullstackjam force-pushed the chore/remove-unused-check-mcp-script branch from 6772fa0 to 8075fdd Compare June 25, 2026 16:18
check-mcp.sh has shipped since the initial public release but was never
wired into the skill's runtime. `git log -S check-mcp -- '*SKILL.md'`
is empty across all history, and the skill verifies MCP health via the
native `list_tools` endpoint (SKILL.md -> "Status"), not a shell script.
It is referenced by no runtime path: not SKILL.md, CI, the bats suite,
dev-smoke.sh, or either installer.

Removing it:
- drops the skill's only python3 dependency (parsing ~/.claude.json)
- shrinks the skill's on-disk read footprint to zero -- it no longer
  reads any agent config file or AGENTKEY_API_KEY value from disk
- removes the credential-read pattern that required a SECURITY.md
  carve-out and a ClawScan false-positive note

Also updates the now-dangling references: SECURITY.md (helper-script
list, file table, scanner notes), the release-please ClawScan note, the
PR-template checkbox, and the directory-tree comments in README /
README_zh / CLAUDE.md.

While restructuring SECURITY.md's scanner-notes list, also corrects a
pre-existing self-contradiction in that block: item 1 claimed
check-update.sh compares the release tag against skills/agentkey/version.txt,
but the script compares against an embedded constant (LOCAL_VERSION) and
reads no file -- now consistent with the same doc's line 35.

Typed `chore:` so an internal cleanup does not trigger a user-facing
plugin release.
@fullstackjam
fullstackjam force-pushed the chore/remove-unused-check-mcp-script branch from 8075fdd to 3e09e87 Compare June 25, 2026 16:21
@lxcong

lxcong commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

@claude review

@github-actions

Copy link
Copy Markdown
Contributor

🤖 Claude security review requested by @lxcong. Running against HEAD 3e09e875fd3410f6a12e103365dd5df928414449...

@claude

claude Bot commented Jun 26, 2026

Copy link
Copy Markdown

🤖 Claude security review — HEAD: 3e09e87

Scope: Deletion of skills/agentkey/scripts/check-mcp.sh with consistent doc/template/workflow/SECURITY updates across 7 files.

✅ No security or convention issues found.

  • No credential patterns in added lines
  • No new shell/CI attack surface introduced; removed script was the only shell code touching ~/.claude.json and ~/.env.local
  • Workflow change is limited to the --clawscan-note string; no new action references or supply-chain risks
  • SECURITY.md and README correctly updated to reflect the reduced file-access footprint
  • PR title chore: remove unused check-mcp.sh diagnostic script matches convention
  • version.txt, CHANGELOG.md, .release-please-manifest.json, and plugin.json version field untouched

Review triggered by @lxcong
via @claude review.

@lxcong
lxcong merged commit e7dbae6 into chainbase-labs:main Jun 26, 2026
3 checks passed
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