网页搜索服务器

一个使用Brave Search API提供网页搜索功能的MCP服务器。

  • by passive-radio
  • TypeScript
  • 本地部署
  • 更新于
在 GitHub 查看 passive-radio/http-mcp-web-search-server

使用说明

HTTP-MCP Web搜索服务器

一种MCP(模型上下文协议)服务器,使用Brave search API提供网络搜索功能。

设置

# Install dependencies
npm install

# Set your Brave Search API key
export BRAVE_API_KEY=your_api_key

# Start the server
npm start

特性

  • 使用Brave search API进行网络搜索
  • HTTP流式MCP服务器
  • 简单的数学计算(来自原始项目)

API文档

服务器支持以下MCP工具:

  • web_search:使用Brave Search API执行web搜索
    • 参数:
      • query:搜索查询(必填,最多400个字符)
      • count:结果数量(可选,默认值:10,最大值:20)
      • offset:分页偏移量(可选,默认值:0,最大值:9)

使用Docker

使用环境变量

# Build the Docker image
docker build -t web-search-server .

# Run with environment variable
docker run -p 3000:3000 -e BRAVE_API_KEY=your_api_key web-search-server

使用.env文件

创建一个 .env 使用API密钥文件:

# .env file
BRAVE_API_KEY=your_api_key
PORT=3000

然后使用env文件运行Docker:

docker run -p 3000:3000 --env-file .env web-search-server

发展

# Run in development mode
npm run dev

# Run tests
npm test

# Format code
npm run format

# Lint code
npm run lint

HTTP流式时间MCP服务器

这将启动时间mcp服务器作为http流式服务器。 您可以通过运行以下命令快速测试服务器的使用情况 src/testClient.ts 这是一个使用 time 工具。

GitHub操作

此存储库有一个GitHub Actions工作流,可以运行linting、格式化、测试(客户端-服务器集成测试),并使用以下命令将包更新发布到NPM 语义释放.