@iblai/iblai-js 1.0.26 → 1.0.28
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 +82 -0
- package/dist/web-containers/source/index.esm.js +517 -493
- package/package.json +8 -4
package/README.md
CHANGED
|
@@ -527,6 +527,88 @@ e2e/
|
|
|
527
527
|
|
|
528
528
|
---
|
|
529
529
|
|
|
530
|
+
## MCP Server (AI-Assisted Development)
|
|
531
|
+
|
|
532
|
+
This package includes an MCP (Model Context Protocol) server (`@iblai/mcp`) that provides AI assistants like Claude with authoritative documentation about the IBL packages — components, hooks, API queries, provider setup patterns, and more.
|
|
533
|
+
|
|
534
|
+
### Usage with Claude Code
|
|
535
|
+
|
|
536
|
+
**Option 1 — `npx` (no install needed):**
|
|
537
|
+
|
|
538
|
+
```bash
|
|
539
|
+
claude mcp add --transport stdio iblai-js-mcp -- npx @iblai/mcp
|
|
540
|
+
```
|
|
541
|
+
|
|
542
|
+
> **pnpm projects:** If your project already has `@iblai/iblai-js` installed, `npx` may detect the transitive `@iblai/mcp` dependency locally but fail to link its binary. Use `pnpm dlx` instead:
|
|
543
|
+
>
|
|
544
|
+
> ```bash
|
|
545
|
+
> claude mcp add --transport stdio iblai-js-mcp -- pnpm dlx @iblai/mcp
|
|
546
|
+
> ```
|
|
547
|
+
|
|
548
|
+
**Option 2 — after installing `@iblai/iblai-js` globally:**
|
|
549
|
+
|
|
550
|
+
```bash
|
|
551
|
+
npm install -g @iblai/iblai-js
|
|
552
|
+
claude mcp add --transport stdio iblai-js-mcp -- ibl-mcp-server
|
|
553
|
+
```
|
|
554
|
+
|
|
555
|
+
**Option 3 — project-level config (shared with team via git):**
|
|
556
|
+
|
|
557
|
+
Create a `.mcp.json` file at your project root:
|
|
558
|
+
|
|
559
|
+
```json
|
|
560
|
+
{
|
|
561
|
+
"mcpServers": {
|
|
562
|
+
"iblai-js-mcp": {
|
|
563
|
+
"command": "npx",
|
|
564
|
+
"args": ["@iblai/mcp"]
|
|
565
|
+
}
|
|
566
|
+
}
|
|
567
|
+
}
|
|
568
|
+
```
|
|
569
|
+
|
|
570
|
+
For pnpm projects where `@iblai/iblai-js` is a dependency:
|
|
571
|
+
|
|
572
|
+
```json
|
|
573
|
+
{
|
|
574
|
+
"mcpServers": {
|
|
575
|
+
"iblai-js-mcp": {
|
|
576
|
+
"command": "pnpm",
|
|
577
|
+
"args": ["dlx", "@iblai/mcp"]
|
|
578
|
+
}
|
|
579
|
+
}
|
|
580
|
+
}
|
|
581
|
+
```
|
|
582
|
+
|
|
583
|
+
Claude Code will detect this file and prompt team members to approve the server on first use.
|
|
584
|
+
|
|
585
|
+
### What the MCP Server Provides
|
|
586
|
+
|
|
587
|
+
| Category | Tool / Resource | Description |
|
|
588
|
+
| --- | --- | --- |
|
|
589
|
+
| Components | `get_component_info` | Detailed props, usage examples, and category for any UI component |
|
|
590
|
+
| Hooks | `get_hook_info` | Parameters, return types, and examples for React hooks |
|
|
591
|
+
| API Queries | `get_api_query_info` | RTK Query endpoint details and usage patterns |
|
|
592
|
+
| Providers | `get_provider_setup` | Correct provider hierarchy for each app type |
|
|
593
|
+
| Page Templates | `create_page_template` | Generate new pages following IBL patterns |
|
|
594
|
+
| Playwright | `get_playwright_helper_info` | E2E test helper documentation |
|
|
595
|
+
| Guides | `ibl://guides/*` | Layout rules, RBAC patterns, theming, Playwright setup |
|
|
596
|
+
| Package Docs | `ibl://packages/*` | Full package documentation for each subpath |
|
|
597
|
+
|
|
598
|
+
### Usage with Other MCP Clients
|
|
599
|
+
|
|
600
|
+
The server uses stdio transport and follows the [MCP specification](https://modelcontextprotocol.io). Any MCP-compatible client can use it:
|
|
601
|
+
|
|
602
|
+
```bash
|
|
603
|
+
# Run directly
|
|
604
|
+
npx @iblai/mcp
|
|
605
|
+
|
|
606
|
+
# Or if installed globally via @iblai/iblai-js
|
|
607
|
+
ibl-mcp-server
|
|
608
|
+
```
|
|
609
|
+
|
|
610
|
+
---
|
|
611
|
+
|
|
530
612
|
## Relationship to Standalone Packages
|
|
531
613
|
|
|
532
614
|
`@iblai/iblai-js` is a convenience wrapper. Each subpath is a direct re-export from its standalone package:
|