@habitusnet/bc365 2.2.4 → 2.2.6

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.
Files changed (3) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/README.md +101 -42
  3. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -2,6 +2,17 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
+ ## [2.2.6] — 2026-02-20
6
+
7
+ ### Changed
8
+ - README rewritten: two-command quick start, scope table, skills section, multi-tenant workflow, troubleshooting
9
+ - SETUP.md updated: removed stale v1/`--output` references, updated multi-tenant section for `bc365 switch`
10
+
11
+ ## [2.2.5] — 2026-02-20
12
+
13
+ ### Changed
14
+ - README: documents `--scope` flag with reference table and examples for `onboard` and `switch`
15
+
5
16
  ## [2.2.4] — 2026-02-20
6
17
 
7
18
  ### Fixed
package/README.md CHANGED
@@ -1,90 +1,149 @@
1
- # bc365 — MCP Config Manager for Business Central
1
+ # bc365
2
2
 
3
- `@habitusnet/bc365` is a CLI that connects Claude Code to Microsoft Dynamics 365 Business Central auto-discovering your environments, registering MCP servers, and installing BC-aware Claude skills.
4
-
5
- ## Quick Start
3
+ > Connect Claude Code to Microsoft Dynamics 365 Business Central in two commands.
6
4
 
7
5
  ```bash
8
6
  npx @habitusnet/bc365 onboard
7
+ claude plugin install habitusnet/bc365-skills
9
8
  ```
10
9
 
11
- Sign in with your Microsoft account. The CLI discovers your tenant, environments, and companies automatically, checks your BC permissions, and registers both MCP servers with Claude Code.
10
+ ---
12
11
 
13
- Then install the Claude Code skill bundle:
12
+ ## What It Does
14
13
 
15
- ```bash
16
- claude plugin install habitusnet/bc365-skills
17
- ```
14
+ `bc365 onboard` signs you in with Microsoft, discovers your BC environments and companies, and registers two MCP servers directly with Claude Code:
18
15
 
