0.1.0 • Published 8 months ago

@bty/mcp-dianping v0.1.0

Weekly downloads
-
License
MIT
Repository
-
Last release
8 months ago

DianPing MCP

快速开始

# 若已安装 playwright 该步骤可省略
npx playwright install

# 全局安装
npm install -g @bty/mcp-dianping

# 初始化登录,记录 Cookie
# 推荐安装后调用一次用于记录 Cookie
bty-mcp-dianping init

Tools

  • 关键词搜索笔记
  • 通过 URL 访问笔记内容
  • 通过 URL 访问笔记评论

使用说明

在 Cursor 的 settings.json 中添加以下配置:

{
  "mcpServers": {
    "DianPing MCP": {
      "command": "bty-mcp-dianping",
      "args": [
        "--stdio"
      ]
    }
  }
}

或者使用 npx 方式:

{
  "mcpServers": {
    "DianPing MCP": {
      "command": "npx",
      "args": [
        "bty-mcp-dianping",
        "--stdio"
      ]
    }
  }
}

配置说明:

  • command: 可以是全局安装后的 bty-mcp-dianping 命令,或使用 npx 直接运行
  • args: 必须包含 --stdio 参数以支持 Cursor 的通信方式

开发指南

环境要求

  • Node.js >= 16
  • npm >= 7

开发流程

# 安装依赖
pnpm install

# 构建项目
pnpm run build

# 开发模式运行
pnpm run dev

使用 MCP Inspector 进行调试

MCP Inspector 是一个用于调试 MCP 服务器的工具,可以帮助开发者检查和验证 MCP 服务器的行为。使用以下命令启动:

npx @modelcontextprotocol/inspector npx bty-mcp-dianping --stdio

这个命令会:

  1. 启动 MCP Inspector 工具
  2. 通过 Inspector 运行 bty-mcp-dianping 服务
  3. 提供一个交互式界面来检查请求和响应
  4. 帮助调试和验证 MCP 协议的实现

注意事项

  1. 首次使用最好执行 init 命令进行登录
  2. Cookie 文件包含敏感信息,避免泄露
  3. 建议定期更新 Cookie,避免失效
  4. 确保已正确安装 Node.js 环境
0.1.0

8 months ago

0.0.1-beta.2

8 months ago

0.0.1-beta.1

8 months ago