improved structure and implementation

This commit is contained in:
Sampson committed 2025-06-25 16:09:59 -05:00
1 parent bde68396e8
commit 5f29ef8a47
12 files changed
+300 -154

No files matched your search

+29
View File
@@ -0,0 +1,29 @@
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
import tools from "./tools/index.js";
export const server = new McpServer(
{
version: "0.1.0",
name: "brave-search-mcp-server",
title: "Brave Search MCP Server",
},
{
capabilities: {
logging: {},
tools: { listChanged: false },
},
instructions:
"Use this server to search the Web for various types of data " +
"via the Brave Search API.",
}
);
for (const tool of Object.values(tools)) {
server.tool(
tool.name,
tool.description,
tool.inputSchema,
tool.annotations,
tool.execute
);
}