@brave/brave-search-mcp-server
Version:
MCP server for Brave Search. Uses the Brave Search API to return results from the web, including ranked links, images, and videos, as well as AI summaries of pages, rich results, and more.
22 lines (21 loc) • 553 B
JavaScript
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);
}
// stdio requires explicit request
if (options.transport === 'stdio') {
await stdioServer.start();
return;
}
// default to http server
httpServer.start();
}
main().catch((error) => {
console.error(error);
process.exit(1);
});