OpenRouter Web Search MCP Server

OpenRouter Web Search MCP Server

site icon
2025.04.07 1
Go网络搜索答案生成搜索工具
OpenRouter Web Search MCP Server 是一个基于 MCP (Model Context Protocol) 的服务器,提供 `search_web` 工具,用于通过 OpenRouter 的在线模型执行网络搜索并生成简洁、最新的答案。
View on GitHub

Overview

基本能力

产品定位

OpenRouter Web Search MCP Server 是一个用于网络搜索的工具,通过 OpenRouter 的在线模型提供事实性答案。

核心功能

  • 通过 stdio 暴露 MCP 兼容的服务器
  • 提供 search_web 工具,功能包括:
  • 接受搜索查询字符串
  • 使用 OpenRouter 的在线模型生成基于事实的答案
  • 返回纯文本格式的答案

适用场景

  • 需要快速获取网络搜索结果并生成简洁答案的场景
  • 需要集成网络搜索功能的应用程序

工具列表

  • search_web:执行网络搜索并生成答案的工具

常见问题解答

  • 需要 OpenRouter API 密钥才能使用
  • 默认使用 google/gemini-2.5-pro-exp-03-25:free:online 模型,但可以自定义

使用教程

使用依赖

  • Go 1.18+
  • OpenRouter API 密钥

安装教程

go install github.com/ChristianSch/openrouter-websearch-mcp

调试方式

运行服务器:

{
    "mcpServers": {
        "web-search": {
            "command": "openrouter-websearch-mcp",
            "env": {
                "OPENROUTER_API_KEY": "sk-or-v1-..."
            }
        }
    }
}

许可证

该项目遵循 MIT 开源许可条款,请参阅 MIT 了解完整条款。