Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .claude-plugin/marketplace.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
},
"metadata": {
"description": "Persistent memory and cognitive profiling plugins for Claude Code",
"version": "3.15.1"
"version": "3.15.2"
},
"plugins": [
{
"name": "cortex",
"source": "./",
"description": "Persistent memory and cognitive profiling for Claude Code — thermodynamic memory with heat/decay, intent-aware retrieval, biological plasticity, codebase intelligence, and cognitive profiling. 47 MCP tools with enriched schemas. PostgreSQL + pgvector in CLI mode; automatic SQLite fallback in Cowork/sandboxed mode. Curated wiki (ADRs, specs, lessons) with audit-artefact filtering. Consolidate is set-based SQL batched — decay/plasticity/pruning run 100-500× faster on large stores. Workflow graph with caller-qualified CALLS chains rendering full method-to-method dependencies (native tree-sitter, no AP required). Side panel humanized for non-technical users. Ingests codebase analysis (ai-automatised-pipeline) and PRDs (prd-spec-generator) into wiki + memory + knowledge graph. Docker image available.",
"version": "3.15.1",
"version": "3.15.2",
"author": {
"name": "Clement Deust",
"email": "admin@ai-architect.tools"
Expand Down
4 changes: 2 additions & 2 deletions .mcp.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"cortex": {
"command": "python3",
"args": [
"-c",
"import json,os; p=json.load(open(os.path.expanduser('~/.claude/plugins/installed_plugins.json')))['plugins']['cortex@cortex-plugins'][0]['installPath']; os.execvp('python3',['python3',os.path.join(p,'scripts','launcher.py'),'mcp_server'])"
"${CLAUDE_PLUGIN_ROOT}/scripts/launcher.py",
"mcp_server"
],
"env": {
"DATABASE_URL": "postgresql://localhost:5432/cortex",
Expand Down
31 changes: 31 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,37 @@ adheres to [Semantic Versioning](https://semver.org/).

## [Unreleased]

## [3.15.2] - 2026-05-09

### Fixed
- **MCP startup robustness** — Discord user reported the Cortex MCP server
failing to start with no actionable error. Root cause: `.mcp.json` used a
fragile `python -c` one-liner that read `~/.claude/plugins/installed_plugins.json`
to dynamically resolve the install path. The wrapper swallowed all
launcher startup errors invisibly and broke under: (a) plugin upgrade
leaving stale `installPath`, (b) custom marketplace install names, (c)
`python3` not on PATH, (d) any `installed_plugins.json` shape change by
Claude Code. `.mcp.json` now uses `${CLAUDE_PLUGIN_ROOT}/scripts/launcher.py`
— Anthropic's documented plugin substitution variable, already used by
every hook in this repo. The launcher self-orients via `__file__` so
manual installs continue to work.

### Added
- **`cortex-doctor mcp`** — new diagnostic subcommand for end-to-end MCP
startup checks. Tells the user *exactly* which check failed, what
command/path was tried, and the actual error string — no more silent
"✘ failed". Checks: python interpreter on PATH, `installed_plugins.json`
shape, `CLAUDE_PLUGIN_ROOT` env, launcher smoke probe (catches errors
the old `-c` wrapper hid), `DATABASE_URL`, critical Python deps. Use
`--json` for Discord-paste-friendly output.

### Verification
- 36 new tests added (`tests_py/test_doctor_mcp.py`,
`tests_py/scripts/test_launcher_resolution.py`); all pass.
- Backward-compatible: `cortex-doctor` (no subcommand) preserves legacy
full-setup verification behaviour.
- Platform-agnostic: no Windows/Mac-specific code paths.

## [3.15.1] - 2026-05-05

### Fixed
Expand Down
27 changes: 22 additions & 5 deletions mcp_server/doctor.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,12 +271,29 @@ def _i10_config() -> Check:


def run() -> int:
"""Run all checks. Print a report. Return 0 on required-green, 1 otherwise.

Optional checks (``Check.optional=True``) warn on failure but do not
cause a non-zero exit. Only core-required checks (PG connection,
Python version, etc.) gate the exit code.
"""Entry point. Dispatches to subcommand if given, else full check.

Subcommands:
(none) Full setup verification (Python, PG, extensions, etc.)
mcp MCP startup diagnostics (Discord-debug-friendly)
Flags:
--json Emit machine-readable JSON report
--copy Prepend a "paste me in Discord" header to the
human output (useful for issue templates)
"""
argv = sys.argv[1:]
if argv and argv[0] == "mcp":
from mcp_server.doctor_mcp import run_mcp

flags = argv[1:]
json_output = "--json" in flags
copy_header = "--copy" in flags
return run_mcp(json_output=json_output, copy_header=copy_header)
return _run_full_check()


def _run_full_check() -> int:
"""Full setup verification (legacy `cortex-doctor` behaviour)."""
checks = [c() for c in CHECKS]
width = max(len(c.name) for c in checks) + 2

Expand Down
Loading
Loading