Lansweeper
MCP server for Lansweeper IT asset management β discover, search, and analyze IT assets
Ask AI about Lansweeper
Powered by Claude Β· Grounded in docs
I know everything about Lansweeper. Ask me about installation, configuration, usage, or troubleshooting.
0/500
Reviews
Documentation
mcp-lansweeper
A Model Context Protocol (MCP) server for Lansweeper, providing AI assistants with access to IT asset management, software inventory, user discovery, and scanning reports through the Lansweeper GraphQL API.
Features
12 tools across four categories:
Asset Management
| Tool | Description |
|---|---|
list_assets | List assets with pagination, optional name/type filters |
get_asset | Get detailed information for a specific asset by ID |
search_assets | Search assets by name, IP address, MAC address, or OS |
Software Inventory
| Tool | Description |
|---|---|
list_software | List installed software across all assets, filterable by name or publisher |
get_asset_software | Get all software packages installed on a specific asset |
User Discovery
| Tool | Description |
|---|---|
list_users | List user accounts discovered by Lansweeper scans |
get_user | Get details of a specific user including their associated assets |
Reports & Overview
| Tool | Description |
|---|---|
list_asset_types | List all asset type categories with counts |
get_scan_summary | Get scanning status overview with asset counts and scanner info |
list_sites | List all Lansweeper sites accessible with the configured application ID |
get_recently_scanned_assets | Get assets most recently scanned or updated |
Installation
git clone git@github.com:fredriksknese/mcp-lansweeper.git
cd mcp-lansweeper
npm install
npm run build
Configuration
The server is configured via environment variables:
| Variable | Required | Default | Description |
|---|---|---|---|
LANSWEEPER_APPLICATION_ID | Yes | β | Application ID / API token from Lansweeper developer settings |
LANSWEEPER_SITE_ID | No | β | Default site ID for site-specific queries |
Generating an Application ID
- Log in to your Lansweeper Cloud account
- Go to My Lansweeper > Integrations > Developer Tools
- Create a new application and copy the Application ID
- Use this value as
LANSWEEPER_APPLICATION_ID
Usage with Claude Desktop
Add to your claude_desktop_config.json:
{
"mcpServers": {
"lansweeper": {
"command": "node",
"args": ["/absolute/path/to/mcp-lansweeper/dist/index.js"],
"env": {
"LANSWEEPER_APPLICATION_ID": "your-application-id",
"LANSWEEPER_SITE_ID": "your-site-id"
}
}
}
}
Usage with Claude Code
Add to your Claude Code MCP settings:
claude mcp add lansweeper -- node /absolute/path/to/mcp-lansweeper/dist/index.js
Set the required environment variables before running, or configure them in your MCP settings.
Example Prompts
Once connected, you can ask your AI assistant things like:
- "List all Windows workstations in Lansweeper"
- "Search for assets with IP address 192.168.1.x"
- "What software is installed on asset ID abc123?"
- "Find all assets running Windows Server 2019"
- "List all users discovered in the CORP domain"
- "Show me the asset inventory summary with counts by type"
- "Which assets were scanned most recently?"
- "Find all devices that have Chrome installed"
- "List all Lansweeper sites and their asset counts"
Development
npm run dev # Run with tsx (auto-reloads)
npm run build # Compile TypeScript to dist/
npm start # Run compiled output
Architecture
src/
βββ index.ts # Entry point β creates MCP server + STDIO transport
βββ lansweeper-client.ts # GraphQL client for Lansweeper API
βββ tools/
βββ assets.ts # Asset list, get, search (3 tools)
βββ software.ts # Software inventory (2 tools)
βββ users.ts # User discovery (2 tools)
βββ reports.ts # Reports, summaries, sites (4 tools)
API Details
The server communicates with the Lansweeper GraphQL API at https://api.lansweeper.com/api/v2/graphql using Bearer token authentication. All tools support optional site-specific queries via the site_id parameter or the LANSWEEPER_SITE_ID environment variable.
Requirements
- Node.js 18+
- Lansweeper Cloud account with API access
- Application ID from Lansweeper developer settings
License
SEE LICENSE IN LICENSE
