Skip to content

Commit 4c09f7c

Browse files
DeusDataGeek0x0
andcommitted
feat(plugin): Claude Code plugin marketplace, discovery slice
Make this repository a Claude Code plugin marketplace so users can find and add the server from inside Claude Code: claude plugin marketplace add DeusData/codebase-memory-mcp claude plugin install codebase-memory@codebase-memory This is slice 1 of #1188: discovery only. The plugin registers the MCP server and nothing else; the skill, the graph agents and the context hooks still come from `codebase-memory-mcp install`. - .claude-plugin/marketplace.json: one plugin, sourced from ./plugin. - plugin/.claude-plugin/plugin.json: version pinned to the current release. Without a pinned version every commit to main would be a new plugin version for installed users. - plugin/.mcp.json: stdio server `npx -y codebase-memory-mcp@0.12.1`. The pin keeps main from advertising a server version npm does not have; the npm package downloads the release binary on first start and verifies it against the release checksums. - .gitignore: the root .mcp.json stays ignored; plugin/.mcp.json is published. - README: install section, and "use one or the other": with both the plugin and `install`, Claude Code runs the server twice under two tool namespaces. - tests/test_version_metadata_contract.sh: both plugin files are release-tracking surfaces; a new claim form reads the npm package spec (`codebase-memory-mcp@X.Y.Z`), and the unregistered-surface sweep now covers plugin/ and .claude-plugin/. The post-release sync that bumps server.json must bump these pins too, or this contract goes red. No language count is stated anywhere in the plugin metadata, so the language-count contract has nothing new to track. Refs #1188 Co-authored-by: Kody <kaidi.shi.1121@gmail.com> Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
1 parent d5bb016 commit 4c09f7c

6 files changed

Lines changed: 72 additions & 3 deletions

File tree

‎.claude-plugin/marketplace.json‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"name": "codebase-memory",
3+
"description": "The codebase-memory-mcp code knowledge graph server, as a Claude Code plugin.",
4+
"owner": {
5+
"name": "DeusData",
6+
"url": "https://github.com/DeusData"
7+
},
8+
"plugins": [
9+
{
10+
"name": "codebase-memory",
11+
"source": "./plugin",
12+
"description": "Codebase knowledge graph for AI agents: sub-ms queries, 99% fewer tokens."
13+
}
14+
]
15+
}

‎.gitignore‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ Thumbs.db
3333

3434
# MCP config (user-local, generated by install command)
3535
.mcp.json
36+
# ...except the Claude Code plugin's server definition, which is published
37+
!plugin/.mcp.json
3638

3739
# MCP Registry auth tokens
3840
.mcpregistry_*

‎README.md‎

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -578,6 +578,30 @@ Working in a clone? Use `.` in place of the flake URL, e.g. `nix run .#codebase-
578578
You: "Install this MCP server: https://github.com/DeusData/codebase-memory-mcp"
579579
```
580580

581+
### Install via Claude Code plugin
582+
583+
This repository is also a Claude Code plugin marketplace, so you can find and
584+
add the server from inside Claude Code:
585+
586+
```bash
587+
claude plugin marketplace add DeusData/codebase-memory-mcp
588+
claude plugin install codebase-memory@codebase-memory
589+
```
590+
591+
The plugin registers the MCP server only. It starts the server with
592+
`npx -y codebase-memory-mcp@<version>`, pinned to the current release; the first
593+
start downloads that release's binary through the npm package, which verifies
594+
it against the release checksums. The skill, the three graph agents and the
595+
context hooks are not part of the plugin: they come from
596+
`codebase-memory-mcp install`.
597+
598+
Use one or the other. `install` registers the same server for Claude Code, so
599+
with both you run it twice, under two tool namespaces
600+
(`mcp__codebase-memory-mcp__*` and
601+
`mcp__plugin_codebase-memory_codebase-memory-mcp__*`). Choose `install` for the
602+
full Claude Code setup; choose the plugin to add just the server without
603+
running an installer.
604+
581605
### Build from Source
582606

