Files
zeekay 7e0448f10e feat: implement unified MCP search with OpenAI spec compliance and CI
## Core Implementation
- Unified search engine with strategy pattern for extensible search types
- Full OpenAI MCP specification compliance for search and fetch tools
- Multi-modal search strategies: Symbol, AST, Vector, Text, and File search
- Automatic strategy selection based on query characteristics

## Security & Remote Access
- Secure ngrok tunnel integration with automatic detection
- Multi-method authentication (Bearer token, API keys, JWT)
- Post-quantum TLS configuration support
- Rate limiting and CORS protection
- Access logging and monitoring
- Only exposes files when ngrok credentials are present

## Testing & CI
- 102 tests with 85% coverage on critical paths
- GitHub Actions CI workflow for automated testing
- Node.js 18.x and 20.x compatibility testing
- Coverage reporting to Codecov
- Security audit checks

## Documentation
- Comprehensive documentation in LLM.md
- Security guide in docs/SECURITY.md
- .npmrc excluded from repository for security

This implementation provides a production-ready search system for AI tools like ChatGPT and Claude Desktop.
2025-09-14 18:11:10 -05:00

75 lines
2.3 KiB
TypeScript

#!/usr/bin/env ts-node
/**
* Quick Start Example - Basic MCP Test Suite Usage
*/
import { runMCPTestSuite, quickTest } from '../src/index.js';
async function main() {
console.log('šŸš€ MCP Test Suite Quick Start Examples\n');
try {
// Example 1: Quick test with TypeScript implementation
console.log('1. Running quick test (core tools only)...');
const quickResults = await quickTest({
implementation: 'typescript',
categories: ['files', 'shell'],
verbose: false
});
console.log(`āœ… Quick test completed: ${quickResults.passedTests}/${quickResults.totalTests} passed\n`);
// Example 2: Full test suite with custom configuration
console.log('2. Running custom test suite...');
const customResults = await runMCPTestSuite({
implementations: [
{
id: 'typescript-custom',
name: 'TypeScript Custom Test',
language: 'typescript',
command: 'node',
args: ['../dist/cli.js', 'serve'],
enabled: true,
expectedCategories: ['files', 'search', 'shell'],
expectedToolCount: 15
}
],
testTimeout: 15000,
parallel: {
maxConcurrentImplementations: 1,
maxConcurrentTestsPerImpl: 2
},
output: {
resultsDir: './example-results',
verbose: true,
generateHtmlReport: true,
generateJsonReport: true
}
});
console.log('šŸ“Š Custom test results:');
console.log(`Total tests: ${customResults.totalTests}`);
console.log(`Passed: ${customResults.passedTests}`);
console.log(`Failed: ${customResults.failedTests}`);
console.log(`Success rate: ${((customResults.passedTests / customResults.totalTests) * 100).toFixed(1)}%`);
// Example 3: Implementation comparison
if (customResults.implementations.length > 1) {
console.log('\nšŸ” Implementation Comparison:');
for (const impl of customResults.implementations) {
const stats = customResults.summary[impl];
const rate = ((stats.passed / stats.total) * 100).toFixed(1);
console.log(` ${impl}: ${stats.passed}/${stats.total} (${rate}%)`);
}
}
} catch (error) {
console.error('āŒ Test failed:', error);
process.exit(1);
}
}
if (import.meta.url === `file://${process.argv[1]}`) {
main();
}