Files
higress/plugins/wasm-go/mcp-servers/mcp-bravesearch/mcp-server.yaml
2025-04-22 17:01:41 +08:00

122 lines
3.5 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
server:
name: brave-search-server
config:
apiKey: ""
tools:
- name: brave_web_search
description: "使用Brave Search API进行网页搜索适用于一般查询、新闻、文章和在线内容。支持分页、内容过滤和新鲜度控制。"
args:
- name: q
description: "搜索查询最多400字符50个词"
type: string
required: true
- name: count
description: "结果数量1-20默认10"
type: integer
required: false
default: 10
- name: offset
description: "分页偏移量最大9默认0"
type: integer
required: false
default: 0
- name: search_lang
description: "搜索语言"
type: string
required: false
enum: ["en", "zh-hans"]
requestTemplate:
url: "https://api.search.brave.com/res/v1/web/search"
method: GET
argsToUrlParam: true
headers:
- key: Accept
value: "application/json"
- key: X-Subscription-Token
value: "{{.config.apiKey}}"
responseTemplate:
body: |
{{- range $index, $item := .web.results }}
## 结果 {{add $index 1}}
- **标题**: {{ $item.title }}
- **描述**: {{ $item.description }}
- **URL**: {{ $item.url }}
{{- end }}
{{- if .locations.results }}
{{- range $index, $item := .locations.results }}
## 结果 {{add $index 1}}
- **locationID**: {{ $item.id }}
{{- end }}
{{- end }}
- name: brave_local_search_pois
description: "使用Brave Local Search API搜索本地POI兴趣点信息包括名称、地址、电话、评分等信息。"
args:
- name: ids
description: "Location ID列表通过brave_web_search获取"
type: array
required: true
- name: search_lang
description: "搜索语言"
type: string
required: false
default: "en"
- name: search_lang
description: "响应语言"
type: string
required: false
default: "en-US"
requestTemplate:
url: "https://api.search.brave.com/res/v1/local/pois"
method: GET
argsToUrlParam: true
headers:
- key: Accept
value: "application/json"
- key: X-Subscription-Token
value: "{{.config.apiKey}}"
responseTemplate:
body: |
{{- range $index, $item := .results }}
## POI {{add $index 1}}
- **名称**: {{ $item.name }}
- **地址**: {{ $item.address.streetAddress }}, {{ $item.address.addressLocality }}, {{ $item.address.addressRegion }} {{ $item.address.postalCode }}
- **电话**: {{ $item.phone }}
- **评分**: {{ $item.rating.ratingValue }} ({{ $item.rating.ratingCount }} 条评价)
- **价格范围**: {{ $item.priceRange }}
- **营业时间**: {{ join $item.openingHours ", " }}
{{- end }}
- name: brave_local_search_descriptions
description: "使用Brave Local Search API获取本地POI的描述信息。"
args:
- name: ids
description: "Location ID列表通过brave_web_search获取"
type: array
required: true
- name: search_lang
description: "搜索语言"
type: string
required: false
default: "en"
- name: search_lang
description: "响应语言"
type: string
required: false
default: "en-US"
requestTemplate:
url: "https://api.search.brave.com/res/v1/local/descriptions"
method: GET
argsToUrlParam: true
headers:
- key: Accept
value: "application/json"
- key: X-Subscription-Token
value: "{{.config.apiKey}}"
responseTemplate:
body: |
{{- range $id, $desc := .descriptions }}
## 描述 {{ $id }}
{{ $desc }}
{{- end }}