generated from coulomb/repo-seed
Rename MCP server identifier from state-hub to dev-hub
Introduce canonical MCP_SERVER_NAME constants, shared registration helpers, and a migrate_mcp_config.py script for ~/.claude.json upgrades. Registration, patch, and custodian CLI checks accept both dev-hub and legacy state-hub during transition. API root metadata and session-protocol template reflect the new name.
This commit is contained in:
@@ -126,11 +126,9 @@ def _detect_domain(project_path: Path) -> str | None:
|
||||
|
||||
|
||||
def _check_mcp() -> bool:
|
||||
claude_json = Path.home() / ".claude.json"
|
||||
if not claude_json.exists():
|
||||
return False
|
||||
config = json.loads(claude_json.read_text())
|
||||
return "state-hub" in config.get("mcpServers", {})
|
||||
from scripts.mcp_registration import load_claude_json, mcp_server_registered
|
||||
|
||||
return mcp_server_registered(load_claude_json())
|
||||
|
||||
|
||||
# ── Subcommands ────────────────────────────────────────────────────────────────
|
||||
@@ -193,7 +191,8 @@ def cmd_register(args: argparse.Namespace) -> None:
|
||||
if _check_mcp():
|
||||
print(" MCP OK")
|
||||
else:
|
||||
print("WARNING: 'state-hub' not in ~/.claude.json.")
|
||||
print("WARNING: 'dev-hub' (or legacy 'state-hub') not in ~/.claude.json.")
|
||||
print(" Run: python scripts/migrate_mcp_config.py # if upgrading legacy config")
|
||||
print(" See ~/.claude/CLAUDE.md → MCP Server Registration section.")
|
||||
|
||||
# ── Step 5: Write CLAUDE.custodian.md ─────────────────────────────────────
|
||||
|
||||
Reference in New Issue
Block a user