Web Search

Web Search

🚀 内存存储 MCP 服务器

内存存储 MCP 服务器是一个借助 Puppeteer 实现网页搜索功能的模型上下文协议 (MCP) 服务器,能为相关系统提供便捷的网页搜索服务。

🚀 快速开始

安装

  1. 克隆仓库:
git clone https://github.com/yourusername/mcp-server.git
cd mcp-server
  1. 安装依赖项:
npm install
  1. 构建项目:
npm run build

配置

在项目根目录中创建一个 .env 文件,包含以下环境变量:

# Puppeteer 配置
PUPPETEER_EXECUTABLE_PATH=/path/to/chrome
PUPPETEER_HEADLESS=true

# 服务器设置
PORT=3000

启动

启动服务器:

npm start

服务器将可供 MCP 客户端使用。通过 MCP 的示例用法:

{
"tool": "search_web",
"arguments": {
"query": "example search"
}
}

✨ 主要特性

  • 通过 Google 实现网络搜索功能
  • 结构化 JSON 结果
  • 轻量级和无状态设计
  • 集成与 MCP 兼容的系统简便

💻 使用示例

基础用法

启动服务器并进行搜索的基本流程如下:

# 克隆仓库
git clone https://github.com/yourusername/mcp-server.git
cd mcp-server
# 安装依赖
npm install
# 构建项目
npm run build
# 启动服务器
npm start

使用 MCP 客户端发送搜索请求:

{
"tool": "search_web",
"arguments": {
"query": "example search"
}
}

📚 详细文档

开发

构建项目

npm run build

运行测试

npm test

检查代码风格

npm run lint

格式化代码

npm run format

📄 许可证

此项目在 MIT 许可证下,具体信息请查看 LICENSE 文件。

  • 0 关注
  • 0 收藏,9 浏览
  • system 提出于 2025-09-23 11:27

相似服务问题