19
- **Prerequisites:**
20
- - Claude Code installed (`npm install -g @anthropic-ai/claude-code`)
21
- - Microsoft 365 / Azure AD account with access to Business Central
22
- - Business Central environment with `D365 BUS FULL ACCESS` permission set
16
+ | MCP Server | Purpose |
17
+ |------------|---------|
18
+ | `bc-data` | Read and write BC data customers, items, orders, G/L entries via OData |
19
+ | `bc-admin` | Manage environments, apps, feature flags, and user sessions |
20
+
21
+ `claude plugin install habitusnet/bc365-skills` adds three Claude skills that tell Claude how to use those servers effectively.
22
+
23
+ ---
24
+
25
+ ## Prerequisites
26
+
27
+ - [Claude Code](https://docs.anthropic.com/claude-code) installed
28
+ - Node.js ≥ 20
29
+ - Microsoft 365 account with access to Business Central
30
+ - `D365 BUS FULL ACCESS` permission set in BC
23
31
 
24
32
  ---
25
33
 
26
34
  ## Installation
27
35
 
36
+ ### Global install (recommended)
37
+
28
38
  ```bash
29
39
  npm install -g @habitusnet/bc365
40
+ bc365 onboard
30
41
  ```
31
42
 
32
- Or use without installing:
43
+ ### One-off (no install)
33
44
 
34
45
  ```bash
35
46
  npx @habitusnet/bc365 onboard
36
47
  ```
37
48
 
38
- ## What `bc365 onboard` Does
49
+ ---
50
+
51
+ ## Onboarding
39
52
 
40
- 1. Opens a Microsoft device code login in your browser
41
- 2. Discovers your BC environments and companies
42
- 3. Checks your permission sets
43
- 4. Registers two MCP servers with Claude Code (`claude mcp add-json -s local`):
44
- - **`bc-data`** — query and update BC data via OData (customers, items, orders, G/L entries)
45
- - **`bc-admin`** — manage environments, apps, feature flags, and sessions
53
+ ```bash
54
+ bc365 onboard
55
+ ```
46
56
 
47
- Servers are registered at local scope (`.claude/settings.local.json`, gitignored and per-user). Run with `--scope project` to write a shared `.mcp.json` instead.
57
+ 1. A device code URL is printed open it in your browser and sign in with your Microsoft account
58
+ 2. The CLI discovers your tenant, environments, and companies
59
+ 3. Checks your BC permission sets and warns if anything is missing
60
+ 4. Registers `bc-data` and `bc-admin` with Claude Code
48
61
 
49
- ## Claude Code Skills
62
+ Servers are registered at **local scope** by default — stored in `.claude/settings.local.json`, gitignored, per-user. Use `--scope` to change this:
50
63
 
51
- After onboarding, install the companion skill bundle:
64
+ | Scope | Stored in | Use when |
65
+ |-------|-----------|----------|
66
+ | `local` *(default)* | `.claude/settings.local.json` | Per-user, gitignored — recommended |
67
+ | `user` | `~/.claude.json` | All projects for this user |
68
+ | `project` | `.mcp.json` | Shared team config, committed to git |
69
+
70
+ ```bash
71
+ bc365 onboard # local scope (default)
72
+ bc365 onboard --scope project # writes .mcp.json for the whole team
73
+ ```
74
+
75
+ After onboarding, install the skill bundle:
52
76
 
53
77
  ```bash
54
78
  claude plugin install habitusnet/bc365-skills
55
79
  ```
56
80
 
57
- This gives Claude three skills:
81
+ ---
58
82
 
59
- | Skill | Description |
60
- |-------|-------------|
61
- | `bc-query` | Query and update BC data — OData filters, expand for line items, pagination |
62
- | `bc-admin` | Manage environments, apps, feature flags, sessions |
63
- | `bc-diagnose` | Interpret BC HTTP/OData errors and suggest fixes |
83
+ ## Claude Skills
64
84
 
65
- Skills are also bundled in this package under `skills/` for offline use.
85
+ The [`habitusnet/bc365-skills`](https://github.com/habitusnet/bc365-skills) plugin teaches Claude how to use the MCP servers:
66
86
 
67
- ## Commands
87
+ | Skill | What it covers |
88
+ |-------|----------------|
89
+ | `bc-query` | OData filters, `$expand` for line items, pagination, write operations |
90
+ | `bc-admin` | Environment inspection, app update workflow, feature flags, session management |
91
+ | `bc-diagnose` | HTTP/OData error interpretation, permission set reference, diagnostic workflow |
92
+
93
+ Skills are also bundled in this package under `skills/` for offline access.
94
+
95
+ ---
96
+
97
+ ## Multi-Tenant Usage (Agencies)
98
+
99
+ Each `bc365 onboard` run saves a profile. Switch between clients without re-authenticating:
100
+
101
+ ```bash
102
+ # Onboard client A (saves profile automatically)
103
+ bc365 onboard
104
+
105
+ # Later: switch to client B
106
+ bc365 switch client-b-profile
107
+
108
+ # List all saved profiles
109
+ bc365 profiles
110
+ ```
111
+
112
+ `bc365 switch` accepts the same `--scope` flag as `onboard`.
113
+
114
+ ---
115
+
116
+ ## All Commands
68
117
 
69
118
  | Command | Description |
70
119
  |---------|-------------|
71
- | `bc365 onboard [--scope local\|project]` | Discover and register MCP servers |
120
+ | `bc365 onboard [-s local\|user\|project]` | Discover tenant/env/company and register MCP servers |
121
+ | `bc365 switch <profile> [-s local\|user\|project]` | Re-register servers from a saved profile |
72
122
  | `bc365 profiles` | List saved profiles |
73
- | `bc365 switch <profile>` | Switch to a saved profile |
74
123
  | `bc365 check` | Check latest npm versions of bc365 packages |
75
124
 
76
- ## Multi-Tenant Usage
77
-
78
- For agencies managing multiple clients, see [SETUP.md](SETUP.md#multi-tenant-usage-agencies).
125
+ ---
79
126
 
80
127
  ## MCP Servers
81
128
 
82
- | Server | Package | Purpose |
83
- |--------|---------|---------|
84
- | `bc-data` | [`@habitusnet/mcp-business-central`](https://github.com/habitusnet/mcp-business-central) | OData read/write on BC entities |
85
- | `bc-admin` | [`habitusnet/d365bc-admin-mcp`](https://github.com/habitusnet/d365bc-admin-mcp) | BC Admin Center API |
129
+ Both servers are vendored mirrors with daily upstream sync and security scanning:
130
+
131
+ | Server | Upstream | npm command |
132
+ |--------|----------|-------------|
133
+ | `bc-admin` | [`habitusnet/d365bc-admin-mcp`](https://github.com/habitusnet/d365bc-admin-mcp) | `d365bc-admin-mcp` |
134
+ | `bc-data` | [`habitusnet/mcp-business-central`](https://github.com/habitusnet/mcp-business-central) | `npx @habitusnet/mcp-business-central` |
135
+
136
+ ---
86
137
 
87
- Both are vendored mirrors with daily upstream sync and security scanning.
138
+ ## Troubleshooting
139
+
140
+ **Auth errors (`401`)** — run `az login` to refresh Azure CLI credentials, or re-run `bc365 onboard`.
141
+
142
+ **Missing permissions warning** — ask your BC admin to assign `D365 BUS FULL ACCESS` in Settings → Users → Permission Sets.
143
+
144
+ **`claude: command not found`** — Claude Code must be installed and on your PATH before running `bc365 onboard`.
145
+
146
+ ---
88
147
 
89
148
  ## License
90
149
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@habitusnet/bc365",
3
- "version": "2.2.4",
3
+ "version": "2.2.6",
4
4
  "description": "Smart onboarding CLI and MCP config manager for Business Central",
5
5
  "type": "module",
6
6
  "bin": {