mcp-nervous-system 1.7.0 → 1.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +13 -18
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -1921,7 +1921,6 @@ function runMCPAnalyzer(mode, outputPath) {
1921
1921
  const result = {
1922
1922
  timestamp: new Date().toISOString(),
1923
1923
  mode: mode || 'analyze',
1924
- project: {},
1925
1924
  recommended_tools: [],
1926
1925
  claude_md: null,
1927
1926
  config_suggestions: null
@@ -2028,7 +2027,9 @@ function runMCPAnalyzer(mode, outputPath) {
2028
2027
  characteristics.project_type = 'general';
2029
2028
  }
2030
2029
 
2031
- result.project = characteristics;
2030
+ // Don't expose raw project internals - just use them for recommendations
2031
+ result.project_type = characteristics.project_type;
2032
+ result.has_config = characteristics.has_config;
2032
2033
 
2033
2034
  // Step 2: Recommend tools based on project type
2034
2035
  const recommendations = [];
@@ -2060,7 +2061,7 @@ function runMCPAnalyzer(mode, outputPath) {
2060
2061
  recommendations.push({
2061
2062
  tool: 'guardrail_rules',
2062
2063
  priority: 'high',
2063
- reason: 'You have ' + (characteristics.protected_count || 'multiple') + ' protected files. These rules enforce discipline.'
2064
+ reason: 'Protected files detected. These rules enforce discipline around file edits.'
2064
2065
  });
2065
2066
  }
2066
2067
 
@@ -2073,7 +2074,7 @@ function runMCPAnalyzer(mode, outputPath) {
2073
2074
  recommendations.push({
2074
2075
  tool: 'security_audit',
2075
2076
  priority: 'high',
2076
- reason: 'Production system with ' + characteristics.file_count + ' files. Security audit catches exposed secrets and misconfigurations.'
2077
+ reason: 'Production system detected. Security audit catches exposed secrets and misconfigurations.'
2077
2078
  });
2078
2079
  recommendations.push({
2079
2080
  tool: 'emergency_kill_switch',
@@ -2198,23 +2199,17 @@ function runMCPAnalyzer(mode, outputPath) {
2198
2199
  claudeMd += '- Kill switch is available for emergencies\n\n';
2199
2200
  }
2200
2201
 
2201
- result.claude_md = claudeMd;
2202
+ // Only include CLAUDE.md content in write/reload mode, not analyze
2203
+ if (mode === 'write' || mode === 'reload') {
2204
+ result.claude_md_generated = true;
2205
+ }
2202
2206
 
2203
2207
  // Step 4: Config suggestions (if no config exists)
2204
2208
  if (!characteristics.has_config) {
2205
- result.config_suggestions = {
2206
- message: 'No nervous-system.config.json found. Create one to enable full audit capabilities.',
2207
- suggested_config: {
2208
- project_root: projectRoot,
2209
- data_dir: path.join(projectRoot, 'data'),
2210
- logs_dir: path.join(projectRoot, 'logs'),
2211
- html_dir: characteristics.has_html_pages ? path.join(projectRoot, 'public') : null,
2212
- protected_files_list: path.join(projectRoot, 'PROTECTED_FILES.txt'),
2213
- config_file: path.join(projectRoot, 'system-config.json'),
2214
- pm2_managed: characteristics.has_pm2,
2215
- docs_to_audit: []
2216
- }
2217
- };
2209
+ result.setup_needed = true;
2210
+ result.setup_message = 'No nervous-system.config.json found. Run with mode=write to create one and generate a tailored CLAUDE.md for your project.';
2211
+ } else {
2212
+ result.setup_needed = false;
2218
2213
  }
2219
2214
 
2220
2215
  // Step 5: If mode is 'reload' or 'write', write the CLAUDE.md
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mcp-nervous-system",
3
- "version": "1.7.0",
3
+ "version": "1.7.1",
4
4
  "description": "The Nervous System - LLM Behavioral Enforcement Framework. 7 mechanically enforced rules, 17 tools including kill switch, audit chain, dispatch, drift audit, security audit, page health, pre-publish audit, and session close. MCP server for Claude Desktop, Claude Code, and any MCP-compatible client.",
5
5
  "main": "server.js",
6
6
  "bin": {