@assetlab/mcp-server 1.3.0 → 1.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +116 -143
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,173 +1,146 @@
|
|
|
1
1
|
# @assetlab/mcp-server
|
|
2
2
|
|
|
3
|
-
Connect [Claude](https://claude.ai) to your [AssetLab](https://assetlab.ca) account via the [Model Context Protocol](https://modelcontextprotocol.io). Ask Claude questions about your assets, work orders, PM schedules, and more — in plain language.
|
|
3
|
+
Connect [Claude](https://claude.ai) to your [AssetLab](https://assetlab.ca) account via the [Model Context Protocol](https://modelcontextprotocol.io). Ask Claude questions about your assets, work orders, PM schedules, and more — in plain language. Create and update records hands-free.
|
|
4
4
|
|
|
5
5
|
## Prerequisites
|
|
6
6
|
|
|
7
|
-
- [Node.js](https://nodejs.org) 18 or later
|
|
8
7
|
- An AssetLab account with an API key (create one in **Settings → API Keys**)
|
|
9
|
-
- [Claude
|
|
8
|
+
- [Claude.ai](https://claude.ai) Team or Enterprise plan
|
|
10
9
|
|
|
11
10
|
## Setup
|
|
12
11
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
- **Windows:** `%APPDATA%\Claude\claude_desktop_config.json`
|
|
18
|
-
|
|
19
|
-
2. Add the following to the `mcpServers` object (replace `al_live_...` with your API key):
|
|
20
|
-
|
|
21
|
-
```json
|
|
22
|
-
{
|
|
23
|
-
"mcpServers": {
|
|
24
|
-
"assetlab": {
|
|
25
|
-
"command": "npx",
|
|
26
|
-
"args": ["-y", "@assetlab/mcp-server"],
|
|
27
|
-
"env": {
|
|
28
|
-
"ASSETLAB_API_KEY": "al_live_...",
|
|
29
|
-
"ASSETLAB_API_URL": "your-api-url"
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
> **Tip:** The easiest way to get this config is to click **Copy Claude Config** directly on your API key in **AssetLab Settings → API Keys** — it pre-fills your key and API URL automatically.
|
|
37
|
-
|
|
38
|
-
3. Restart Claude Desktop. You should see the AssetLab tools available.
|
|
39
|
-
|
|
40
|
-
### Claude Code
|
|
41
|
-
|
|
42
|
-
```bash
|
|
43
|
-
claude mcp add assetlab npx @assetlab/mcp-server \
|
|
44
|
-
-e ASSETLAB_API_KEY=al_live_... \
|
|
45
|
-
-e ASSETLAB_API_URL=your-api-url
|
|
46
|
-
```
|
|
12
|
+
1. Create an API key in **AssetLab → Settings → API Keys**
|
|
13
|
+
2. In Claude.ai, go to **Settings → Integrations → Add integration**
|
|
14
|
+
3. Paste the connector URL: `https://mcp.assetlab.ca`
|
|
15
|
+
4. When prompted for auth, paste your API key (`al_live_...`)
|
|
47
16
|
|
|
48
17
|
## Example prompts
|
|
49
18
|
|
|
50
|
-
Once connected, you can ask Claude things like:
|
|
51
|
-
|
|
52
19
|
- *"Show me all overdue work orders"*
|
|
53
20
|
- *"List critical assets at Site A"*
|
|
54
21
|
- *"What PM schedules are due this month?"*
|
|
55
|
-
- *"
|
|
22
|
+
- *"Create a work order for the broken pump in Building 3"*
|
|
23
|
+
- *"Add a new vendor for electrical services"*
|
|
24
|
+
- *"Update the priority on WO-1234 to urgent"*
|
|
56
25
|
- *"Which projects are at risk or delayed?"*
|
|
57
|
-
- *"Show me all assets linked to the HVAC system in Building 3"*
|
|
58
|
-
- *"List open corrective work orders at all sites"*
|
|
59
26
|
- *"What's the total cost history for Asset X?"*
|
|
60
|
-
- *"
|
|
61
|
-
- *"What's the FCI trend for Site A over the past year?"*
|
|
27
|
+
- *"Create a part for 10-inch butterfly valves"*
|
|
62
28
|
- *"List all replacement plans due in 2027"*
|
|
63
29
|
|
|
64
30
|
## Available tools
|
|
65
31
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
|
69
|
-
|
|
70
|
-
| `
|
|
71
|
-
| `
|
|
72
|
-
| `
|
|
73
|
-
| `
|
|
74
|
-
| `list_buildings` |
|
|
75
|
-
| `list_locations` |
|
|
76
|
-
| `list_systems` |
|
|
77
|
-
| `list_system_groups` |
|
|
78
|
-
| `list_system_classes` |
|
|
79
|
-
| `list_pm_schedules` |
|
|
80
|
-
|
|
|
81
|
-
| `
|
|
82
|
-
| `
|
|
83
|
-
| `
|
|
84
|
-
| `
|
|
85
|
-
|
|
|
86
|
-
| `
|
|
87
|
-
| `
|
|
88
|
-
| `
|
|
89
|
-
| `
|
|
90
|
-
| `
|
|
91
|
-
| `
|
|
92
|
-
| `
|
|
93
|
-
| `
|
|
94
|
-
| `
|
|
95
|
-
| `
|
|
96
|
-
| `
|
|
97
|
-
| `
|
|
98
|
-
| `list_work_order_comments` |
|
|
99
|
-
| `
|
|
100
|
-
| `
|
|
101
|
-
| `
|
|
102
|
-
| `
|
|
103
|
-
| `
|
|
104
|
-
| `
|
|
105
|
-
| `
|
|
106
|
-
|
|
|
107
|
-
| `
|
|
108
|
-
|
|
|
109
|
-
|
|
|
110
|
-
| `
|
|
111
|
-
| `
|
|
112
|
-
| `
|
|
113
|
-
| `
|
|
114
|
-
| `
|
|
115
|
-
| `
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
|
120
|
-
|
|
121
|
-
| `
|
|
122
|
-
| `
|
|
123
|
-
| `
|
|
124
|
-
| `
|
|
125
|
-
| `
|
|
126
|
-
| `
|
|
32
|
+
### Read tools
|
|
33
|
+
|
|
34
|
+
| Resource | List | Get |
|
|
35
|
+
|----------|------|-----|
|
|
36
|
+
| Assets | `list_assets` | `get_asset` |
|
|
37
|
+
| Work Orders | `list_work_orders` | `get_work_order` |
|
|
38
|
+
| Work Requests | `list_work_requests` | `get_work_request` |
|
|
39
|
+
| Sites | `list_sites` | `get_site` |
|
|
40
|
+
| Buildings | `list_buildings` | — |
|
|
41
|
+
| Locations | `list_locations` | — |
|
|
42
|
+
| Systems | `list_systems` | — |
|
|
43
|
+
| System Groups | `list_system_groups` | — |
|
|
44
|
+
| System Classes | `list_system_classes` | — |
|
|
45
|
+
| PM Schedules | `list_pm_schedules` | `get_pm_schedule` |
|
|
46
|
+
| PM Templates | `list_pm_templates` | — |
|
|
47
|
+
| Projects | `list_projects` | `get_project` |
|
|
48
|
+
| Contracts | `list_contracts` | — |
|
|
49
|
+
| Compliance Items | `list_compliance_items` | `get_compliance_item` |
|
|
50
|
+
| Compliance Records | `list_compliance_records` | `get_compliance_record` |
|
|
51
|
+
| Dashboard | — | `get_dashboard_summary` |
|
|
52
|
+
| Dashboard Snapshots | `list_dashboard_snapshots` | `get_dashboard_snapshot` |
|
|
53
|
+
| Vendors | `list_vendors` | `get_vendor` |
|
|
54
|
+
| Invoices | `list_invoices` | `get_invoice` |
|
|
55
|
+
| Purchase Orders | `list_purchase_orders` | `get_purchase_order` |
|
|
56
|
+
| Expenses | `list_expenses` | `get_expense` |
|
|
57
|
+
| Budgets | `list_budgets` | `get_budget` |
|
|
58
|
+
| Parts | `list_parts` | `get_part` |
|
|
59
|
+
| Part Categories | `list_part_categories` | `get_part_category` |
|
|
60
|
+
| Asset Comments | `list_asset_comments` | `get_asset_comment` |
|
|
61
|
+
| Asset Costs | `list_asset_costs` | `get_asset_cost` |
|
|
62
|
+
| Replacement Plans | `list_asset_replacement_plans` | `get_asset_replacement_plan` |
|
|
63
|
+
| Risk History | `list_asset_risk_history` | `get_asset_risk_history_entry` |
|
|
64
|
+
| WO Comments | `list_work_order_comments` | `get_work_order_comment` |
|
|
65
|
+
| Project Tasks | `list_project_tasks` | `get_project_task` |
|
|
66
|
+
| Project Milestones | `list_project_milestones` | `get_project_milestone` |
|
|
67
|
+
| Project Phases | `list_project_phases` | `get_project_phase` |
|
|
68
|
+
| Project Budget Items | `list_project_budget_items` | `get_project_budget_item` |
|
|
69
|
+
| Project Time Entries | `list_project_time_entries` | `get_project_time_entry` |
|
|
70
|
+
| Project Comments | `list_project_comments` | `get_project_comment` |
|
|
71
|
+
| Site FCI History | `list_site_fci_history` | `get_site_fci_history_entry` |
|
|
72
|
+
| Vendor Site Assignments | `list_vendor_site_assignments` | `get_vendor_site_assignment` |
|
|
73
|
+
| Contract Sites | `list_contract_sites` | — |
|
|
74
|
+
| Custom Field Definitions | `list_custom_field_definitions` | `get_custom_field_definition` |
|
|
75
|
+
| Custom Field Values | `list_custom_field_values` | `get_custom_field_value` |
|
|
76
|
+
| Asset Types | `list_asset_types` | — |
|
|
77
|
+
| Work Categories | `list_work_categories` | — |
|
|
78
|
+
| Manufacturers | `list_manufacturers` | `get_manufacturer` |
|
|
79
|
+
| Building Types | `list_building_types` | — |
|
|
80
|
+
| Location Types | `list_location_types` | — |
|
|
81
|
+
| Cost Categories | `list_cost_categories` | — |
|
|
82
|
+
|
|
83
|
+
### Write tools
|
|
84
|
+
|
|
85
|
+
| Resource | Create | Update | Delete |
|
|
86
|
+
|----------|--------|--------|--------|
|
|
87
|
+
| Assets | `create_asset` | `update_asset` | `delete_asset` |
|
|
88
|
+
| Work Orders | `create_work_order` | `update_work_order` | `delete_work_order` |
|
|
89
|
+
| Work Requests | `create_work_request` | `update_work_request` | `delete_work_request` |
|
|
90
|
+
| Sites | `create_site` | `update_site` | `delete_site` |
|
|
91
|
+
| Buildings | `create_building` | `update_building` | `delete_building` |
|
|
92
|
+
| Locations | `create_location` | `update_location` | `delete_location` |
|
|
93
|
+
| Systems | `create_system` | `update_system` | `delete_system` |
|
|
94
|
+
| PM Schedules | `create_pm_schedule` | `update_pm_schedule` | `delete_pm_schedule` |
|
|
95
|
+
| Projects | `create_project` | `update_project` | `delete_project` |
|
|
96
|
+
| Contracts | `create_contract` | `update_contract` | `delete_contract` |
|
|
97
|
+
| Vendors | `create_vendor` | `update_vendor` | `delete_vendor` |
|
|
98
|
+
| Invoices | `create_invoice` | `update_invoice` | `delete_invoice` |
|
|
99
|
+
| Purchase Orders | `create_purchase_order` | `update_purchase_order` | `delete_purchase_order` |
|
|
100
|
+
| Expenses | `create_expense` | `update_expense` | `delete_expense` |
|
|
101
|
+
| Budgets | `create_budget` | `update_budget` | `delete_budget` |
|
|
102
|
+
| Parts | `create_part` | `update_part` | `delete_part` |
|
|
103
|
+
| Part Categories | `create_part_category` | `update_part_category` | `delete_part_category` |
|
|
104
|
+
| Asset Comments | `create_asset_comment` | `update_asset_comment` | `delete_asset_comment` |
|
|
105
|
+
| Asset Costs | `create_asset_cost` | `update_asset_cost` | `delete_asset_cost` |
|
|
106
|
+
| Replacement Plans | `create_asset_replacement_plan` | `update_asset_replacement_plan` | `delete_asset_replacement_plan` |
|
|
107
|
+
| WO Comments | `create_work_order_comment` | `update_work_order_comment` | `delete_work_order_comment` |
|
|
108
|
+
| Project Tasks | `create_project_task` | `update_project_task` | `delete_project_task` |
|
|
109
|
+
| Project Milestones | `create_project_milestone` | `update_project_milestone` | `delete_project_milestone` |
|
|
110
|
+
| Project Phases | `create_project_phase` | `update_project_phase` | `delete_project_phase` |
|
|
111
|
+
| Project Budget Items | `create_project_budget_item` | `update_project_budget_item` | `delete_project_budget_item` |
|
|
112
|
+
| Project Time Entries | `create_project_time_entry` | `update_project_time_entry` | `delete_project_time_entry` |
|
|
113
|
+
| Project Comments | `create_project_comment` | `update_project_comment` | `delete_project_comment` |
|
|
114
|
+
| Vendor Site Assignments | `create_vendor_site_assignment` | — | `delete_vendor_site_assignment` |
|
|
115
|
+
| Contract Sites | `create_contract_site` | — | `delete_contract_site` |
|
|
116
|
+
| Custom Field Definitions | `create_custom_field_definition` | `update_custom_field_definition` | `delete_custom_field_definition` |
|
|
117
|
+
| Custom Field Values | `create_custom_field_value` | `update_custom_field_value` | `delete_custom_field_value` |
|
|
118
|
+
| Asset Types | `create_asset_type` | `update_asset_type` | `delete_asset_type` |
|
|
119
|
+
| Work Categories | `create_work_category` | `update_work_category` | `delete_work_category` |
|
|
120
|
+
| Manufacturers | `create_manufacturer` | `update_manufacturer` | `delete_manufacturer` |
|
|
121
|
+
| Building Types | `create_building_type` | `update_building_type` | `delete_building_type` |
|
|
122
|
+
| Location Types | `create_location_type` | `update_location_type` | `delete_location_type` |
|
|
123
|
+
| Cost Categories | `create_cost_category` | `update_cost_category` | `delete_cost_category` |
|
|
127
124
|
|
|
128
125
|
## Scopes
|
|
129
126
|
|
|
130
|
-
API keys use scopes to control what Claude can access.
|
|
131
|
-
|
|
132
|
-
| Scope | Access |
|
|
133
|
-
|
|
134
|
-
| `
|
|
135
|
-
| `
|
|
136
|
-
|
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
| `pm_schedules:read` | PM schedules and templates |
|
|
140
|
-
| `projects:read` | Capital projects |
|
|
141
|
-
| `contracts:read` | Vendor contracts |
|
|
142
|
-
| `compliance:read` | Compliance items |
|
|
143
|
-
| `dashboard:read` | Dashboard summary stats |
|
|
144
|
-
| `budgets:read` | Annual funding budgets |
|
|
145
|
-
| `asset_comments:read` | Asset comments |
|
|
146
|
-
| `asset_costs:read` | Asset cost records |
|
|
147
|
-
| `asset_replacement_plans:read` | Asset replacement plans |
|
|
148
|
-
| `asset_risk_history:read` | Asset risk history |
|
|
149
|
-
| `work_order_comments:read` | Work order comments |
|
|
150
|
-
| `project_tasks:read` | Project tasks |
|
|
151
|
-
| `project_milestones:read` | Project milestones |
|
|
152
|
-
| `project_phases:read` | Project phases |
|
|
153
|
-
| `project_budget_items:read` | Project budget items |
|
|
154
|
-
| `project_time_entries:read` | Project time entries |
|
|
155
|
-
| `project_comments:read` | Project comments |
|
|
156
|
-
| `compliance_records:read` | Compliance records |
|
|
157
|
-
| `site_fci_history:read` | Site FCI history |
|
|
158
|
-
| `dashboard_snapshots:read` | Dashboard snapshots |
|
|
159
|
-
| `vendor_site_assignments:read` | Vendor site assignments |
|
|
160
|
-
| `contract_sites:read` | Contract site mappings |
|
|
161
|
-
| `custom_fields:read` | Custom field definitions and values |
|
|
162
|
-
| `part_categories:read` | Part categories |
|
|
163
|
-
| `*:*` | All resources |
|
|
127
|
+
API keys use scopes to control what Claude can access. Configure per-resource read and write access in **Settings → API Keys**.
|
|
128
|
+
|
|
129
|
+
| Scope pattern | Access |
|
|
130
|
+
|---------------|--------|
|
|
131
|
+
| `resource:read` | List and get records (e.g. `assets:read`, `work_orders:read`) |
|
|
132
|
+
| `resource:write` | Create, update, and delete records (e.g. `assets:write`, `parts:write`) |
|
|
133
|
+
| `*:*` | Full access to all resources |
|
|
134
|
+
|
|
135
|
+
Write scopes require the corresponding read scope to be useful. When creating an API key, scopes are organized by category (Operations, Facilities, Projects, Finance, etc.) with bulk-toggle controls.
|
|
164
136
|
|
|
165
137
|
## Security
|
|
166
138
|
|
|
167
|
-
-
|
|
168
|
-
- Your API key is scoped to your organization only
|
|
169
|
-
- All data access is
|
|
170
|
-
- API keys can be revoked at any time in **Settings → API Keys
|
|
139
|
+
- Connects via OAuth 2.0 + PKCE through `mcp.assetlab.ca`. Your API key is encrypted in transit and never stored by the MCP server.
|
|
140
|
+
- Your API key is scoped to your organization only.
|
|
141
|
+
- All data access is logged in AssetLab's audit log.
|
|
142
|
+
- API keys can be revoked at any time in **Settings → API Keys**.
|
|
143
|
+
- Write operations require explicit write scopes — read-only by default.
|
|
171
144
|
|
|
172
145
|
## Support
|
|
173
146
|
|