@endlessblink/like-i-said-v2
Version:
Task Management & Memory for Claude - Track tasks, remember context, and maintain continuity across sessions with 27 powerful tools. Works with Claude Desktop and Claude Code.
67 lines (56 loc) โข 2.65 kB
JavaScript
import fs from 'fs';
import path from 'path';
import { fileURLToPath } from 'url';
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
// Test the configuration that would be generated for Claude Code
console.log('๐งช Testing NPX Configuration for Claude Code\n');
// Simulate the configuration
const testConfig = {
mcpServers: {
'like-i-said-memory-v2': {
command: 'npx',
args: ['-y', '-p', '@endlessblink/like-i-said-v2@latest', 'like-i-said-v2'],
env: {
MEMORY_DIR: path.join(process.cwd(), 'memories'),
TASK_DIR: path.join(process.cwd(), 'tasks'),
MCP_QUIET: 'true'
}
}
}
};
console.log('Configuration that Claude Code would use:');
console.log(JSON.stringify(testConfig, null, 2));
console.log('\nโ
Key validations:');
console.log('1. Command is "npx" (not a local path) โ');
console.log('2. Uses -y flag for automatic installation โ');
console.log('3. Uses -p flag to specify package โ');
console.log('4. Specifies @latest version โ');
console.log('5. No local file dependencies โ');
console.log('\n๐ When Claude Code runs this configuration:');
console.log('1. NPX downloads @endlessblink/like-i-said-v2 to cache');
console.log('2. NPX runs: node cli.js (from cache)');
console.log('3. cli.js detects non-TTY mode and starts MCP server');
console.log('4. MCP server communicates via JSON-RPC protocol');
console.log('\nโจ The complete command for users:');
console.log('claude mcp add like-i-said-memory-v2 -- npx -p @endlessblink/like-i-said-v2@latest like-i-said-v2');
// Verify the wrapper path fix
const wrapperPath = path.join(__dirname, '..', 'scripts', 'mcp-wrappers', 'mcp-quiet-wrapper.js');
if (fs.existsSync(wrapperPath)) {
const wrapperContent = fs.readFileSync(wrapperPath, 'utf8');
if (wrapperContent.includes("join(__dirname, '..', '..', 'server-markdown.js')")) {
console.log('\nโ
mcp-quiet-wrapper.js correctly points to server-markdown.js');
} else {
console.log('\nโ mcp-quiet-wrapper.js has incorrect path to server-markdown.js');
}
}
// Check CLI default behavior
const cliPath = path.join(__dirname, '..', 'cli.js');
const cliContent = fs.readFileSync(cliPath, 'utf8');
if (cliContent.includes('context.isNpxInstall || !process.stdout.isTTY')) {
console.log('โ
CLI correctly detects non-TTY mode for MCP execution');
} else {
console.log('โ CLI may not correctly detect MCP execution mode');
}
console.log('\n๐ฏ Summary: Configuration is correctly set up for Claude Code!');