Skip to content

feat: rename @agentkey/mcp → @agentkey/cli in install scripts and docs#47

Merged
lxcong merged 1 commit into
mainfrom
feat/rename-mcp-to-cli
May 15, 2026
Merged

feat: rename @agentkey/mcp → @agentkey/cli in install scripts and docs#47
lxcong merged 1 commit into
mainfrom
feat/rename-mcp-to-cli

Conversation

@f0rmatting
Copy link
Copy Markdown
Contributor

Summary

Companion change to chainbase-labs/AgentKey-Server#32. The npm package has been renamed; this PR updates everything users actually see.

User-facing

  • `scripts/install.{sh,ps1}`: `MCP_PACKAGE` / `$McpPackage` → `CLI_PACKAGE` / `$CliPackage`
  • `scripts/uninstall.{sh,ps1}`: sweep BOTH `@agentkey/cli` and `@agentkey/mcp` so users upgrading from v0.x get a clean uninstall
  • `skills/agentkey/SKILL.md`: setup command + manual-config JSON example
  • `README.md` + `docs/README_zh.md`: every `npx @agentkey/mcp` command + the manual-config JSON examples (switched from stale stdio shape to the remote-HTTP shape that `--auth-login` actually writes in v1.0)

Internal / protocol docs

  • `SECURITY.md`: file/network audit tables
  • `protocol/skill-meta-v1.md`, `docs/SERVER-IMPLEMENTATION.md`: clarify the protocol partner is AgentKey-Server's hosted `/v1/mcp` endpoint, not a standalone npm package — these references were already misleading before the rename
  • `.claude/CLAUDE.md`: keep Claude-session guidance in sync

`CHANGELOG.md` left untouched (release-please manages history).

Sequencing

Merge this PR after `@agentkey/cli` is published to npm — otherwise the install scripts here will reference a package that doesn't exist yet. Recommended order:

  1. Merge AgentKey-Server#32
  2. `cd cli && npm publish` (first `@agentkey/cli` release at `1.0.0`)
  3. Merge this PR

Test plan

  • Verify `npx -y @agentkey/cli --auth-login` works end-to-end after npm publish
  • Verify `scripts/uninstall.sh` on a machine with `@agentkey/mcp` globally installed cleans it up
  • Spot-check the rendered README on GitHub for any missed references

Companion change to chainbase-labs/AgentKey-Server rename PR. The npm
package has been renamed; this PR updates everything users see.

User-facing
- scripts/install.{sh,ps1}: MCP_PACKAGE/$McpPackage → CLI_PACKAGE/$CliPackage
- scripts/uninstall.{sh,ps1}: sweep BOTH @agentkey/cli and @agentkey/mcp
  so users upgrading from v0.x get a clean uninstall
- skills/agentkey/SKILL.md: setup command + manual-config JSON example
- README.md + docs/README_zh.md: every npx @agentkey/mcp command + the
  manual-config JSON examples (switched from stale stdio shape to the
  remote-HTTP shape that --auth-login actually writes in v1.0)

Internal / protocol docs
- SECURITY.md: file/network audit tables
- protocol/skill-meta-v1.md, docs/SERVER-IMPLEMENTATION.md: clarify the
  protocol partner is AgentKey-Server's hosted /v1/mcp endpoint, not a
  standalone npm package — these references were already misleading
  before the rename
- .claude/CLAUDE.md: keep Claude-session guidance in sync

CHANGELOG.md left untouched (release-please manages history).
@lxcong lxcong changed the title docs: rename @agentkey/mcp → @agentkey/cli in install scripts and docs feat: rename @agentkey/mcp → @agentkey/cli in install scripts and docs May 15, 2026
@lxcong
Copy link
Copy Markdown
Contributor

lxcong commented May 15, 2026

@claude review

@github-actions
Copy link
Copy Markdown
Contributor

🤖 Claude security review requested by @lxcong. Running against HEAD 1fd8529d55a169b5a8ffa0855c17f140444bb926...

@claude
Copy link
Copy Markdown

claude Bot commented May 15, 2026

🤖 Claude security review — HEAD: 1fd8529

Scope: Rename @agentkey/mcp@agentkey/cli across docs, install/uninstall scripts, and skill — 11 files, docs + shell/PS changes.

