Skip to main content
Glama
mikechao

Brave Search MCP

by mikechao

Brave Search MCP サーバー

Brave Search APIを統合したMCPサーバーの実装で、Web検索、ローカルポイントオブインタレスト検索、ビデオ検索、画像検索、ニュース検索機能を提供します。

特徴

  • ウェブ検索: ウェブ上で通常の検索を実行します

  • 画像検索: ウェブ上の画像を検索します。画像検索結果はリソースとして表示されます。

  • ニュース検索: ウェブでニュースを検索

  • ビデオ検索: ウェブ上のビデオを検索します

  • ローカルポイントオブインタレスト検索: ローカルの物理的な場所、企業、レストラン、サービスなどを検索します

Related MCP server: Brave Search With Proxy

ツール

  • 勇敢なウェブ検索

    • BraveのAPIを使用してウェブ検索を実行する

    • 入力:

      • query (文字列): インターネットで検索する用語

      • count (数値、オプション): 返される結果の数 (最大 20、デフォルト 10)

  • 勇敢な画像検索

    • クエリに関連する画像をウェブから取得する

    • 入力:

      • query (文字列):インターネットで画像を検索するための用語

      • count (数値、オプション): 返される画像の数 (最大 3、デフォルト 1)

  • ブレイブニュースサーチ

    • ウェブでニュースを検索する

    • 入力:

      • query (文字列):ニュース記事、トレンドトピック、最近のイベントなどをインターネットで検索するための用語

      • count (数値、オプション): 返される結果の数 (最大 20、デフォルト 10)

  • 勇敢なローカル検索

    • 地元のビジネス、サービス、興味のある場所を検索

    • 位置情報の結果を得るにはPro APIプランへの加入が必要です

    • 位置情報の結果が見つからない場合は brave_web_search にフォールバックします

    • 入力:

      • query (文字列):ローカル検索用語

      • count (数値、オプション): 返される結果の数 (最大 20、デフォルト 5)

  • 勇敢なビデオ検索

    • ウェブで動画を検索する

    • 入力:

      • query : (文字列): 動画を検索する用語

      • count : (数値、オプション): 返される動画の数 (最大 20、デフォルト 10)

構成

APIキーの取得

  1. Brave Search APIアカウントにサインアップする

  2. プランを選択してください(無料プランは月間2,000クエリまでご利用いただけます)

  3. 開発者ダッシュボードからAPIキーを生成する

Claude Desktopでの使用

ドッカー

  1. リポジトリをクローンする

  2. Dockerビルド

docker build -t brave-search-mcp:latest -f ./Dockerfile .
  1. これをclaude_desktop_config.jsonに追加します:

{
  "mcp-servers": {
    "brave-search": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "BRAVE_API_KEY",
        "brave-search-mcp"
      ],
      "env": {
        "BRAVE_API_KEY": "YOUR API KEY HERE"
      }
    }
  }
}

NPX

これをclaude_desktop_config.jsonに追加します:

{
  "mcp-servers": {
    "brave-search": {
      "command": "npx",
      "args": [
        "-y",
        "brave-search-mcp"
      ],
      "env": {
        "BRAVE_API_KEY": "YOUR API KEY HERE"
      }
    }
  }
}

LibreChatでの使用

これをlibrechat.yamlに追加します

brave-search:
  command: sh
  args:
    - -c
    - BRAVE_API_KEY=API KEY npx -y brave-search-mcp

貢献

貢献を歓迎します!お気軽にプルリクエストを送信してください。

デバッグ

  1. リポジトリをクローンする

  2. 依存関係をインストールしてビルドする

npm install
  1. アプリを構築する

npm run build

VS Codeの実行とデバッグ機能を使用する

⚠ Windows 10/11では動作しないようですが、WSL2では動作します

コード内の完全に機能するブレークポイントを備えた VS Code実行およびデバッグ ランチャーを使用します。

  1. 実行デバッグを見つけて選択します。

  2. ドロップダウンから「 MCP Server Launcher 」というラベルの付いた構成を選択します。

  3. 実行/デバッグボタンを選択します。MCP InspectorとVS Codeを使用して、さまざまなツールをデバッグできます。

