Back to MCP directory
publicPublicdnsLocal runtime

synthetic-web-search-mcp

一个基于Synthetic API的MCP服务器,为Claude等MCP兼容应用提供网页搜索工具。

article

README

🚀 合成网络搜索MCP服务器

这是一个模型上下文协议(MCP)服务器,它将合成网络搜索API作为工具公开,供Claude和其他支持MCP的应用程序使用。

npm版本

🚀 快速开始

使用Claude Code快速开始

使用以下单个命令将MCP服务器添加到Claude Code中:

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

请将 your_api_key_here 替换为你实际的 Synthetic API密钥

在Claude Desktop中使用

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

  • 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"
      }
    }
  }
}

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

在opencode中使用

要在opencode中使用此MCP服务器,请将以下内容添加到opencode配置中:

{
  "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
    }
  }
}

请将 your_actual_api_key_here 替换为你实际的 Synthetic API密钥。添加配置后重启opencode。

使用MCP检查器进行测试

若要在不使用Claude Desktop的情况下测试服务器,请使用MCP检查器:

npx @modelcontextprotocol/inspector synthetic-web-search-mcp@latest

这将打开一个Web界面,你可以在其中:

  • 列出可用工具
  • 使用不同的查询测试 search_web 工具
  • 实时查看返回的结果

✨ 主要特性

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

💻 使用示例

可用工具 - search_web

使用Synthetic API进行网络搜索。

参数

  • query(字符串,必需):搜索查询字符串

示例

搜索 "TypeScript文档"

返回值: 一个包含搜索结果的JSON数组,每个结果包含:

  • url:搜索结果的链接
  • title:页面标题
  • text:页面的摘要或内容
  • published:发布日期(如果可用)

📚 详细文档

API详情

  • 端点https://api.synthetic.new/v2/search
  • 方法:POST
  • 身份验证:通过 Authorization 标头使用Bearer令牌
  • 请求体:包含 query 字段的JSON

项目结构

synthetic-web-search-mcp/
├── package.json
├── tsconfig.json
├── .env.example
├── README.md
├── src/
│   └── index.ts
└── dist/          (生成于构建后)
    ├── index.js
    └── index.d.ts

📄 许可证

MIT

help

Runtime guide

cloud

Hosted runtime

Hosted servers run from a provider-managed environment. You usually connect the MCP client to the hosted endpoint or follow the provider's authorization flow, without keeping a local process alive

  1. Open provider connection page
  2. Authorize or copy endpoint
  3. Connect from your MCP client
terminal

Local runtime / other methods

Local servers run on your own machine or infrastructure. You normally copy the server_config into your MCP client, install the required package, and provide env variables from env_schema when needed

  1. Copy server_config
  2. Install required package
  3. Fill env variables and restart client