✅ No security or convention issues found.

Spot checks passed:

  • No credential patterns detected (all ak_... / Bearer ak_... occurrences are doc placeholders)
  • install.sh: CLI_PACKAGE and AUTH_ARGS are double-quoted at call sites — no injection surface
  • uninstall.sh: $_pkg double-quoted in npm uninstall -g "$_pkg" and grep -q "$_pkg"; values are hardcoded, not user-controlled
  • uninstall.ps1: detection uses [regex]::Escape($pkg) — correct; $pkg arg to npm is a known-safe constant
  • install.ps1: $SkillRepo = 'chainbase-labs/agentkey' invariant preserved; $CliPackage is a constant
  • install.sh: SKILL_REPO="chainbase-labs/agentkey" invariant preserved
  • No managed files touched (version.txt, plugin.json version, CHANGELOG.md, .release-please-manifest.json all untouched)
  • Both uninstall scripts sweep both @agentkey/cli and the legacy @agentkey/mcp — backward-compatibility requirement satisfied

💡 Suggestion (pre-existing, not introduced here): uninstall.sh:302 uses grep -q "$_pkg" without -F; the . in package names is treated as a regex wildcard. grep -qF "$_pkg" would be an exact-string match and is slightly safer. Low priority.


Review triggered by @lxcong
via @claude review.

@lxcong lxcong merged commit ab0dba7 into main May 15, 2026
5 checks passed
@lxcong lxcong deleted the feat/rename-mcp-to-cli branch May 15, 2026 08:31
@lxcong lxcong mentioned this pull request May 15, 2026
lxcong added a commit that referenced this pull request May 15, 2026
🤖 I have created a release *beep* *boop*
---


##
[1.7.0](v1.6.1...v1.7.0)
(2026-05-15)


### Features

* rename @agentkey/mcp → @agentkey/cli in install scripts and docs
([#47](#47))
([ab0dba7](ab0dba7))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
lxcong added a commit that referenced this pull request May 15, 2026
…50)

## Summary

The installer's "is AgentKey already configured?" heuristic went stale
after #47 / v1.7.0 switched `--auth-login` from a stdio MCP block to a
remote-HTTP one. The check still greps for `\"AGENTKEY_API_KEY\":
\"ak_...\"` (the old env-shaped field) — but the new config writes
`\"Authorization\": \"Bearer ak_...\"` inside `headers` instead.

**Observed symptom**: a user with a residual stdio config from an
earlier release sees

> ✓ AgentKey is already configured in an MCP client config — skipping
auth.

…the installer exits successfully, but calling any AgentKey MCP tool
errors out because the stdio runtime `@agentkey/mcp` is no longer used.

The mirror failure also exists: users who **have** successfully
re-authed into the new HTTP shape no longer match the regex and would
get re-prompted on every installer run.

## Fix

Delete the heuristic. `@agentkey/cli --auth-login` already knows whether
the local token can be reused or a fresh device-code round-trip is
needed — let the CLI decide instead of having the installer second-guess
from on-disk shape.

**Removed**

- \`already_authed()\` in \`scripts/install.sh\`
- \`Test-AlreadyAuthed\` in \`scripts/install.ps1\`
- \`--force-mcp\` / \`-ForceMcp\` flags (no longer meaningful — auth
always runs unless \`--skip-mcp\`)
- \`--force-mcp\` documentation in README.md / docs/README_zh.md

Net: **-57 / +10 lines** across the four files.

## Test plan

- [ ] On a machine with a stale stdio-shaped \`~/.claude.json\` from a
pre-1.7 install: \`curl -fsSL https://agentkey.app/install.sh | bash\`
now actually re-runs auth-login and the MCP block becomes a working HTTP
entry
- [ ] On a fresh machine: install still completes auth in one
device-code flow (no behavior change)
- [ ] On a machine already on the new HTTP shape: re-running the
installer still works and the CLI either reuses the token or prompts
(CLI's call, not the installer's)
- [ ] \`--skip-mcp\` continues to skip the auth step
- [ ] \`bash -n scripts/install.sh\` passes (verified)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: lxcong <lxcong@chainbase.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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