@mseep/hyperbrowser-mcp
Version:
Hyperbrowser Model Context Protocol Server
37 lines (36 loc) • 3.21 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const oai_cua_1 = require("../tools/oai-cua");
const browser_use_1 = require("../tools/browser-use");
const crawl_webpages_1 = require("../tools/crawl-webpages");
const extract_structured_1 = require("../tools/extract-structured");
const scrape_webpage_1 = require("../tools/scrape-webpage");
const tool_types_1 = require("../tools/tool-types");
const types_js_1 = require("@modelcontextprotocol/sdk/types.js");
const get_resources_1 = require("../resources/static/get_resources");
const claude_computer_use_1 = require("../tools/claude-computer-use");
const bing_search_1 = require("../tools/bing-search");
// Import new profile tools
const create_profile_1 = require("../tools/create-profile");
const delete_profile_1 = require("../tools/delete-profile");
const list_profiles_1 = require("../tools/list-profiles");
// Import new profile tool schemas (create schema is empty object)
const tool_types_2 = require("../tools/tool-types");
function setupServer(server) {
// Existing tools
server.tool(scrape_webpage_1.scrapeWebpageToolName, scrape_webpage_1.scrapeWebpageToolDescription, tool_types_1.scrapeWebpageToolParamSchemaRaw, scrape_webpage_1.scrapeWebpageTool);
server.tool(crawl_webpages_1.crawlWebpagesToolName, crawl_webpages_1.crawlWebpagesToolDescription, tool_types_1.crawlWebpagesToolParamSchemaRaw, crawl_webpages_1.crawlWebpagesTool);
server.tool(extract_structured_1.extractStructuredDataToolName, extract_structured_1.extractStructuredDataToolDescription, tool_types_1.extractStructuredDataToolParamSchemaRaw, extract_structured_1.extractStructuredDataTool);
server.tool(browser_use_1.browserUseToolName, browser_use_1.browserUseToolDescription, tool_types_1.browserUseToolParamSchemaRaw, browser_use_1.browserUseTool);
server.tool(oai_cua_1.oaiCuaToolName, oai_cua_1.oaiCuaToolDescription, tool_types_1.oaiCuaToolParamSchemaRaw, oai_cua_1.oaiCuaTool);
server.tool(claude_computer_use_1.claudeComputerUseToolName, claude_computer_use_1.claudeComputerUseToolDescription, tool_types_1.claudeComputerUseToolParamSchemaRaw, claude_computer_use_1.claudeComputerUseTool);
server.tool(bing_search_1.bingSearchToolName, bing_search_1.bingSearchToolDescription, tool_types_1.bingSearchToolParamSchemaRaw, bing_search_1.bingSearchTool);
// Register new profile tools
server.tool(create_profile_1.createProfileToolName, create_profile_1.createProfileToolDescription, {}, // createProfileToolParamSchemaRaw is just an empty object
create_profile_1.createProfileTool);
server.tool(delete_profile_1.deleteProfileToolName, delete_profile_1.deleteProfileToolDescription, tool_types_2.deleteProfileToolParamSchemaRaw, delete_profile_1.deleteProfileTool);
server.tool(list_profiles_1.listProfilesToolName, list_profiles_1.listProfilesToolDescription, tool_types_2.listProfilesToolParamSchemaRaw, list_profiles_1.listProfilesTool);
server.server.setRequestHandler(types_js_1.ListResourcesRequestSchema, get_resources_1.listAllResources);
server.server.setRequestHandler(types_js_1.ReadResourceRequestSchema, get_resources_1.getResource);
}
exports.default = setupServer;