{"_id":"@cmiretf/algorate-mcp","_rev":"6-dd90858974d5dcfcc4ad7ca09e791d0a","name":"@cmiretf/algorate-mcp","dist-tags":{"latest":"1.0.5"},"versions":{"1.0.0":{"name":"@cmiretf/algorate-mcp","version":"1.0.0","keywords":["mcp","benchmark","performance","algorithms"],"author":"","license":"ISC","_id":"@cmiretf/algorate-mcp@1.0.0","maintainers":[{"name":"cmiretf","email":"cmiretf@gmail.com"}],"dist":{"shasum":"18103d0f1518714901be2ef2aceb5e622c420b68","tarball":"https://registry.npmjs.org/@cmiretf/algorate-mcp/-/algorate-mcp-1.0.0.tgz","fileCount":58,"integrity":"sha512-UuXOr6RpG6QqhT2lER0UbNMsZdbT4ppC9Ti31tOlSlqAE7oKU+bECIvszG1BZtkehCVzRYAJp13eVxFzCSM2QA==","signatures":[{"sig":"MEYCIQDYiajHaWVQ7QVF97BsXeOfW0Nz02v+iko0xGnwf9T87AIhAKZQdN8cn9WS4coVS9zzDqCEyAxdRR0dHWD3izxEqFUm","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":314499},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","gitHead":"cf4fecc917c6c642a0dbf7b8f2d5b82bf59eb29e","scripts":{"dev":"tsc && node dist/index.js","test":"node --test src/tests/*.test.ts","build":"tsc","start":"node dist/index.js","prepare":"npm run build","inspector":"npm run build && npx @modelcontextprotocol/inspector node dist/index.js","example:simple":"npm run build && node examples/simple-test.js","example:sorting":"npm run build && node examples/sorting-benchmark.js"},"_npmUser":{"name":"cmiretf","email":"cmiretf@gmail.com"},"_npmVersion":"11.6.2","description":"MCP Server for comparing algorithm implementations through empirical benchmarking","directories":{},"_nodeVersion":"25.2.1","dependencies":{"zod":"^3.24.3","plotly.js":"^2.27.0","@modelcontextprotocol/sdk":"^1.11.1"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.8.2","@types/node":"^22.13.11","@types/plotly.js":"^2.12.29"},"_npmOperationalInternal":{"tmp":"tmp/algorate-mcp_1.0.0_1768159089260_0.7317576169673308","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@cmiretf/algorate-mcp","version":"1.0.1","keywords":["mcp","benchmark","performance","algorithms"],"author":"","license":"ISC","_id":"@cmiretf/algorate-mcp@1.0.1","maintainers":[{"name":"cmiretf","email":"cmiretf@gmail.com"}],"bin":{"algorate-mcp":"dist/index.js"},"dist":{"shasum":"4d202fcf4aaaf0cb63f6b015a704d8e8bed8afd6","tarball":"https://registry.npmjs.org/@cmiretf/algorate-mcp/-/algorate-mcp-1.0.1.tgz","fileCount":58,"integrity":"sha512-kfwJ2QPQPPkrmni+K3KpdsqDTsAjg5zc236oKuSOTD3osjGGP0pnGrY+ZrWfbcVGhU+T3NN667dTQ0Urrki3dQ==","signatures":[{"sig":"MEYCIQC6en/kvb5f2M6rg4DRwDE8D8ep094TD8NJjSGi1KVzMgIhAOUpnEwV17+dhLwfNG7LRl6WGubD7JqUf1iIh9p3JBrw","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":314553},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","gitHead":"cf4fecc917c6c642a0dbf7b8f2d5b82bf59eb29e","scripts":{"dev":"tsc && node dist/index.js","test":"node --test src/tests/*.test.ts","build":"tsc","start":"node dist/index.js","prepare":"npm run build","inspector":"npm run build && npx @modelcontextprotocol/inspector node dist/index.js","example:simple":"npm run build && node examples/simple-test.js","example:sorting":"npm run build && node examples/sorting-benchmark.js"},"_npmUser":{"name":"cmiretf","email":"cmiretf@gmail.com"},"_npmVersion":"11.6.2","description":"MCP Server for comparing algorithm implementations through empirical benchmarking","directories":{},"_nodeVersion":"25.2.1","dependencies":{"zod":"^3.24.3","plotly.js":"^2.27.0","@modelcontextprotocol/sdk":"^1.11.1"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.8.2","@types/node":"^22.13.11","@types/plotly.js":"^2.12.29"},"_npmOperationalInternal":{"tmp":"tmp/algorate-mcp_1.0.1_1768161666268_0.8842382308178129","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@cmiretf/algorate-mcp","version":"1.0.2","keywords":["mcp","benchmark","performance","algorithms"],"author":"","license":"ISC","_id":"@cmiretf/algorate-mcp@1.0.2","maintainers":[{"name":"cmiretf","email":"cmiretf@gmail.com"}],"bin":{"algorate-mcp":"dist/index.js"},"dist":{"shasum":"9b46500857207baad028a4a175076fff041cdbeb","tarball":"https://registry.npmjs.org/@cmiretf/algorate-mcp/-/algorate-mcp-1.0.2.tgz","fileCount":58,"integrity":"sha512-ItOCo8F/xm11zWCmFRc2E90v4E8lRuRNvv0R+iucU55y8tCxg7bDbdo0f2XMzSAB2wNfOYETipVLoifG5sTztg==","signatures":[{"sig":"MEQCIAd/KebsGujqDjNmDrcg1+dDx6IkWm73ksnhYV5Tcy5wAiBsYKCWC3FSneXPGkI46iOrJYDpx0NuuETRs/nCM+5bow==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":314614},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","gitHead":"cf4fecc917c6c642a0dbf7b8f2d5b82bf59eb29e","scripts":{"dev":"tsc && node dist/index.js","test":"node --test src/tests/*.test.ts","build":"tsc","start":"node dist/index.js","prepare":"npm run build","inspector":"npm run build && npx @modelcontextprotocol/inspector node dist/index.js","example:simple":"npm run build && node examples/simple-test.js","example:sorting":"npm run build && node examples/sorting-benchmark.js"},"_npmUser":{"name":"cmiretf","email":"cmiretf@gmail.com"},"_npmVersion":"11.6.2","description":"MCP Server for comparing algorithm implementations through empirical benchmarking","directories":{},"_nodeVersion":"25.2.1","dependencies":{"zod":"^3.24.3","plotly.js":"^2.27.0","@modelcontextprotocol/sdk":"^1.11.1"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.8.2","@types/node":"^22.13.11","@types/plotly.js":"^2.12.29"},"_npmOperationalInternal":{"tmp":"tmp/algorate-mcp_1.0.2_1768162060277_0.31601474311438715","host":"s3://npm-registry-packages-npm-production"}},"1.0.3":{"name":"@cmiretf/algorate-mcp","version":"1.0.3","keywords":["mcp","benchmark","performance","algorithms"],"author":"","license":"ISC","_id":"@cmiretf/algorate-mcp@1.0.3","maintainers":[{"name":"cmiretf","email":"cmiretf@gmail.com"}],"bin":{"algorate-mcp":"dist/index.js"},"dist":{"shasum":"e52b34ee6ba33153399a7977e3c5758ed2a38fcf","tarball":"https://registry.npmjs.org/@cmiretf/algorate-mcp/-/algorate-mcp-1.0.3.tgz","fileCount":67,"integrity":"sha512-KR0YnOrC6P1gPb87UKceHVXxbiVkgD8Z41Tt9kwcOPXYEGfYebSbHE8sIbBbkJpMgnhc1DQp7dW/IUwagePRMw==","signatures":[{"sig":"MEUCIQDPc1ph8E5Bqjl495v8mIZm8IkQ9sbG4xp5Oet/e9Y5qgIgRVqIvV33M1AMuif+n6fiVypOLytPY/PGcV8gmUzoSbg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":336129},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","gitHead":"d1b7fbb13bd9708fbc9dbc4fa8560a3d4e96d23a","scripts":{"dev":"tsc && node dist/index.js","test":"node --test src/tests/*.test.ts","build":"tsc","start":"node dist/index.js","prepare":"npm run build","inspector":"npm run build && npx @modelcontextprotocol/inspector node dist/index.js","example:simple":"npm run build && node examples/simple-test.js","example:sorting":"npm run build && node examples/sorting-benchmark.js"},"_npmUser":{"name":"cmiretf","email":"cmiretf@gmail.com"},"_npmVersion":"11.6.2","description":"MCP Server for comparing algorithm implementations through empirical benchmarking","directories":{},"_nodeVersion":"25.2.1","dependencies":{"zod":"^3.24.3","plotly.js":"^2.27.0","@modelcontextprotocol/sdk":"^1.11.1"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.8.2","@types/node":"^22.13.11","@types/plotly.js":"^2.12.29"},"_npmOperationalInternal":{"tmp":"tmp/algorate-mcp_1.0.3_1771176824033_0.4896815090472919","host":"s3://npm-registry-packages-npm-production"}},"1.0.4":{"name":"@cmiretf/algorate-mcp","version":"1.0.4","keywords":["mcp","benchmark","performance","algorithms"],"author":"","license":"ISC","_id":"@cmiretf/algorate-mcp@1.0.4","maintainers":[{"name":"cmiretf","email":"cmiretf@gmail.com"}],"bin":{"algorate-mcp":"dist/index.js"},"dist":{"shasum":"9570938e845422351bf58c93ff4b31eeb149bac5","tarball":"https://registry.npmjs.org/@cmiretf/algorate-mcp/-/algorate-mcp-1.0.4.tgz","fileCount":75,"integrity":"sha512-BMDzBNIALwnkTU9fWbta1y68diI+2cqQgYXb9pRZH0ZPkI0oA9msqOPcFJXwKTFSZ/whsRLM+Mos+77ls+Zc1g==","signatures":[{"sig":"MEYCIQDeqF89aldqdfOOwW0a8v8+uwmGpYrMaUv4p0NuwD+DcgIhAJYNEN2UT/CrlFsnuQ7lhZIVbAb7tQ2J3OixbT9TdZj0","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":447075},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","gitHead":"07d413469688c2bb190f408df80908b2ebe8b68f","scripts":{"dev":"tsc && node dist/index.js","test":"node --test src/tests/*.test.ts","build":"tsc","start":"node dist/index.js","prepare":"npm run build","inspector":"npm run build && npx @modelcontextprotocol/inspector node dist/index.js","example:simple":"npm run build && node examples/simple-test.js","example:sorting":"npm run build && node examples/sorting-benchmark.js"},"_npmUser":{"name":"cmiretf","email":"cmiretf@gmail.com"},"_npmVersion":"11.6.2","description":"MCP Server for comparing algorithm implementations through empirical benchmarking","directories":{},"_nodeVersion":"25.2.1","dependencies":{"zod":"^3.24.3","plotly.js":"^2.27.0","@modelcontextprotocol/sdk":"^1.11.1"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.8.2","@types/node":"^22.13.11","@types/plotly.js":"^2.12.29"},"_npmOperationalInternal":{"tmp":"tmp/algorate-mcp_1.0.4_1771179397880_0.08529516316685481","host":"s3://npm-registry-packages-npm-production"}},"1.0.5":{"name":"@cmiretf/algorate-mcp","version":"1.0.5","description":"MCP Server for comparing algorithm implementations through empirical benchmarking","main":"dist/index.js","type":"module","bin":{"algorate-mcp":"dist/index.js"},"scripts":{"build":"tsc","start":"node dist/index.js","dev":"tsc && node dist/index.js","test":"node --test src/tests/*.test.ts","prepare":"npm run build","example:simple":"npm run build && node examples/simple-test.js","example:sorting":"npm run build && node examples/sorting-benchmark.js","inspector":"npm run build && npx @modelcontextprotocol/inspector node dist/index.js"},"keywords":["mcp","benchmark","performance","algorithms"],"author":"","license":"ISC","dependencies":{"@modelcontextprotocol/sdk":"^1.11.1","zod":"^3.24.3","plotly.js":"^2.27.0"},"devDependencies":{"@types/node":"^22.13.11","@types/plotly.js":"^2.12.29","typescript":"^5.8.2"},"gitHead":"6528a00f78cfe7830a3caa51b86ea9151dc5c49a","types":"./dist/index.d.ts","_id":"@cmiretf/algorate-mcp@1.0.5","_nodeVersion":"25.2.1","_npmVersion":"11.6.2","dist":{"integrity":"sha512-L6MsLygnnK1UEMvRBS3qz2rFhKjpuNTiAkxIIjUxwYny2yEiLJvH5rtSatO0goen1bEABccaS/X7EHxMB+tkvQ==","shasum":"f6441b6e36d49c7df7f5cf83ad17ff6e90d674ea","tarball":"https://registry.npmjs.org/@cmiretf/algorate-mcp/-/algorate-mcp-1.0.5.tgz","fileCount":83,"unpackedSize":597832,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCnwwq8TuOMHYDXr8N2oL9tJR+pWCneXaP3591CBZyKAAIgMgfIefxqyQQZWxiDHJIJJe672Hm+xYgb7DCW0MmD+8s="}]},"_npmUser":{"name":"cmiretf","email":"cmiretf@gmail.com"},"directories":{},"maintainers":[{"name":"cmiretf","email":"cmiretf@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/algorate-mcp_1.0.5_1771183622105_0.378365838557581"},"_hasShrinkwrap":false}},"time":{"created":"2026-01-11T19:18:09.192Z","modified":"2026-02-15T19:27:02.479Z","1.0.0":"2026-01-11T19:18:09.425Z","1.0.1":"2026-01-11T20:01:06.416Z","1.0.2":"2026-01-11T20:07:40.428Z","1.0.3":"2026-02-15T17:33:44.214Z","1.0.4":"2026-02-15T18:16:38.028Z","1.0.5":"2026-02-15T19:27:02.356Z"},"license":"ISC","keywords":["mcp","benchmark","performance","algorithms"],"description":"MCP Server for comparing algorithm implementations through empirical benchmarking","maintainers":[{"name":"cmiretf","email":"cmiretf@gmail.com"}],"readme":"# Algorate MCP Server 📊\n\nA Model Context Protocol (MCP) server for comprehensive algorithm benchmarking, performance analysis, and optimization. Compare multiple implementations, detect performance bottlenecks, and get AI-driven optimization insights across JavaScript, TypeScript, and Python code.\n\n## 🚀 Quick Start\n\n### Installation\n\nInstall globally via npm:\n\n```bash\nnpm install -g @cmiretf/algorate-mcp\n```\n\nOr add to your project:\n\n```bash\nnpm install @cmiretf/algorate-mcp\n```\n\n### Usage\n\n#### With MCP Inspector\n\nTest the server interactively:\n\n```bash\nnpm install -g @cmiretf/algorate-mcp\nnpx @modelcontextprotocol/inspector algorate\n```\n\nOr if installed locally:\n\n```bash\nnpx @modelcontextprotocol/inspector node node_modules/algorate/dist/index.js\n```\n\n#### With Claude Desktop\n\nAdd to your `claude_desktop_config.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"algorate\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@cmiretf/algorate-mcp\"]\n    }\n  }\n}\n```\n\nOr with a local installation:\n\n```json\n{\n  \"mcpServers\": {\n    \"algorate\": {\n      \"command\": \"node\",\n      \"args\": [\"/path/to/node_modules/algorate/dist/index.js\"]\n    }\n  }\n}\n```\n\n#### With Visual Studio Code / Cursor\n\nAdd to your `mcp.json`:\n\n```json\n{\n  \"servers\": {\n    \"algorate\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@cmiretf/algorate-mcp\"]\n    }\n  }\n}\n```\n\nOr with a local installation:\n\n```json\n{\n  \"mcpServers\": {\n    \"algorate\": {\n      \"command\": \"node\",\n      \"args\": [\"/path/to/node_modules/algorate/dist/index.js\"]\n    }\n  }\n}\n```\n\n## 🎯 Features\n\n### Algorithm Registration & Management\n\n- **Register Algorithms**: Define custom algorithms with unique identifiers\n- **Multiple Implementations**: Compare 2+ implementations of the same algorithm\n- **Language Support**: JavaScript, TypeScript, and Python\n- **Automatic Detection**: AI-powered algorithm detection from code\n\n### Performance Benchmarking\n\n- **Execution Metrics**: Precise timing with warmup and measurement runs\n- **Memory Profiling**: Track peak memory usage and memory trends\n- **Statistical Analysis**: Mean, median, std deviation, P95, P99 percentiles\n- **Consistency Tracking**: Identify variability and outliers\n\n### Advanced Features\n\n- **Workload Generation**: Automatic test data generation for different input sizes\n- **Output Validation**: Ensure correctness across all implementations\n- **Isolated Execution**: Worker-based isolation for accurate measurements\n- **Result Storage**: Persistent storage of benchmarks with versioning\n- **Performance Insights**: Automatic detection of performance patterns\n\n### AI-Powered Analysis\n\n- **Code Optimization**: Receive specific optimization recommendations\n- **Performance Comparison**: Automated ranking and insights\n- **Bottleneck Detection**: Identify slow operations and memory issues\n- **Query Engine**: Natural language queries on benchmark results\n\n## 📖 Available MCP Tools\n\n### Core Benchmarking Tools\n\n#### `register_algorithm`\n\nRegister a new algorithm for benchmarking.\n\n**Parameters:**\n\n- `name` (string): Algorithm name (e.g., \"Sorting\", \"Searching\")\n- `description` (string, optional): Detailed description\n\n**Example:**\n\n```json\n{\n  \"name\": \"QuickSort\",\n  \"description\": \"Fast sorting algorithm using divide and conquer\"\n}\n```\n\n#### `register_implementation`\n\nAdd an implementation of an algorithm.\n\n**Parameters:**\n\n- `algorithmId` (string): ID of the algorithm\n- `name` (string): Implementation name\n- `language` (string): \"javascript\", \"typescript\", or \"python\"\n- `code` (string): Function code\n- `functionName` (string): Name of the exported function\n\n#### `register_test_case`\n\nCreate a test case for benchmarking.\n\n**Parameters:**\n\n- `name` (string): Test case name\n- `inputSize` (number): Size of input\n- `inputType` (string): \"array\", \"number\", \"string\", \"object\"\n- `inputData` (any): The actual input\n- `expectedOutput` (any): Expected result for validation\n\n#### `run_benchmark`\n\nExecute a complete benchmark comparing implementations.\n\n**Parameters:**\n\n- `algorithmId` (string): Algorithm to benchmark\n- `testCaseId` (string): Test case to use\n- `warmupRuns` (number, optional): Warmup executions (default: 3)\n- `measurementRuns` (number, optional): Measurement runs (default: 10)\n- `timeoutMs` (number, optional): Timeout per execution in ms (default: 30000)\n- `validateOutput` (boolean, optional): Enable validation (default: true)\n\n**Example:**\n\n```json\n{\n  \"algorithmId\": \"algo-123\",\n  \"testCaseId\": \"test-456\",\n  \"warmupRuns\": 3,\n  \"measurementRuns\": 10,\n  \"validateOutput\": true\n}\n```\n\n#### `list_algorithms`\n\nList all registered algorithms.\n\n**Parameters:**\n\nNone\n\n#### `list_implementations`\n\nList implementations, optionally filtered by algorithm.\n\n**Parameters:**\n\n- `algorithmId` (string, optional): Filter by algorithm ID\n\n#### `list_test_cases`\n\nList all registered test cases.\n\n**Parameters:**\n\nNone\n\n#### `get_results`\n\nGet benchmark results for a specific implementation and test case.\n\n**Parameters:**\n\n- `implementationId` (string): Implementation ID\n- `testCaseId` (string): Test case ID\n\n### Analysis & Insights Tools\n\n#### `get_algorithm_insights`\n\nGet AI-powered insights about algorithm performance.\n\n**Parameters:**\n\n- `algorithmId` (string): Algorithm to analyze\n\n#### `optimize_code`\n\nReceive specific optimization recommendations.\n\n**Parameters:**\n\n- `code` (string): Code to optimize\n- `language` (string): \"javascript\", \"typescript\", or \"python\"\n- `benchmarkResults` (object, optional): Previous benchmark results\n\n#### `query_results`\n\nQuery benchmark results with natural language.\n\n**Parameters:**\n\n- `query` (string): Natural language question about results\n- `algorithmId` (string, optional): Specific algorithm to query\n\n#### `generate_summary`\n\nGenerate a comprehensive benchmark summary report.\n\n**Parameters:**\n\n- `algorithmId` (string): Algorithm to summarize\n- `includeCharts` (boolean): Include visualization data\n\n### Workload & Detection Tools\n\n#### `generate_workload`\n\nGenerate test data for different input sizes.\n\n**Parameters:**\n\n- `type` (string): \"random\", \"sorted\", \"reverse\", \"nearly_sorted\"\n- `size` (number): Input size\n- `complexity` (string): \"low\", \"medium\", \"high\"\n\n#### `detect_algorithm`\n\nAI-powered algorithm detection from code.\n\n**Parameters:**\n\n- `code` (string): Code to analyze\n- `language` (string): \"javascript\", \"typescript\", or \"python\"\n\n#### `auto_detect_algorithms`\n\nAutomatically detect algorithms in project files.\n\n**Parameters:**\n\n- `directories` (array of strings, optional): Directories to scan (default: src, examples)\n\n#### `auto_benchmark`\n\nAutomatically run benchmarks for detected or registered algorithms.\n\n**Parameters:**\n\n- `algorithmIds` (array of strings, optional): Algorithm IDs to benchmark (empty = all)\n- `forceRefresh` (boolean, optional): Force refresh even if cached results exist\n\n### Visualization & Query Tools\n\n#### `generate_chart`\n\nGenerate performance chart for benchmark results.\n\n**Parameters:**\n\n- `algorithmId` (string): Algorithm ID\n- `testCaseId` (string, optional): Test case ID\n\n#### `query_performance`\n\nQuery performance analysis with automatic benchmark and summary.\n\n**Parameters:**\n\n- `query` (string): Query about algorithm performance (e.g., \"sorting algorithms\", \"all algorithms\")\n- `forceRefresh` (boolean, optional): Force refresh even if cached results exist\n- `directories` (array of strings, optional): Directories to scan for algorithms\n\n#### `benchmark_all`\n\nAutomatically detect all algorithms, run benchmarks, and return formatted results (ONE-CLICK BENCHMARK).\n\n**Parameters:**\n\n- `directories` (array of strings, optional): Directories to scan (default: src, examples)\n- `filePath` (string, optional): Specific file path to analyze (if provided, only analyzes this file)\n- `forceRefresh` (boolean, optional): Force refresh even if cached results exist\n\n## 📊 Metrics Explained\n\n### Key Metrics\n\n- **Execution Time (ms)**: Average time to run the algorithm\n- **Memory Peak (MB)**: Maximum memory used during execution\n- **Success Rate (%)**: Percentage of successful executions\n- **Std Deviation (ms)**: Consistency of results (lower = better)\n- **P95/P99**: Latency in worst-case scenarios\n\n### Interpreting Results\n\n- **Lower Score** = Better overall performance\n- **Mean < Median** = Some slower outliers detected\n- **High StdDev** = Inconsistent results (increase warmup runs)\n- **High Success Rate** = Stable implementation\n\n## 🛠️ Development\n\n### Prerequisites\n\n- Node.js 18+\n- npm or yarn\n\n### Setup\n\n```bash\n\n# Clone the repository\n\ngit clone <your-repo-url>\ncd algorate\n\n# Install dependencies\n\nnpm install\n\n# Build the project\n\nnpm run build\n```\n\n### Development Commands\n\n```bash\n\n# Development with auto-reload\n\nnpm run dev\n\n# Build TypeScript\n\nnpm run build\n\n# Run built version\n\nnpm start\n\n# Test with MCP Inspector (built version)\n\nnpm run inspect\n\n# Test with MCP Inspector (dev version)\n\nnpm run inspect:dev\n\n# Run examples\n\nnpm run example:simple\nnpm run example:sorting\n\n# Run tests\n\nnpm test\n```\n\n## 🧪 Testing\n\nTest the server interactively with the MCP Inspector:\n\n```bash\nnpm run inspect\n```\n\nOr run the examples:\n\n```bash\n\n# Quick validation\n\nnpm run example:simple\n\n# Complete benchmark with multiple implementations\n\nnpm run example:sorting\n```\n\nSee TESTING_GUIDE.md for comprehensive testing instructions.\n\n## 🔗 Integration Examples\n\n### Git Hooks\n\nAdd to `.git/hooks/pre-commit`:\n\n```bash\n#!/bin/bash\n\n# Run quick benchmark validation\n\nnpm run example:simple\n```\n\n### CI/CD\n\n```yaml\n\n# GitHub Actions example\n\n- name: Run Algorithm Benchmarks\n  run: |\n  npm install\n  npm run build\n  npm test\n  npm run example:sorting\n```\n\n## 📚 Documentation\n\n- Testing Guide - Comprehensive testing and validation guide\n- Inspector Guide - MCP Inspector usage and tips\n- API Reference - Detailed tool documentation\n- Examples - Code examples and usage patterns\n\n## 💡 Use Cases\n\n- **Algorithm Comparison**: Compare 2+ implementations objectively\n- **Performance Regression**: Detect performance degradation in CI/CD\n- **Code Optimization**: Get specific recommendations for improvement\n- **Learning**: Understand algorithm performance characteristics\n- **Benchmark Storage**: Track performance over time and versions\n- **Team Standards**: Enforce performance baselines across teams\n\n## 🌟 Supported Languages\n\n- JavaScript (ES6+)\n- TypeScript\n- Python (3.7+)\n\n## 🎨 Example Workflow\n\n```typescript\nimport { Orchestrator } from \"@cmiretf/algorate\";\n\nconst orchestrator = new Orchestrator();\n\n// 1. Register algorithm\nconst algo = orchestrator.registerAlgorithm(\"BubbleSort\");\n\n// 2. Register implementations\nconst impl1 = orchestrator.registerImplementation(\n  algo.id,\n  \"Basic Implementation\",\n  \"javascript\",\n  \"function bubbleSort(arr) { /_ code _/ }\",\n  \"bubbleSort\"\n);\n\nconst impl2 = orchestrator.registerImplementation(\n  algo.id,\n  \"Optimized Implementation\",\n  \"javascript\",\n  \"function bubbleSortOptimized(arr) { /_ code _/ }\",\n  \"bubbleSortOptimized\"\n);\n\n// 3. Create test cases\nconst test = orchestrator.registerTestCase(\n  \"Random array 1000 elements\",\n  1000,\n  \"array\",\n  Array.from({ length: 1000 }, () => Math.random()),\n  \"sorted array\"\n);\n\n// 4. Run benchmark\nconst result = await orchestrator.runBenchmark(algo.id, test.id, {\n  warmupRuns: 3,\n  measurementRuns: 10,\n  validateOutput: true,\n});\n\n// 5. Get insights\nconst insights = await orchestrator.getAlgorithmInsights(algo.id);\nconsole.log(insights); // Performance analysis and recommendations\n```\n\n## 🔍 Severity Levels\n\n- **error**: Critical execution failures or validation errors\n- **warning**: Performance anomalies or high variability\n- **info**: Optimization suggestions and observations\n\n## 📈 Performance Benchmarking Best Practices\n\n1. **Warmup Runs**: Use 2-3 warmup runs to stabilize the JIT\n2. **Measurement Runs**: 5-10 runs for reliable statistics\n3. **Consistent Environment**: Close unnecessary applications\n4. **Large Inputs**: Test with representative data sizes\n5. **Validation**: Always validate correctness before measuring\n\nSee TESTING_GUIDE.md for detailed best practices.\n\n## 🤝 Contributing\n\nContributions are welcome! Please:\n\n1. Fork the repository\n2. Create a feature branch (`git checkout -b feature/amazing-feature`)\n3. Commit your changes (`git commit -m 'Add amazing feature'`)\n4. Push to the branch (`git push origin feature/amazing-feature`)\n5. Open a Pull Request\n\n## 📝 License\n\nThis project is licensed under the **MIT License** - an open source license that allows you to use, modify, and distribute this software freely.\n\n### What this means:\n\n- ✅ **Free to use**: You can use this software in any project, commercial or personal\n- ✅ **Open source**: The source code is publicly available and can be inspected, modified, and improved\n- ✅ **Modify freely**: You can adapt the code to fit your specific needs\n- ✅ **Distribute**: You can share the original or modified versions\n- ✅ **Private use**: You can use it in proprietary projects without disclosing your source code\n\n### License Text\n\nCopyright (c) 2026 Carlos Miret Fiuza\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\n## 🌐 Supported Platforms\n\n- Node.js 18+\n- Deno (with appropriate configuration)\n- Browser environments (with bundling)\n\n## 🔐 Security\n\n- **Isolated Execution**: Uses Worker threads to sandbox code execution\n- **Timeout Protection**: Prevents infinite loops and hanging processes\n- **Memory Limits**: Monitors and controls memory consumption\n- **Input Validation**: Validates all inputs before execution\n\n## 📞 Support\n\nFor issues, questions, or suggestions:\n\n- Open an issue on GitHub\n- Check TESTING_GUIDE.md for troubleshooting\n- Review INSPECTOR_GUIDE.md for MCP usage\n\n---\n\n## 👤 Author\n\nThis project is developed and maintained by [Carlos Miret Fiuza](https://www.linkedin.com/in/carlos-miret-fiuza-87026a52/).  \nFeel free to connect on LinkedIn for collaborations, suggestions, or any questions related to **Algorate MCP Server**!\n","readmeFilename":"README.md"}