openrouter-search
v1.0.3
Published
MCP server for OpenRouter web search
Readme
OpenRouter Search MCP Server
This is a Model Context Protocol (MCP) server designed to provide web search capabilities by leveraging the OpenRouter API.
Features
- Web Search via OpenRouter: Utilizes the OpenRouter API to perform web searches.
- Specific Model: Uses the
google/gemini-2.5-pro-preview-03-25:onlinemodel. The:onlinesuffix enables the model's web search functionality. - Raw Text Output: The server returns the direct, unparsed text response generated by the AI model.
- MCP Integration: Exposes a simple
web_searchtool compatible with MCP clients.
Configuration
API Key: Ensure you have an API key from OpenRouter.
MCP Settings: Add the following configuration block to your MCP client's settings file (e.g.,
~/.vscode-server/data/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.jsonfor VS Code Remote/Codespaces or~/Library/Application Support/Claude/claude_desktop_config.jsonfor Claude Desktop App):{ "mcpServers": { "openrouter-search": { "command": "npx", "args": [ "-y", "openrouter-search" ], "env": { "OPENROUTER_API_KEY": "YOUR_OPENROUTER_API_KEY_HERE" } } } }- Replace
YOUR_OPENROUTER_API_KEY_HEREwith your actual OpenRouter API key.
Important: The server requires the
OPENROUTER_API_KEYenvironment variable to be set. Never commit your API key directly into the code or the repository.- Replace
Usage
Tool: web_search
Server Name: openrouter-search (or whatever key you used in the MCP settings)
Input:
query(string, required): The search query you want to perform.
Output:
- A text string containing the raw response from the OpenRouter API's
google/gemini-2.5-pro-preview-03-25:onlinemodel.
Example MCP Tool Call:
<use_mcp_tool>
<server_name>openrouter-search</server_name>
<tool_name>web_search</tool_name>
<arguments>
{
\"query\": \"What is the latest version of the MCP SDK?\"
}
</arguments>
</use_mcp_tool>License
MIT.
