The Claude Code plugin supplies a session hook and the CodeStory grounding contract. Configure MCP separately unless your plugin setup already wires the shipped adapter. Hooks record repository state and teach routing; MCP supplies the repository evidence.
From a terminal:
claude plugin marketplace add TheGreenCedar/AgentPluginMarketplace --ref main
claude plugin install codestory@TheGreenCedar --scope projectOr from a Claude Code session:
/plugin marketplace add TheGreenCedar/AgentPluginMarketplace
/plugin install codestory@TheGreenCedar --scope project
For local development from this checkout:
claude plugin install ./plugins/codestory --scope projectUse claude --plugin-dir plugins/codestory for a one-session test. Claude Code
caches installed plugins, so reinstall after changing plugin files.
If the plugin does not register MCP for you, use the portable adapter from the installed plugin, not a CodeStory checkout path:
{
"mcpServers": {
"codestory": {
"command": "node",
"args": ["./scripts/codestory-mcp.cjs"],
"cwd": "${PLUGIN_ROOT}",
"env": {
"CODESTORY_PLUGIN_DATA": "/absolute/path/to/codestory-plugin-data"
},
"tool_timeout_sec": 300
}
}
}If Claude does not expand ${PLUGIN_ROOT}, set cwd to
${CLAUDE_PLUGIN_ROOT} (the installed plugin directory). Use a persistent
per-user plugin-data directory outside the repository. This server block is
host-neutral; the Claude plugin's .mcp.json keeps the legacy auto-discovery
shape for Claude and Codex clients that still require it.
claude plugin listshows codestory.- A fresh session loads the session hook.
- The CodeStory MCP server is connected.
- A normal repository question returns cited files and symbols.
For example:
How does the configuration loader reach the runtime, and which tests exercise that path?
The first request may prepare the repository and retry. Hooks fail open when Node or MCP is missing, but hooks alone are not grounding evidence. Without MCP, the agent must use ordinary source inspection and report that CodeStory was unavailable.
Shared first-use behavior: User guide.
| Symptom | Action |
|---|---|
| Plugin hook is silent | Confirm node is on PATH and CLAUDE_PLUGIN_ROOT resolves to the plugin directory |
| No CodeStory tools | Add or repair the MCP configuration; the hook does not start MCP by itself |
| First tool is preparing | Retry the same tool after its returned delay |
| Installed changes do not appear | Reinstall the cached plugin and start a fresh session |
See shared troubleshooting for readiness and cache problems.
Claude Code provides the session hook, but MCP setup is normally manual and skill exposure depends on the host. Once MCP is connected, repository preparation and the per-user retrieval server behave the same as in Codex.