VS Code デバッグ設定

ブレークポイントを使用してローカル デバッグを設定するには:

  1. Brave APIキーをVSコードに保存する

    • コマンドパレットを開きます (Cmd/Ctrl + Shift + P)。

    • Preferences: Open User Settings (JSON)と入力します。

    • 次のスニペットを追加します。

    {
      "brave.search.api.key": "your-api-key-here"
    }
  2. .vscode/launch.jsonを作成または更新します。

{
  "version": "0.2.0",
  "configurations": [
    {
      "type": "node",
      "request": "launch",
      "name": "MCP Server Launcher",
      "skipFiles": ["<node_internals>/**"],
      "program": "${workspaceFolder}/node_modules/@modelcontextprotocol/inspector/cli/build/cli.js",
      "outFiles": ["${workspaceFolder}/dist/**/*.js"],
      "env": {
        "BRAVE_API_KEY": "${config:brave.search.api.key}",
        "DEBUG": "true"
      },
      "args": ["dist/index.js"],
      "sourceMaps": true,
      "console": "integratedTerminal",
      "internalConsoleOptions": "neverOpen",
      "preLaunchTask": "npm: build:watch"
    },
    {
      "type": "node",
      "request": "attach",
      "name": "Attach to Debug Hook Process",
      "port": 9332,
      "skipFiles": ["<node_internals>/**"],
      "sourceMaps": true,
      "outFiles": ["${workspaceFolder}/dist/**/*.js"]
    },
    {
      "type": "node",
      "request": "attach",
      "name": "Attach to REPL Process",
      "port": 9333,
      "skipFiles": ["<node_internals>/**"],
      "sourceMaps": true,
      "outFiles": ["${workspaceFolder}/dist/**/*.js"]
    }
  ],
  "compounds": [
    {
      "name": "Attach to MCP Server",
      "configurations": ["Attach to Debug Hook Process", "Attach to REPL Process"]
    }
  ]
}
  1. .vscode/tasks.jsonを作成します:

{
  "version": "2.0.0",
  "tasks": [
    {
      "type": "npm",
      "script": "build:watch",
      "group": {
        "kind": "build",
        "isDefault": true
      },
      "problemMatcher": ["$tsc"]
    }
  ]
}

免責事項

このライブラリはBrave Softwareと公式には提携していません。MCPサーバーを利用したBrave Search APIのサードパーティ実装です。

ライセンス

このプロジェクトは、GNU General Public License v3.0 に基づいてライセンスされています。詳細については、 LICENSEファイルを参照してください。

Available Tools

5 tools

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 5 tool updatesv1.0.0
    • First observedbrave_image_search
    • First observedbrave_local_search
    • First observedbrave_news_search
    • First observedbrave_video_search
    • First observedbrave_web_search

TDQS

A4/5.0

Scored across 5 tools

Disambiguation5/5

Each tool has a clearly distinct purpose targeting different content types: images, local businesses, news articles, videos, and general web content. The descriptions explicitly differentiate use cases (e.g., 'near me' for local search, 'recent events' for news), eliminating any ambiguity between tools.

Naming Consistency5/5

All tool names follow a consistent 'brave_[content_type]_search' pattern, using snake_case uniformly. This predictable naming scheme makes it easy to identify the tool's function and ensures no confusion from mixed conventions.

Tool Count5/5

With 5 tools, this server is well-scoped for its purpose of providing specialized search capabilities across different content types. Each tool earns its place by covering distinct search domains, avoiding both redundancy and excessive fragmentation.

Completeness5/5

The tool set comprehensively covers the search domain by addressing all major content types: images, local information, news, videos, and general web content. There are no obvious gaps, as agents can handle any search query by selecting the appropriate specialized or general tool.

Maintenance

ActivityInactive
ResponsivenessUnresponsive

Related MCP Connectors

Related MCP Servers