UNPKG

@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.

38 lines (35 loc) 1.32 kB
import params from './params.js'; import API from '../../BraveAPI/index.js'; import { stringify } from '../../utils.js'; export const name = 'brave_video_search'; export const annotations = { title: 'Brave Video Search', openWorldHint: true, }; export const description = ` Searches for videos using Brave's Video Search API and returns structured video results with metadata. When to use: - When you need to find videos related to a specific topic, keyword, or query. - Useful for discovering video content, getting video metadata, or finding videos from specific creators/publishers. Returns a JSON list of video-related results with title, url, description, duration, and thumbnail_url. `; export const execute = async (params) => { const response = await API.issueRequest('videos', params); return { content: response.results.map(({ url, title, description, video, thumbnail }) => { const duration = video?.duration; const thumbnail_url = thumbnail?.src; return { type: 'text', text: stringify({ url, title, description, duration, thumbnail_url }), }; }), }; }; export default { name, description, annotations, inputSchema: params.shape, execute, };