bi-agent-kit 0.1.0
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/LICENSE +21 -0
- package/README.md +193 -0
- package/bin/cli.js +1054 -0
- package/lib/atomic-fs.js +109 -0
- package/lib/commands.js +537 -0
- package/lib/detect.js +27 -0
- package/lib/doctor.js +247 -0
- package/lib/hash.js +18 -0
- package/lib/installers.js +77 -0
- package/lib/json-adapter.js +45 -0
- package/lib/lock.js +55 -0
- package/lib/manifest.js +70 -0
- package/lib/merge-config.js +141 -0
- package/lib/prereq-check.js +14 -0
- package/lib/targets.js +216 -0
- package/lib/toml-adapter.js +79 -0
- package/package.json +57 -0
- package/templates/azure-mcp.json +11 -0
- package/templates/dataverse-mcp.json +11 -0
- package/templates/dbt-mcp.json +14 -0
- package/templates/fabric-mcp.json +11 -0
- package/templates/pac-cli-mcp.json +12 -0
- package/templates/postgres-mcp.json +14 -0
- package/templates/powerbi-mcp.json +11 -0
- package/templates/snowflake-mcp.json +12 -0
- package/templates/sqlserver-mcp.json +14 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 KAE Labs LLC
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
<img src=".github/banner.png" alt="BI Agent Kit -- configurable MCP starter kit for AI-powered BI development" width="100%" />
|
|
3
|
+
</div>
|
|
4
|
+
|
|
5
|
+
# bi-agent-kit
|
|
6
|
+
|
|
7
|
+
<div align="center">
|
|
8
|
+
<a href="https://www.npmjs.com/package/bi-agent-kit"><img src="https://img.shields.io/npm/v/bi-agent-kit" alt="npm version" /></a>
|
|
9
|
+
<a href="https://github.com/kae-labs/bi-agent-kit/actions/workflows/test.yml"><img src="https://github.com/kae-labs/bi-agent-kit/actions/workflows/test.yml/badge.svg" alt="test status" /></a>
|
|
10
|
+
</div>
|
|
11
|
+
|
|
12
|
+
**A configurable installer for AI-agent tooling aimed at Business Intelligence work.**
|
|
13
|
+
|
|
14
|
+
<div align="center">
|
|
15
|
+
<img src=".github/demo.svg" alt="Animated demo of the bi-agent-kit picker installing Power BI and Dataverse MCP servers, then running doctor" width="90%" />
|
|
16
|
+
</div>
|
|
17
|
+
|
|
18
|
+
`bi-agent-kit` installs BI-related MCP server entries into the config files of the AI coding tools you already use -- Claude Code, Cursor, Gemini CLI, GitHub Copilot, and more -- without ever touching anything else already in those files.
|
|
19
|
+
|
|
20
|
+
CI runs the full test suite on both Linux and Windows (Node 20.x and 22.x) on every push and pull request.
|
|
21
|
+
|
|
22
|
+
Pick the servers you want, pick which tools to wire them into, and `bi-agent-kit` handles the rest: safe merges, atomic writes, an interactive walkthrough for anything that needs your own account details, and a manifest so entries can be cleanly added or removed later.
|
|
23
|
+
|
|
24
|
+
## Usage
|
|
25
|
+
|
|
26
|
+
No install step required.
|
|
27
|
+
|
|
28
|
+
```
|
|
29
|
+
npx bi-agent-kit init
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Detects which supported AI tool config files exist in your project and your home directory, lets you pick which BI servers to add to which of them, walks you through any setup values a server needs (an org URL, a connection string, a token), and writes a manifest so it can cleanly add or remove entries later.
|
|
33
|
+
|
|
34
|
+
```
|
|
35
|
+
npx bi-agent-kit configure
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Re-opens the same picker with current selections pre-checked, adds anything newly selected, and removes anything deselected -- as long as that entry has not been hand-edited since install.
|
|
39
|
+
|
|
40
|
+
```
|
|
41
|
+
npx bi-agent-kit remove <spec...>
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Removes one or more installed servers by spec (`templateId` or `templateId:instanceName`, e.g. `npx bi-agent-kit remove dataverse:dev powerbi`) from every target it was installed into, and updates the manifest. A spec that matches nothing installed is reported, not an error.
|
|
45
|
+
|
|
46
|
+
```
|
|
47
|
+
npx bi-agent-kit export --out team.json
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Prints (or, with `--out`, writes) a portable JSON document describing your current server selections as `spec`/`targetIds` pairs -- no absolute paths, no placeholder values, no secrets -- so it is safe to commit or share with teammates.
|
|
51
|
+
|
|
52
|
+
```
|
|
53
|
+
npx bi-agent-kit init --from team.json
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Reads a document produced by `export` and installs the same servers into the same target ids non-interactively, resolving target ids against whatever is detected on the current machine. Target ids not detected locally are skipped with a warning rather than failing the run, so a team-shared `team.json` works across machines with different tool setups.
|
|
57
|
+
|
|
58
|
+
```
|
|
59
|
+
npx bi-agent-kit list
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Shows what `bi-agent-kit` currently has installed, and where.
|
|
63
|
+
|
|
64
|
+
```
|
|
65
|
+
npx bi-agent-kit doctor
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
Health-checks everything previously installed: the manifest, each config file, whether entries were hand-edited or removed outside `bi-agent-kit`, whether required CLIs are still on PATH, and whether any setup placeholder was never filled in. Exits nonzero if anything is broken.
|
|
69
|
+
|
|
70
|
+
```
|
|
71
|
+
npx bi-agent-kit reconfigure
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
Picks an already-installed entry from a list and re-runs its setup walkthrough in place -- useful when an org URL, connection string, or token changes, or when you left a placeholder unfilled the first time. It re-applies the entry's own value into the same config file and target under the same key, so the diff on that file is just the values that changed.
|
|
75
|
+
|
|
76
|
+
### Flags
|
|
77
|
+
|
|
78
|
+
| Flag | What it does |
|
|
79
|
+
|---|---|
|
|
80
|
+
| `--dry-run` | Preview exactly what `init`/`configure`/`reconfigure` would write or remove; nothing is touched and no setup questions are asked |
|
|
81
|
+
| `--servers <ids>` | Non-interactive: comma-separated server specs to install (e.g. `--servers powerbi,fabric`), skipping the picker. Adds or updates the listed servers without touching any others already installed |
|
|
82
|
+
| `--prune` | With `--servers`, remove anything not listed instead of only adding/updating (full-sync semantics). Limited to the files targeted by `--targets` when given -- entries in files outside that scope are left untouched even if not re-listed. |
|
|
83
|
+
| `--targets <ids>` | With `--servers`, restrict installation to specific target ids |
|
|
84
|
+
| `--out <file>` | With `export`, write the document to a file instead of stdout |
|
|
85
|
+
| `--from <file>` | With `init`, import a portable `export` document and install non-interactively |
|
|
86
|
+
| `--yes` | Skip confirmation prompts (never auto-runs installers) |
|
|
87
|
+
| `--json` | Machine-readable output for `list` and `doctor` |
|
|
88
|
+
| `--help`, `-h` | Usage for every command and flag |
|
|
89
|
+
| `--version`, `-v` | Print the version |
|
|
90
|
+
|
|
91
|
+
Non-interactive mode never prompts for setup values: placeholder tokens are left in place with a warning so you can fill them in afterward, which makes it safe for scripts, devcontainer hooks, and CI.
|
|
92
|
+
|
|
93
|
+
### Instances -- multiple environments or accounts of the same server
|
|
94
|
+
|
|
95
|
+
A server spec is either a plain template id (`dataverse`) or `templateId:instanceName` (`dataverse:dev`), where `instanceName` is letters, numbers, and hyphens. Each named instance gets its own key in the config file (`dataverse-dev`, `dataverse-prod`, ...) and its own entry in the manifest, so it can be configured, reconfigured, and removed independently of any other instance of the same server. `configure` preserves existing instances by default -- pass `--prune` if you want it to remove any instance not listed in `--servers`.
|
|
96
|
+
|
|
97
|
+
```
|
|
98
|
+
npx bi-agent-kit init --servers dataverse:dev,dataverse:prod
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
installs two Dataverse MCP entries side by side -- `dataverse-dev` and `dataverse-prod` -- each walking you through its own org URL.
|
|
102
|
+
|
|
103
|
+
This is for the case where one template genuinely needs more than one live configuration at once: a dev and a prod Dataverse environment, two Fabric workspaces, two SQL Server or Snowflake accounts, a personal and a client Postgres database. In the interactive picker, choosing a server that is already installed at a target offers **Keep as is**, **Reconfigure values**, or **Add as a new named instance** -- the last option prompts for an instance name and installs alongside the existing entry rather than replacing it.
|
|
104
|
+
|
|
105
|
+
`list` and `doctor` render instance keys as-is (`dataverse-dev`, not `dataverse`), so each instance's health and installed-date show independently.
|
|
106
|
+
|
|
107
|
+
### End-to-end example
|
|
108
|
+
|
|
109
|
+
```
|
|
110
|
+
$ npx bi-agent-kit init
|
|
111
|
+
|
|
112
|
+
Select which BI servers to install
|
|
113
|
+
> [x] Power BI MCP Semantic model authoring (TMSL/TOM)
|
|
114
|
+
[x] Dataverse MCP Dataverse hosted MCP endpoint
|
|
115
|
+
[ ] Fabric MCP Fabric REST APIs and workspace operations
|
|
116
|
+
|
|
117
|
+
Select which detected config files to install them into
|
|
118
|
+
> [x] Claude Code (project) .mcp.json
|
|
119
|
+
[ ] Cursor (user) ~/.cursor/mcp.json
|
|
120
|
+
|
|
121
|
+
Enter a value for your org url (config.args.3)
|
|
122
|
+
> https://yourorg.crm.dynamics.com
|
|
123
|
+
|
|
124
|
+
add powerbi at .mcp.json: written
|
|
125
|
+
add dataverse at .mcp.json: written
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
Then ask your AI tool to do real BI work -- the servers are already wired in:
|
|
129
|
+
|
|
130
|
+
> "List the tables in my Dataverse environment and draft a Power BI measure for monthly active users."
|
|
131
|
+
|
|
132
|
+
(Illustrative CLI sketch; exact prompt rendering comes from the interactive picker.)
|
|
133
|
+
|
|
134
|
+
## Supported AI tools
|
|
135
|
+
|
|
136
|
+
| Tool | Scope |
|
|
137
|
+
|---|---|
|
|
138
|
+
| Claude Code | project + user |
|
|
139
|
+
| Claude Desktop | user |
|
|
140
|
+
| Cursor | project + user |
|
|
141
|
+
| Gemini CLI | project + user |
|
|
142
|
+
| GitHub Copilot CLI | project + user |
|
|
143
|
+
| GitHub Copilot -- VS Code extension | workspace + user |
|
|
144
|
+
| OpenAI Codex CLI | project + user |
|
|
145
|
+
| Windsurf | user |
|
|
146
|
+
| Roo Code | project |
|
|
147
|
+
| JetBrains Junie | project + user |
|
|
148
|
+
|
|
149
|
+
The Claude Code VS Code extension shares the CLI's configuration files, so Claude Code support covers the extension automatically.
|
|
150
|
+
|
|
151
|
+
## Supported BI servers
|
|
152
|
+
|
|
153
|
+
| Server | What it is | Link |
|
|
154
|
+
|---|---|---|
|
|
155
|
+
| **Power BI MCP** | Semantic model authoring (TMSL/TOM) | [microsoft/powerbi-modeling-mcp](https://github.com/microsoft/powerbi-modeling-mcp) |
|
|
156
|
+
| **Dataverse MCP** | Dataverse hosted MCP endpoint | [Connect to Dataverse with MCP](https://learn.microsoft.com/en-us/power-apps/maker/data-platform/data-platform-mcp) |
|
|
157
|
+
| **PAC CLI MCP** | Built into the Power Platform CLI | [Power Platform CLI MCP server](https://learn.microsoft.com/en-us/power-platform/developer/howto/use-mcp) |
|
|
158
|
+
| **Fabric MCP** | Fabric REST APIs, item definitions, workspace operations | [Fabric MCP Server quickstart](https://learn.microsoft.com/en-us/rest/api/fabric/articles/mcp-servers/pro-dev-local/get-started-local) |
|
|
159
|
+
| **Azure MCP** | Broad Azure resource management (Storage, Key Vault, Cosmos DB, Azure SQL, and more) | [@azure/mcp on npm](https://www.npmjs.com/package/@azure/mcp) |
|
|
160
|
+
| **dbt MCP** | Build, run, docs, and lineage for a dbt project | [dbt-labs/dbt-mcp](https://github.com/dbt-labs/dbt-mcp) |
|
|
161
|
+
| **SQL Server MCP** | Azure SQL, SQL Server, PostgreSQL, MySQL, and Cosmos DB via Data API Builder | [SQL MCP Server quickstart](https://learn.microsoft.com/en-us/azure/data-api-builder/mcp/quickstart-visual-studio-code) |
|
|
162
|
+
| **Snowflake MCP** | Snowflake-managed remote MCP server (Cortex Agents) | [Snowflake MCP Server docs](https://docs.snowflake.com/en/user-guide/snowflake-cortex/cortex-agents-mcp) |
|
|
163
|
+
| **Postgres MCP** | Postgres database inspection, query, and index-tuning (Postgres MCP Pro) | [crystaldba/postgres-mcp](https://github.com/crystaldba/postgres-mcp) |
|
|
164
|
+
|
|
165
|
+
Eight of the nine are official, first-party servers from Microsoft or Snowflake, or maintained directly by the tool vendor (dbt Labs). Postgres MCP is the best-maintained community alternative, since no first-party Postgres MCP server exists. None are roadmap-only.
|
|
166
|
+
|
|
167
|
+
A weekly scheduled workflow (`.github/workflows/freshness.yml`) checks that every template's referenced registry package (npm or PyPI) still exists, so a renamed or unpublished upstream package is caught before it breaks an install.
|
|
168
|
+
|
|
169
|
+
## Safety
|
|
170
|
+
|
|
171
|
+
`bi-agent-kit` never overwrites a config entry it does not already own. Before writing, it checks every target for a server already configured under the same name -- if you already have it set up by hand, or by some other tool, `bi-agent-kit` skips that entry entirely and leaves it exactly as it is, rather than overwriting or duplicating it. Every write is atomic, and the first time a target file is touched, a backup copy is kept in a `.bi-agent-kit-backups/` directory next to it.
|
|
172
|
+
|
|
173
|
+
That backups directory writes its own `.gitignore` (`*`) the first time it is created, so backups -- including any hand-configured secrets a pre-existing config file already had in it -- are excluded from version control regardless of your own `.gitignore` state.
|
|
174
|
+
|
|
175
|
+
Servers that require an external CLI to already be installed (PAC CLI for PAC CLI MCP, the `dab` CLI for SQL Server MCP, `uvx` for Postgres MCP) are flagged inline in the picker with a "not found on PATH" label if that CLI is not detected -- they are still offered, since you may install it before running the picker again, but the warning makes the missing prerequisite visible up front.
|
|
176
|
+
|
|
177
|
+
If you answer a setup question with a value that looks like a secret (a connection string, token, key, PAT, secret, or password), and it gets written into a config file inside your project, `bi-agent-kit` checks whether that file is gitignored and prints a warning if it is not, so you notice before committing a credential.
|
|
178
|
+
|
|
179
|
+
## Prerequisite setup
|
|
180
|
+
|
|
181
|
+
When `init` or `configure` finds a required CLI (`pac`, `dab`, or `uvx`) missing from PATH, it offers to install it for you right there in the picker -- confirm and it runs the appropriate command for your platform (a `dotnet tool install` for `pac`/`dab`, the official installer script for `uvx`), then re-checks PATH and reports success or failure. Decline and it falls back to the existing inline "not found on PATH" label.
|
|
182
|
+
|
|
183
|
+
After PAC CLI MCP is installed or detected and configured, `bi-agent-kit` also offers to walk you through a `pac auth` profile: it runs `pac auth list` so you can see what is already configured, and if you confirm, offers to run `pac auth create` (optionally scoped to an environment URL you provide) -- this opens an interactive browser login, so a note is printed before it starts.
|
|
184
|
+
|
|
185
|
+
`--dry-run` skips all of this: no install offers, no `pac auth` walkthrough, and no setup questions are asked.
|
|
186
|
+
|
|
187
|
+
## License
|
|
188
|
+
|
|
189
|
+
MIT
|
|
190
|
+
|
|
191
|
+
---
|
|
192
|
+
|
|
193
|
+
Built by [KAE Labs](https://kaelabs.dev) -- an independent studio for applied AI, data, and software.
|