Files
brave-search-mcp-server/src/index.ts
T
Sampson 0bca1a42b3 sets stdio as the default transport
This is a breaking change, requiring a new major release of the server.

Resolves https://github.com/brave/brave-search-mcp-server/issues/63
2025-09-09 09:46:50 -05:00

26 lines
521 B
JavaScript

#!/usr/bin/env node
import { getOptions } from './config.js';
import { stdioServer, httpServer } from './protocols/index.js';
async function main() {
const options = getOptions();
if (!options) {
console.error('Invalid configuration');
process.exit(1);
}
// default to stdio server unless http is explicitly requested
if (options.transport === 'http') {
httpServer.start();
return;
}
await stdioServer.start();
}
main().catch((error) => {
console.error(error);
process.exit(1);
});