PS

parnexcodes/synthetic-web-search-mcp

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

22 stars 4 forks 质量 70 趋势 10MIT

一个模型上下文协议(MCP)服务器,将合成网页搜索API作为工具,用于Claude及其他兼容MCP的应用程序。

概览

一个模型上下文协议(MCP)服务器,将合成网页搜索API作为工具,用于Claude及其他兼容MCP的应用程序。 该服务器提供了一个search_web工具,允许MCP客户端使用合成API进行网页搜索。搜索结果以格式化的JSON返回,包含URL、标题、文本和发布日期字段。 只需一个命令,将MCP服务器添加到Claude Code中: 用你实际的合成API密钥替换your_api_key_here。 要将此MCP服务器与Claude Desktop一起使用,请在Claude Desktop配置文件中添加以下内容: : ~/Library/Application Support/Claude/claude_desktop_config.json : %APPDATA%\Claude\claude_desktop_config.json 添加配置后,重启 Claude Desktop。然后你可以在对话中使用网页搜索工具。 要使用该 MCP 服务器配合 opencode,请在你的 opencode 配置中添加以下内容:

概述(AI 翻译)

一个模型上下文协议(MCP)服务器,将合成网页搜索API作为工具,用于Claude及其他兼容MCP的应用程序。

概述

该服务器提供一个 search_web 工具,允许 MCP 客户端使用合成 API 进行网页搜索。搜索结果以格式化的 JSON 返回,包含 URL、标题、文本和发布日期字段。

克劳德代码快速入门

只需一个命令,将MCP服务器添加到Claude Code中:

将 your_api_key_here 替换为你的实际合成 API 密钥。

使用 Claude Desktop

要将此MCP服务器与Claude Desktop一起使用,请在Claude Desktop配置文件中添加以下内容:

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json Windows:%APPDATA%\Claude\claude_desktop_config.json

添加配置后,重启 Claude Desktop。然后你可以在对话中使用网页搜索工具。

开放代码的使用

要使用该 MCP 服务器配合 opencode,请在你的 opencode 配置中添加以下内容:

将 your_actual_api_key_here 替换为你实际的合成 API 密钥。添加配置后重启 Opencode。

本地开发与测试

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

Synthetic Web Search MCP Server

A Model Context Protocol (MCP) server that exposes the Synthetic web search API as a tool for use with Claude and other MCP-compatible applications.

Overview

This server provides a search_web tool that allows MCP clients to perform web searches using the Synthetic API. Search results are returned as formatted JSON containing URL, title, text, and published date fields.

Quick Start with Claude Code

Add the MCP server to Claude Code with a single command:

claude mcp add synthetic-web-search -e SYNTHETIC_API_KEY=your_api_key_here -- npx -y synthetic-web-search-mcp@latest

Replace your_api_key_here with your actual Synthetic API key.

Usage with Claude Desktop

To use this MCP server with Claude Desktop, add the following to your Claude Desktop configuration file:

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json Windows: %APPDATA%\Claude\claude_desktop_config.json

{
  "mcpServers": {
    "synthetic-web-search": {
      "command": "npx",
      "args": ["-y", "synthetic-web-search-mcp@latest"],
      "env": {
        "SYNTHETIC_API_KEY": "your_actual_api_key_here"
      }
    }
  }
}

After adding the configuration, restart Claude Desktop. You can then use the web search tool in your conversations.

Usage with opencode

To use this MCP server with opencode, add the following to your opencode configuration:

{
  "mcp": {
    "synthetic-web-search": {
      "type": "local",
      "command": ["npx", "-y", "synthetic-web-search-mcp@latest"],
      "environment": {
        "SYNTHETIC_API_KEY": "your_actual_api_key_here"
      },
      "enabled": true
    }
  }
}

Replace your_actual_api_key_here with your actual Synthetic API key. Restart opencode after adding the configuration.

Local Development & Testing

1. Prerequisites

2. Install & build

npm install
npm run build

3. Test with MCP Inspector

The fastest way to verify the server interactively without any client configuration:

SYNTHETIC_API_KEY=your_key_here \
  npx @modelcontextprotocol/inspector node dist/index.js

This opens a browser UI where you can invoke search_web directly. Try:

  • query only → text is capped at the default 1000 characters.
  • query + max_text_length: 200 → tighter truncation to quickly scan results.
  • query + max_text_length: 5000 → more content when you need full detail.

4. Test with Claude Code (local build)

claude mcp add synthetic-web-search \
  -e SYNTHETIC_API_KEY=your_key_here \
  -- node /absolute/path/to/synthetic-web-search-mcp/dist/index.js

5. Test with Claude Desktop (local build)

在 GitHub 查看完整 README

安装

npx -y synthetic-web-search-mcp@latest
新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "synthetic-web-search": { "command": "npx", "args": ["-y", "synthetic-web-search-mcp@latest"], "env": { "SYNTHETIC_API_KEY": "your_actual_api_key_here" } } } }