OpenRouter Web Search MCP Server

OpenRouter Web Search MCP Server

By ChristianSch GitHub

An MCP server providing websearch using openrouter :online

openrouter websearch
Overview

What is OpenRouter Web Search MCP?

OpenRouter Web Search MCP is an MCP server that provides a web search tool using OpenRouter's online models to generate concise and up-to-date answers to search queries.

How to use OpenRouter Web Search MCP?

To use the server, install it using Go, set up the required environment variables including your OpenRouter API key, and run the server with the appropriate command.

Key features of OpenRouter Web Search MCP?

  • Exposes an MCP-compatible server over stdio.
  • Provides a search_web tool that accepts search queries and returns fact-based answers as plain text.

Use cases of OpenRouter Web Search MCP?

  1. Performing quick web searches for information retrieval.
  2. Integrating with applications that require real-time search capabilities.
  3. Enhancing chatbots with web search functionalities.

FAQ from OpenRouter Web Search MCP?

  • What programming language is used for this project?

The project is implemented in Go.

  • Do I need an API key to use the server?

Yes, an OpenRouter API key is required to access the web search functionality.

  • Is there a default model name provided?

Yes, the default model name is google/gemini-2.5-pro-exp-03-25:free:online, but it can be customized.

Content

OpenRouter Web Search MCP Server

This project implements an MCP (Model Context Protocol) server that provides a search_web tool. The tool performs a web search using OpenRouter's online models to generate concise, up-to-date answers.

Features

  • Exposes an MCP-compatible server over stdio
  • Provides a search_web tool that:
    • Accepts a search query string
    • Uses OpenRouter's online models to generate a fact-based answer
    • Returns the answer as plain text

Requirements

  • Go 1.18+
  • An OpenRouter API key

Environment Variables

VariableDescriptionRequiredDefault
OPENROUTER_API_KEYYour OpenRouter API keyYes
MODEL_NAMEOpenRouter model name (should support :online suffix)Nogoogle/gemini-2.5-pro-exp-03-25:free:online

Installation

To install the MCP server, you can use the following command:

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

Usage

Run the server:

{
    "mcpServers": {
        "web-search": {
            "command": "openrouter-websearch-mcp",
            "env": {
                "OPENROUTER_API_KEY": "sk-or-v1-..."
            }
        }
    }
}
No tools information available.
No content found.