Files

9 lines
119 B
JSON
Raw Permalink Normal View History

2026-04-23 13:52:31 +08:00
{
fix(plugin): wire .mcp.json remote MCP server for plugin installs (#60) ## Summary - The repo already ships as a Claude Code plugin (`.claude-plugin/plugin.json` + `marketplace.json`), but `.mcp.json` was empty (`{ "mcpServers": {} }`), so installing the plugin registered **no** MCP server — the skill loaded with no tools to call. - Wire `.mcp.json` to register a `type: http` server at `https://api.agentkey.app/v1/mcp`, injecting the API key via the documented `${user_config.AGENTKEY_API_KEY}` interpolation (the manifest already declares `userConfig.AGENTKEY_API_KEY`). `${CLAUDE_PLUGIN_OPTION_*}` env vars only apply to stdio/subprocess servers, not to an http server header. - Correct the now-misleading `.mcp.json` guidance in `.claude/CLAUDE.md`, and document the public marketplace install path (`/plugin marketplace add chainbase-labs/agentkey`) in `README.md` + `docs/README_zh.md`. Scope: only `.mcp.json`, `.claude/CLAUDE.md`, `README.md`, `docs/README_zh.md` (+28/-10). Version/release files untouched; the `fix:` lets release-please cut 1.9.1 on merge. ## Test Plan - [x] `claude plugin validate .` passes - [x] Local end-to-end (isolated config): `claude plugin marketplace add ./` + `claude plugin install agentkey@agentkey --config AGENTKEY_API_KEY=…` → `plugin:agentkey:agentkey … ✓ Connected`, confirming `${user_config.*}` is interpolated into the auth header and the server authenticates - [x] `bats tests/` 10/10 pass - [ ] Reviewer sanity-check of the 4-file diff 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-18 18:35:26 +08:00
"mcpServers": {
"agentkey": {
"type": "http",
fix(claude): restore native MCP OAuth login (#95) ## Summary - remove the Claude Code plugin API-key `userConfig` prompt and static `Authorization` header - let Claude Code follow the AgentKey server's 401/RFC 9728 metadata into native MCP OAuth - document both the `/mcp` **Authenticate** action and `claude mcp login plugin:agentkey:agentkey` - add Claude-specific regression coverage and include the Claude MCP files in the scripts test workflow paths ## Root cause Claude Code treats any configured `Authorization` header as an explicit choice of header authentication. When the interpolated API key is empty, the server returns 401, but Claude Code does not offer or fall back to OAuth because the header is present. Removing the header and its `userConfig` source restores native MCP OAuth discovery. ## Impact The runtime authentication change is limited to the Claude Code plugin path (`.claude-plugin/plugin.json` + root `.mcp.json`). The Skills CLI/API-key setup path and the Codex, Cursor, Kimi, Gemini, and Antigravity MCP configurations are unchanged. Shared documentation and CI path filters are updated to describe and protect this Claude-specific behavior. ## Validation - `bats tests/` — 29 tests passed - `claude plugin validate --strict .` — passed - isolated Claude Code 2.1.228 plugin load reported `Needs authentication` - `claude mcp login plugin:agentkey:agentkey --no-browser` generated the AgentKey OAuth authorization URL - `git diff --check origin/main...fork/codex/fix-claude-code-oauth` — passed Co-authored-by: Allen <0xfatdog@gmail.com>
2026-08-14 02:24:36 +08:00
"url": "https://api.agentkey.app/v1/mcp"
fix(plugin): wire .mcp.json remote MCP server for plugin installs (#60) ## Summary - The repo already ships as a Claude Code plugin (`.claude-plugin/plugin.json` + `marketplace.json`), but `.mcp.json` was empty (`{ "mcpServers": {} }`), so installing the plugin registered **no** MCP server — the skill loaded with no tools to call. - Wire `.mcp.json` to register a `type: http` server at `https://api.agentkey.app/v1/mcp`, injecting the API key via the documented `${user_config.AGENTKEY_API_KEY}` interpolation (the manifest already declares `userConfig.AGENTKEY_API_KEY`). `${CLAUDE_PLUGIN_OPTION_*}` env vars only apply to stdio/subprocess servers, not to an http server header. - Correct the now-misleading `.mcp.json` guidance in `.claude/CLAUDE.md`, and document the public marketplace install path (`/plugin marketplace add chainbase-labs/agentkey`) in `README.md` + `docs/README_zh.md`. Scope: only `.mcp.json`, `.claude/CLAUDE.md`, `README.md`, `docs/README_zh.md` (+28/-10). Version/release files untouched; the `fix:` lets release-please cut 1.9.1 on merge. ## Test Plan - [x] `claude plugin validate .` passes - [x] Local end-to-end (isolated config): `claude plugin marketplace add ./` + `claude plugin install agentkey@agentkey --config AGENTKEY_API_KEY=…` → `plugin:agentkey:agentkey … ✓ Connected`, confirming `${user_config.*}` is interpolated into the auth header and the server authenticates - [x] `bats tests/` 10/10 pass - [ ] Reviewer sanity-check of the 4-file diff 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-18 18:35:26 +08:00
}
}
}