@10kdevs/matha
Advanced tools
@@ -135,2 +135,24 @@ import * as fs from 'node:fs/promises'; | ||
| } | ||
| // Write MCP server config | ||
| try { | ||
| const mcpServerPath = await resolveMcpServerPath(projectRoot); | ||
| const mcpConfigContent = { | ||
| mcpServers: { | ||
| matha: { | ||
| command: 'node', | ||
| args: [mcpServerPath, 'serve'], | ||
| description: 'MATHA persistent cognitive layer', | ||
| }, | ||
| }, | ||
| }; | ||
| const mcpConfigPath = path.join(mathaDir, 'mcp-config.json'); | ||
| await writeAtomic(mcpConfigPath, mcpConfigContent, { overwrite: true }); | ||
| log(''); | ||
| log('MCP server config written to .matha/mcp-config.json'); | ||
| log('Add this to your IDE MCP settings:'); | ||
| log(JSON.stringify(mcpConfigContent, null, 2)); | ||
| } | ||
| catch (err) { | ||
| log(`Warning: Could not write MCP config: ${err.message}`); | ||
| } | ||
| return { | ||
@@ -268,1 +290,11 @@ projectRoot, | ||
| } | ||
| async function resolveMcpServerPath(projectRoot) { | ||
| // Try node_modules/.bin/matha first | ||
| const npmBinPath = path.join(projectRoot, 'node_modules', '.bin', 'matha'); | ||
| if (await pathExists(npmBinPath)) { | ||
| return npmBinPath; | ||
| } | ||
| // Fall back to dist/index.js | ||
| const distPath = path.join(projectRoot, 'dist', 'index.js'); | ||
| return distPath; | ||
| } |
+1
-1
| { | ||
| "name": "@10kdevs/matha", | ||
| "version": "0.1.2", | ||
| "version": "0.1.3", | ||
| "description": "The persistent cognitive layer for AI-assisted development. Gives AI agents the project context that currently only exists inside a senior engineer's head.", | ||
@@ -5,0 +5,0 @@ "main": "./dist/index.js", |
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
153724
0.79%3579
0.9%