内存存储 MCP 服务器是一个借助 Puppeteer 实现网页搜索功能的模型上下文协议 (MCP) 服务器,能为相关系统提供便捷的网页搜索服务。
git clone https://github.com/yourusername/mcp-server.git
cd mcp-server
npm install
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"
}
}
启动服务器并进行搜索的基本流程如下:
# 克隆仓库
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 文件。