UNPKG

local-api-mcp-typescript

Version:

A Model Context Protocol server that AdsPower browser LocalAPI. This server enables LLMs to interact with start browser, create browser, update browser fingerprint config ...

30 lines (29 loc) 811 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.wrapHandler = wrapHandler; function wrapHandler(handler) { return async (params) => { try { const content = await handler(params); if (typeof content === 'string') { return { content: [{ type: 'text', text: content }] }; } return { content }; } catch (error) { return { content: [{ type: 'text', text: error instanceof Error ? error.message : String(error) }] }; } }; }