Lansweeper MCP服务器

一个实验性的MCP服务器,用于查询Lansweeper API,提供资产详情、授权站点和站点资源信息。

  • by Lansweeper-public
  • TypeScript
  • 本地部署
  • 2 星标
  • 更新于
在 GitHub 查看 lansweeper-public/mcp-server-lansweeper

使用说明

Lansweeper MCP服务器(实验)

用于查询Lansweeper API的实验性MCP(模型上下文协议)服务器。

先决条件

  • Node.js(v16或更高版本)
  • 具有API访问权限的Lansweeper帐户
  • Lansweeper个人访问令牌-请按照 Lansweeper Data API文档 生成您的令牌

安装

光标

将以下内容添加到您的Cursor MCP配置中:

{
  "mcpServers": {
    "lansweeper-mcp-server": {
      "command": "npx",
      "args": ["-y", "@lansweeper-public/mcp-server-lansweeper"],
      "env": {
        "LANSWEEPER_PERSONAL_ACCESS_TOKEN": "your-lansweeper-token"
      }
    }
  }
}

VS Code

要为VS Code安装Lansweeper MCP服务器,请将以下内容添加到您的 .vscode/mcp.json 文件:

{
  "inputs": [
    {
      "type": "promptString",
      "id": "lansweeper-token",
      "description": "Lansweeper Personal Access Token",
      "password": true
    }
  ],
  "servers": {
    "lansweeper-mcp-server": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "@lansweeper-public/mcp-server-lansweeper"],
      "env": {
        "LANSWEEPER_PERSONAL_ACCESS_TOKEN": "${input:lansweeper-token}"
      }
    }
  }
}

克劳德桌面版

将以下内容添加到您的 claude_desktop_config.json:

{
  "mcpServers": {
    "lansweeper-mcp-server": {
      "command": "npx",
      "args": ["-y", "@lansweeper-public/mcp-server-lansweeper"],
      "env": {
        "LANSWEEPER_PERSONAL_ACCESS_TOKEN": "your-lansweeper-token"
      }
    }
  }
}

此文件位于:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • 窗户: %APPDATA%\Claude\claude_desktop_config.json

克劳德代码

安装Claude Code后,运行以下命令:

claude mcp add lansweeper-mcp-server -e LANSWEEPER_PERSONAL_ACCESS_TOKEN=your-lansweeper-token -- npx -y @lansweeper-public/mcp-server-lansweeper

直接使用

您也可以使用npx直接运行服务器:

LANSWEEPER_PERSONAL_ACCESS_TOKEN=your-lansweeper-token npx -y @lansweeper-public/mcp-server-lansweeper

可用工具

MCP服务器提供以下工具:

  1. get-asset-details:获取特定资产的详细信息
  2. get-authorized-sites:获取有关授权网站的信息
  3. get-assets-resources:获取站点中所有资产的信息

发展

对于此软件包的开发:

  1. 克隆此存储库
  2. 安装依赖项:
yarn install
  1. 构建项目:
yarn build
  1. 在开发模式下运行:
yarn dev

许可证

服务器端公共许可证v1(SSPL v1)