583607
<details>

‎plugin/.claude-plugin/plugin.json‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"name": "codebase-memory",
3+
"version": "0.12.1",
4+
"description": "Codebase knowledge graph for AI agents: sub-ms queries, 99% fewer tokens.",
5+
"author": {
6+
"name": "DeusData",
7+
"url": "https://github.com/DeusData"
8+
}
9+
}

‎plugin/.mcp.json‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"mcpServers": {
3+
"codebase-memory-mcp": {
4+
"type": "stdio",
5+
"command": "npx",
6+
"args": ["-y", "codebase-memory-mcp@0.12.1"]
7+
}
8+
}
9+
}

‎tests/test_version_metadata_contract.sh‎

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,8 @@ SURFACES=(
109109
"pkg/chocolatey/tools/chocolateyInstall.ps1|release"
110110
"pkg/scoop/codebase-memory-mcp.json|release"
111111
"pkg/homebrew/Formula/codebase-memory-mcp.rb|release"
112+
"plugin/.claude-plugin/plugin.json|release"
113+
"plugin/.mcp.json|release"
112114
"pkg/aur/PKGBUILD|pin:0.8.1"
113115
"pkg/aur/.SRCINFO|pin:0.8.1"
114116
)
@@ -163,6 +165,12 @@ versions_in() {
163165
# cannot see it, because the version keyword is in the function NAME.
164166
grep -oE 'return "[0-9]+\.[0-9]+\.[0-9]+"' "$path" |
165167
grep -oE '[0-9]+\.[0-9]+\.[0-9]+'
168+
# npm package-spec form: the Claude Code plugin launches the server as
169+
# `npx -y codebase-memory-mcp@X.Y.Z`, and that pin is the version every
170+
# plugin user actually runs. No declaration keyword sits next to it, so
171+
# without this form plugin/.mcp.json reads as a surface with no claim.
172+
grep -oE 'codebase-memory-mcp@[0-9]+\.[0-9]+\.[0-9]+' "$path" |
173+
grep -oE '[0-9]+\.[0-9]+\.[0-9]+$'
166174
} | sort -u
167175
}
168176

@@ -280,7 +288,9 @@ fi
280288
# this contract exists to prevent, and every check above would still pass. The
281289
# sweep pattern is deliberately BROADER than the extractors in section 3: if the
282290
# two shared a regex, a claim form the extractors cannot see would be invisible
283-
# to the sweep as well.
291+
# to the sweep as well. The Claude Code plugin tree (plugin/, .claude-plugin/) is
292+
# swept too: a later plugin file that pins `codebase-memory-mcp@X.Y.Z` (a hook
293+
# command, say) must be registered here, or it would go stale unchecked.
284294
while IFS= read -r path; do
285295
[[ -z "$path" ]] && continue
286296
for entry in "${SURFACES[@]}"; do
@@ -293,8 +303,8 @@ while IFS= read -r path; do
293303
"SURFACES so it stays in step with the release, or to EXEMPT with a" \
294304
"note saying what its number actually is."
295305
done < <(
296-
git grep -IlE '(version|pkgver|releases/(download|tag)/v)[^0-9]{0,16}[0-9]+\.[0-9]+\.[0-9]+|return "[0-9]+\.[0-9]+\.[0-9]+"' \
297-
-- server.json pkg tests/test_version_metadata_contract.sh 2>/dev/null || true
306+
git grep -IlE '(version|pkgver|releases/(download|tag)/v)[^0-9]{0,16}[0-9]+\.[0-9]+\.[0-9]+|return "[0-9]+\.[0-9]+\.[0-9]+"|codebase-memory-mcp@[0-9]+\.[0-9]+\.[0-9]+' \
307+
-- server.json pkg plugin .claude-plugin tests/test_version_metadata_contract.sh 2>/dev/null || true
298308
)
299309

300310
if ((failures > 0)); then

0 commit comments

Comments
 (0)