@alaarab/ogrid-mcp 2.5.4 → 2.5.8
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 +6 -51
- package/bundled-docs/api/README.md +11 -11
- package/bundled-docs/api/components-column-chooser.mdx +21 -21
- package/bundled-docs/api/components-column-header-filter.mdx +23 -23
- package/bundled-docs/api/components-datagrid-table.mdx +27 -27
- package/bundled-docs/api/components-pagination-controls.mdx +21 -21
- package/bundled-docs/api/components-sidebar.mdx +27 -27
- package/bundled-docs/api/components-status-bar.mdx +12 -12
- package/bundled-docs/api/js-api.mdx +13 -13
- package/bundled-docs/api/types.mdx +4 -4
- package/bundled-docs/features/column-chooser.mdx +4 -4
- package/bundled-docs/features/column-groups.mdx +4 -4
- package/bundled-docs/features/column-pinning.mdx +5 -5
- package/bundled-docs/features/column-reordering.mdx +5 -5
- package/bundled-docs/features/column-types.mdx +7 -7
- package/bundled-docs/features/context-menu.mdx +4 -4
- package/bundled-docs/features/csv-export.mdx +4 -4
- package/bundled-docs/features/editing.mdx +78 -68
- package/bundled-docs/features/filtering.mdx +83 -67
- package/bundled-docs/features/formulas.mdx +135 -139
- package/bundled-docs/features/grid-api.mdx +4 -4
- package/bundled-docs/features/keyboard-navigation.mdx +6 -6
- package/bundled-docs/features/mobile-touch.mdx +9 -9
- package/bundled-docs/features/pagination.mdx +4 -4
- package/bundled-docs/features/performance.mdx +97 -100
- package/bundled-docs/features/premium-inputs.mdx +579 -0
- package/bundled-docs/features/responsive-columns.mdx +1 -1
- package/bundled-docs/features/row-selection.mdx +8 -8
- package/bundled-docs/features/server-side-data.mdx +4 -4
- package/bundled-docs/features/sidebar.mdx +6 -6
- package/bundled-docs/features/sorting.mdx +87 -44
- package/bundled-docs/features/spreadsheet-selection.mdx +9 -9
- package/bundled-docs/features/status-bar.mdx +4 -4
- package/bundled-docs/features/toolbar.mdx +9 -9
- package/bundled-docs/features/virtual-scrolling.mdx +13 -13
- package/bundled-docs/getting-started/overview.mdx +9 -9
- package/bundled-docs/getting-started/quick-start.mdx +47 -47
- package/bundled-docs/getting-started/vanilla-js.mdx +98 -74
- package/bundled-docs/guides/accessibility.mdx +113 -421
- package/bundled-docs/guides/framework-showcase.mdx +98 -52
- package/bundled-docs/guides/mcp-live-testing.mdx +12 -12
- package/bundled-docs/guides/mcp.mdx +47 -46
- package/dist/esm/bridge-client.d.ts +3 -3
- package/dist/esm/index.js +9 -9
- package/package.json +3 -2
|
@@ -1,59 +1,111 @@
|
|
|
1
1
|
---
|
|
2
2
|
sidebar_position: 5
|
|
3
3
|
title: Framework Showcase
|
|
4
|
-
description:
|
|
4
|
+
description: OGrid in React, Angular, Vue, and Vanilla JS — same API, native components
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
# Framework Showcase
|
|
9
9
|
|
|
10
|
-
OGrid
|
|
10
|
+
OGrid works with your existing design system — not against it. React, Angular, Vue, and Vanilla JS are all fully supported, and every framework shares the same headless core so features stay in sync across all of them.
|
|
11
|
+
|
|
12
|
+
Every grid below is live. Sort, filter, edit, select, copy-paste, undo — it all works.
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## Picking the right package
|
|
17
|
+
|
|
18
|
+
The short version:
|
|
19
|
+
|
|
20
|
+
- **Starting from scratch?** Pick the Radix variant for your framework — it's the lightest, with no peer dependencies beyond the framework itself.
|
|
21
|
+
- **Already using a design system?** Pick the matching package — Fluent, Material, Angular Material, PrimeNG, Vuetify, or PrimeVue — and the grid components will use your existing components for buttons, inputs, and popovers.
|
|
22
|
+
- **No framework?** Use `@alaarab/ogrid-js` for a full-featured grid with just a CDN import.
|
|
23
|
+
|
|
24
|
+
Switching between UI libraries later is straightforward — you change the import and the wrapper provider if required. The grid configuration (columns, data, event handlers) doesn't change.
|
|
11
25
|
|
|
12
26
|
---
|
|
13
27
|
|
|
14
28
|
## React
|
|
15
29
|
|
|
16
|
-
Three design
|
|
30
|
+
Three design systems, all sharing the same hooks from `@alaarab/ogrid-react`. Your column definitions, event handlers, and grid API calls work identically across all three.
|
|
17
31
|
|
|
18
|
-
### Radix UI
|
|
32
|
+
### Radix UI — lightweight default
|
|
19
33
|
|
|
20
|
-
The
|
|
34
|
+
The default React package. Radix primitives are bundled in — no separate peer dependency to install. It's a good starting point for new projects or when you want minimal overhead.
|
|
21
35
|
|
|
22
36
|
```bash
|
|
23
37
|
npm install @alaarab/ogrid-react-radix
|
|
24
38
|
```
|
|
25
39
|
|
|
40
|
+
```tsx
|
|
41
|
+
|
|
42
|
+
export default function App() {
|
|
43
|
+
return (
|
|
44
|
+
<OGrid
|
|
45
|
+
columns={columns}
|
|
46
|
+
data={data}
|
|
47
|
+
getRowId={(row) => row.id}
|
|
48
|
+
statusBar
|
|
49
|
+
/>
|
|
50
|
+
);
|
|
51
|
+
}
|
|
52
|
+
```
|
|
53
|
+
|
|
26
54
|
<ShowcaseRadixDemo />
|
|
27
55
|
|
|
28
|
-
### Fluent UI
|
|
56
|
+
### Fluent UI — Microsoft ecosystem
|
|
29
57
|
|
|
30
|
-
|
|
58
|
+
If you're building for Microsoft Teams, SharePoint, or any Microsoft 365 integration, Fluent is your pick. The grid uses native Fluent components for headers, filters, and inputs so it blends naturally.
|
|
31
59
|
|
|
32
60
|
```bash
|
|
33
61
|
npm install @alaarab/ogrid-react-fluent @fluentui/react-components
|
|
34
62
|
```
|
|
35
63
|
|
|
64
|
+
```tsx
|
|
65
|
+
|
|
66
|
+
export default function App() {
|
|
67
|
+
return (
|
|
68
|
+
<FluentProvider theme={webLightTheme}>
|
|
69
|
+
<OGrid columns={columns} data={data} getRowId={(row) => row.id} />
|
|
70
|
+
</FluentProvider>
|
|
71
|
+
);
|
|
72
|
+
}
|
|
73
|
+
```
|
|
74
|
+
|
|
36
75
|
<ShowcaseFluentDemo />
|
|
37
76
|
|
|
38
|
-
### Material UI
|
|
77
|
+
### Material UI — Google's Material Design
|
|
39
78
|
|
|
40
|
-
|
|
79
|
+
If your app already uses MUI, this drops right in. The grid uses MUI components and respects your `ThemeProvider` — including custom palettes and typography.
|
|
41
80
|
|
|
42
81
|
```bash
|
|
43
82
|
npm install @alaarab/ogrid-react-material @mui/material @emotion/react @emotion/styled
|
|
44
83
|
```
|
|
45
84
|
|
|
85
|
+
```tsx
|
|
86
|
+
|
|
87
|
+
const theme = createTheme({ palette: { primary: { main: '#6750a4' } } });
|
|
88
|
+
|
|
89
|
+
export default function App() {
|
|
90
|
+
return (
|
|
91
|
+
<ThemeProvider theme={theme}>
|
|
92
|
+
<OGrid columns={columns} data={data} getRowId={(row) => row.id} />
|
|
93
|
+
</ThemeProvider>
|
|
94
|
+
);
|
|
95
|
+
}
|
|
96
|
+
```
|
|
97
|
+
|
|
46
98
|
<ShowcaseMaterialDemo />
|
|
47
99
|
|
|
48
100
|
---
|
|
49
101
|
|
|
50
102
|
## Angular
|
|
51
103
|
|
|
52
|
-
Signals-based reactivity with standalone components
|
|
104
|
+
Signals-based reactivity with standalone components — no NgModule, no boilerplate. All three packages share the same services from `@alaarab/ogrid-angular`.
|
|
53
105
|
|
|
54
|
-
### Radix (Angular CDK)
|
|
106
|
+
### Radix (Angular CDK) — lightweight default
|
|
55
107
|
|
|
56
|
-
|
|
108
|
+
Angular CDK handles overlays (dropdowns, popovers) with no heavy UI framework required. Good default for new Angular projects.
|
|
57
109
|
|
|
58
110
|
```bash
|
|
59
111
|
npm install @alaarab/ogrid-angular-radix @angular/cdk
|
|
@@ -67,46 +119,43 @@ npm install @alaarab/ogrid-angular-radix @angular/cdk
|
|
|
67
119
|
template: `<ogrid [props]="gridProps" />`
|
|
68
120
|
})
|
|
69
121
|
export class GridComponent {
|
|
70
|
-
gridProps = { columns, data, getRowId: (row) => row.id
|
|
122
|
+
gridProps = { columns, data, getRowId: (row) => row.id };
|
|
71
123
|
}
|
|
72
124
|
```
|
|
73
125
|
|
|
74
|
-
<div style={{ marginTop: '0.75rem' }}>
|
|
75
|
-
</div>
|
|
76
|
-
|
|
77
126
|
### Angular Material
|
|
78
127
|
|
|
79
|
-
Angular Material
|
|
128
|
+
If you're already on Angular Material, the grid components match your existing theme automatically.
|
|
80
129
|
|
|
81
130
|
```bash
|
|
82
131
|
npm install @alaarab/ogrid-angular-material @angular/material @angular/cdk
|
|
83
132
|
```
|
|
84
133
|
|
|
85
134
|
```typescript
|
|
86
|
-
// Same
|
|
135
|
+
// Same props — just change the import
|
|
87
136
|
```
|
|
88
137
|
|
|
89
138
|
### PrimeNG
|
|
90
139
|
|
|
91
|
-
PrimeNG
|
|
140
|
+
For teams in the PrimeFaces ecosystem, PrimeNG integration means dialogs, dropdowns, and inputs all look native.
|
|
92
141
|
|
|
93
142
|
```bash
|
|
94
143
|
npm install @alaarab/ogrid-angular-primeng primeng
|
|
95
144
|
```
|
|
96
145
|
|
|
97
146
|
```typescript
|
|
98
|
-
// Same
|
|
147
|
+
// Same props — just change the import
|
|
99
148
|
```
|
|
100
149
|
|
|
101
150
|
---
|
|
102
151
|
|
|
103
152
|
## Vue
|
|
104
153
|
|
|
105
|
-
Composition API composables
|
|
154
|
+
Composition API composables built with `ref()` and `computed()`. All three packages share composables from `@alaarab/ogrid-vue`.
|
|
106
155
|
|
|
107
|
-
### Radix (Headless UI)
|
|
156
|
+
### Radix (Headless UI) — lightweight default
|
|
108
157
|
|
|
109
|
-
|
|
158
|
+
Headless UI Vue components bundled in — no peer dependencies beyond Vue 3. Good starting point for new Vue projects.
|
|
110
159
|
|
|
111
160
|
```bash
|
|
112
161
|
npm install @alaarab/ogrid-vue-radix
|
|
@@ -115,7 +164,7 @@ npm install @alaarab/ogrid-vue-radix
|
|
|
115
164
|
```vue
|
|
116
165
|
<script setup lang="ts">
|
|
117
166
|
|
|
118
|
-
const gridProps = { columns, data, getRowId: (row) => row.id
|
|
167
|
+
const gridProps = { columns, data, getRowId: (row) => row.id };
|
|
119
168
|
</script>
|
|
120
169
|
|
|
121
170
|
<template>
|
|
@@ -123,12 +172,9 @@ const gridProps = { columns, data, getRowId: (row) => row.id, defaultPageSize: 1
|
|
|
123
172
|
</template>
|
|
124
173
|
```
|
|
125
174
|
|
|
126
|
-
<div style={{ marginTop: '0.75rem' }}>
|
|
127
|
-
</div>
|
|
128
|
-
|
|
129
175
|
### Vuetify
|
|
130
176
|
|
|
131
|
-
Vuetify 3
|
|
177
|
+
If your app is built on Vuetify 3, the grid's buttons, selects, and inputs all use Vuetify components and adopt your existing theme.
|
|
132
178
|
|
|
133
179
|
```bash
|
|
134
180
|
npm install @alaarab/ogrid-vue-vuetify vuetify
|
|
@@ -136,13 +182,13 @@ npm install @alaarab/ogrid-vue-vuetify vuetify
|
|
|
136
182
|
|
|
137
183
|
```vue
|
|
138
184
|
<script setup lang="ts">
|
|
139
|
-
// Same
|
|
185
|
+
// Same gridProps — just change the import, wrap in <v-app> for theming
|
|
140
186
|
</script>
|
|
141
187
|
```
|
|
142
188
|
|
|
143
189
|
### PrimeVue
|
|
144
190
|
|
|
145
|
-
PrimeVue 4
|
|
191
|
+
PrimeVue 4 integration for teams already on the PrimeFaces stack.
|
|
146
192
|
|
|
147
193
|
```bash
|
|
148
194
|
npm install @alaarab/ogrid-vue-primevue primevue
|
|
@@ -150,7 +196,7 @@ npm install @alaarab/ogrid-vue-primevue primevue
|
|
|
150
196
|
|
|
151
197
|
```vue
|
|
152
198
|
<script setup lang="ts">
|
|
153
|
-
// Same
|
|
199
|
+
// Same gridProps — just change the import
|
|
154
200
|
</script>
|
|
155
201
|
```
|
|
156
202
|
|
|
@@ -158,7 +204,7 @@ npm install @alaarab/ogrid-vue-primevue primevue
|
|
|
158
204
|
|
|
159
205
|
## Vanilla JS / TypeScript
|
|
160
206
|
|
|
161
|
-
No framework, no virtual DOM
|
|
207
|
+
No framework, no virtual DOM — just a container element and a class constructor. A built-in CSS theme covers light and dark mode with CSS custom properties you can override.
|
|
162
208
|
|
|
163
209
|
```bash
|
|
164
210
|
npm install @alaarab/ogrid-js
|
|
@@ -168,33 +214,33 @@ npm install @alaarab/ogrid-js
|
|
|
168
214
|
|
|
169
215
|
---
|
|
170
216
|
|
|
171
|
-
## At a
|
|
217
|
+
## At a glance
|
|
172
218
|
|
|
173
|
-
| Framework | Design Systems | Reactivity |
|
|
174
|
-
|
|
175
|
-
| **React** 17–19 | Radix *(
|
|
219
|
+
| Framework | Design Systems | Reactivity model |
|
|
220
|
+
|-----------|----------------|-----------------|
|
|
221
|
+
| **React** 17–19 | Radix *(bundled)* · Fluent UI v9 · MUI v7 | Hooks |
|
|
176
222
|
| **Angular** 21 | Radix (CDK) *(default)* · Angular Material · PrimeNG | Signals |
|
|
177
|
-
| **Vue** 3.3+ | Radix (Headless UI) *(
|
|
223
|
+
| **Vue** 3.3+ | Radix (Headless UI) *(bundled)* · Vuetify 3 · PrimeVue 4 | Composition API |
|
|
178
224
|
| **Vanilla JS/TS** | Built-in CSS theme *(zero deps)* | EventEmitter |
|
|
179
225
|
|
|
180
|
-
All 10 packages share the same
|
|
226
|
+
All 10 packages share the same `@alaarab/ogrid-core` and pass the same test suite. Switching design systems is a one-line import change.
|
|
227
|
+
|
|
228
|
+
## Premium inputs (optional)
|
|
181
229
|
|
|
182
|
-
|
|
230
|
+
Each framework has an optional inputs package with advanced cell editors: calendar date pickers, sliders, color pickers, ratings, and tag inputs. They're tree-shakeable and have no impact on bundle size unless you use them.
|
|
183
231
|
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
- **Already using PrimeVue?** → **PrimeVue** — integrates with PrimeFaces ecosystem.
|
|
193
|
-
- **No framework?** → **Vanilla JS** — works anywhere, class-based API, CSS-only theming.
|
|
232
|
+
| Framework | Package |
|
|
233
|
+
|-----------|---------|
|
|
234
|
+
| React | `@alaarab/ogrid-react-inputs` |
|
|
235
|
+
| Angular | `@alaarab/ogrid-angular-inputs` |
|
|
236
|
+
| Vue | `@alaarab/ogrid-vue-inputs` |
|
|
237
|
+
| Vanilla JS | `@alaarab/ogrid-js-inputs` |
|
|
238
|
+
|
|
239
|
+
See [Premium Inputs](../features/premium-inputs) for usage and the full list of available editors.
|
|
194
240
|
|
|
195
241
|
## Related
|
|
196
242
|
|
|
197
|
-
- [
|
|
198
|
-
- [Quick Start](../getting-started/quick-start) — build your first grid
|
|
199
|
-
- [Theming Guide](./theming) — customize colors and styling
|
|
243
|
+
- [Quick Start](../getting-started/quick-start) — get a grid running in 60 seconds
|
|
200
244
|
- [Vanilla JS Guide](../getting-started/vanilla-js) — full JS API documentation
|
|
245
|
+
- [Theming Guide](./theming) — customize colors and styling
|
|
246
|
+
- [Premium Inputs](../features/premium-inputs) — advanced cell editors
|
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: MCP Live Testing Bridge
|
|
3
|
-
description: Connect
|
|
3
|
+
description: Connect your editor (Claude Code, Cursor, etc.) to a running OGrid instance for real-time testing and inspection.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
# MCP Live Testing Bridge
|
|
8
8
|
|
|
9
|
-
The `@alaarab/ogrid-mcp` package includes a **live testing bridge** that lets
|
|
9
|
+
The `@alaarab/ogrid-mcp` package includes a **live testing bridge** that lets MCP-connected editors read your grid's current state, update cell values, apply filters, and navigate pages - all in real time while your dev app is running.
|
|
10
10
|
|
|
11
11
|
## How it works
|
|
12
12
|
|
|
13
13
|
```
|
|
14
|
-
|
|
14
|
+
Editor (MCP client)
|
|
15
15
|
│ MCP tools
|
|
16
16
|
▼
|
|
17
17
|
ogrid-mcp (stdio process + HTTP bridge on :7890)
|
|
18
18
|
│ HTTP polling every 500ms
|
|
19
19
|
▼
|
|
20
20
|
Your dev app (localhost:3001)
|
|
21
|
-
└── connectGridToBridge()
|
|
21
|
+
└── connectGridToBridge() - pushes state + handles commands
|
|
22
22
|
```
|
|
23
23
|
|
|
24
|
-
The bridge is **opt-in** and **dev-only**
|
|
24
|
+
The bridge is **opt-in** and **dev-only** - it only runs when you explicitly start the MCP server with the `--bridge` flag or `OGRID_BRIDGE_PORT` env var.
|
|
25
25
|
|
|
26
26
|
---
|
|
27
27
|
|
|
@@ -60,7 +60,7 @@ export function MyGrid() {
|
|
|
60
60
|
getData: () => data,
|
|
61
61
|
getColumns: () => columns,
|
|
62
62
|
api: apiRef.current ?? undefined,
|
|
63
|
-
// Handle update_cell commands
|
|
63
|
+
// Handle update_cell commands
|
|
64
64
|
onCellUpdate: (rowIndex, columnId, value) => {
|
|
65
65
|
setData(prev =>
|
|
66
66
|
prev.map((row, i) => i === rowIndex ? { ...row, [columnId]: value } : row)
|
|
@@ -164,7 +164,7 @@ if (location.hostname === 'localhost') {
|
|
|
164
164
|
|
|
165
165
|
## MCP tools
|
|
166
166
|
|
|
167
|
-
Once connected, these tools are available
|
|
167
|
+
Once connected, these tools are available via MCP:
|
|
168
168
|
|
|
169
169
|
### `list_grids`
|
|
170
170
|
|
|
@@ -262,14 +262,14 @@ Payload: {"rowIndex":0,"columnId":"salary","value":130000}
|
|
|
262
262
|
|
|
263
263
|
---
|
|
264
264
|
|
|
265
|
-
## Example
|
|
265
|
+
## Example testing session
|
|
266
266
|
|
|
267
|
-
Here's what a typical
|
|
267
|
+
Here's what a typical testing session looks like with the bridge active:
|
|
268
268
|
|
|
269
269
|
```
|
|
270
270
|
Me: The salary column seems wrong. Can you check?
|
|
271
271
|
|
|
272
|
-
|
|
272
|
+
Editor: Let me look at the current grid state.
|
|
273
273
|
[calls get_grid_state gridId="employees" includeData=true maxRows=10]
|
|
274
274
|
|
|
275
275
|
The grid shows salary values like "120" instead of "120000".
|
|
@@ -281,11 +281,11 @@ Let me update a cell to verify:
|
|
|
281
281
|
[calls get_grid_state]
|
|
282
282
|
|
|
283
283
|
The update worked. Row 0 now shows 120000. The issue is in your
|
|
284
|
-
valueGetter
|
|
284
|
+
valueGetter - it's dividing by 1000. Here's the fix: ...
|
|
285
285
|
```
|
|
286
286
|
|
|
287
287
|
---
|
|
288
288
|
|
|
289
289
|
## Security note
|
|
290
290
|
|
|
291
|
-
The bridge server only listens on `127.0.0.1` (localhost) and is designed for local development only. **Never run with `--bridge` in production.** The bridge has no authentication
|
|
291
|
+
The bridge server only listens on `127.0.0.1` (localhost) and is designed for local development only. **Never run with `--bridge` in production.** The bridge has no authentication - anyone on localhost can read your grid data and send commands.
|
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
---
|
|
2
|
-
title:
|
|
3
|
-
description: Connect
|
|
2
|
+
title: Editor Integration (MCP)
|
|
3
|
+
description: Connect your editor to OGrid docs and your live running grid.
|
|
4
4
|
sidebar_position: 1
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
#
|
|
7
|
+
# Editor Integration (MCP)
|
|
8
8
|
|
|
9
|
-
`@alaarab/ogrid-mcp`
|
|
9
|
+
`@alaarab/ogrid-mcp` connects your AI coding assistant to OGrid documentation — so instead of switching tabs to look things up, you can just ask your editor while you code.
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
It also includes a **live testing bridge** that lets your editor read and control an OGrid instance running in your browser in real time.
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
## How it works
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
npm install -g @alaarab/ogrid-mcp
|
|
17
|
-
# or use npx directly (no install needed)
|
|
18
|
-
npx @alaarab/ogrid-mcp
|
|
19
|
-
```
|
|
15
|
+
MCP (Model Context Protocol) is a standard that lets editors like Claude Code and Cursor talk to external tools. When you connect the OGrid MCP server, your editor can:
|
|
20
16
|
|
|
21
|
-
|
|
17
|
+
- Search through OGrid docs while you're writing code
|
|
18
|
+
- Pull up specific API references without leaving your editor
|
|
19
|
+
- Inspect and interact with a running grid during development
|
|
22
20
|
|
|
23
|
-
|
|
21
|
+
You don't need to understand the protocol to use it — just run one command and your editor gains access.
|
|
22
|
+
|
|
23
|
+
## Connect to your editor
|
|
24
24
|
|
|
25
25
|
### Claude Code
|
|
26
26
|
|
|
@@ -28,6 +28,8 @@ npx @alaarab/ogrid-mcp
|
|
|
28
28
|
claude mcp add ogrid -- npx -y @alaarab/ogrid-mcp
|
|
29
29
|
```
|
|
30
30
|
|
|
31
|
+
That's it. The docs are bundled in the package — no config file needed.
|
|
32
|
+
|
|
31
33
|
### Claude Desktop
|
|
32
34
|
|
|
33
35
|
Add to your `claude_desktop_config.json`:
|
|
@@ -58,34 +60,38 @@ Add to your Cursor MCP settings:
|
|
|
58
60
|
|
|
59
61
|
---
|
|
60
62
|
|
|
61
|
-
## What
|
|
63
|
+
## What you can ask
|
|
62
64
|
|
|
63
|
-
Once connected,
|
|
65
|
+
Once connected, you can ask your editor questions like:
|
|
64
66
|
|
|
65
67
|
```
|
|
66
|
-
|
|
68
|
+
How do I set up server-side pagination in React?
|
|
67
69
|
How do I pin columns in Angular Material?
|
|
68
70
|
What's the difference between multiSelect and text filters?
|
|
69
|
-
|
|
70
|
-
Help me migrate from AG Grid to OGrid
|
|
71
|
+
Show me how to use the formula engine in Vue.
|
|
72
|
+
Help me migrate from AG Grid to OGrid.
|
|
71
73
|
```
|
|
72
74
|
|
|
75
|
+
The MCP server searches through the full documentation — features, API references, getting started guides, and code examples — and returns the relevant sections along with your context.
|
|
76
|
+
|
|
73
77
|
---
|
|
74
78
|
|
|
75
|
-
##
|
|
79
|
+
## Available tools
|
|
80
|
+
|
|
81
|
+
These are what the MCP server provides to your editor. You don't call them directly — your editor uses them automatically when you ask questions.
|
|
76
82
|
|
|
77
83
|
### `search_docs`
|
|
78
84
|
|
|
79
|
-
Full-text search across all OGrid documentation.
|
|
85
|
+
Full-text search across all OGrid documentation. Optionally filter by framework or category.
|
|
80
86
|
|
|
81
87
|
```
|
|
82
88
|
search_docs query="server-side data" framework="react"
|
|
83
89
|
```
|
|
84
90
|
|
|
85
91
|
Parameters:
|
|
86
|
-
- `query` (required) —
|
|
87
|
-
- `framework` (optional) —
|
|
88
|
-
- `category` (optional) —
|
|
92
|
+
- `query` (required) — what you're looking for
|
|
93
|
+
- `framework` (optional) — `react`, `angular`, `vue`, or `js`
|
|
94
|
+
- `category` (optional) — `features`, `getting-started`, `guides`, or `api`
|
|
89
95
|
|
|
90
96
|
### `list_docs`
|
|
91
97
|
|
|
@@ -97,7 +103,7 @@ list_docs category="features"
|
|
|
97
103
|
|
|
98
104
|
### `get_docs`
|
|
99
105
|
|
|
100
|
-
Read a full documentation page by path.
|
|
106
|
+
Read a full documentation page by its path.
|
|
101
107
|
|
|
102
108
|
```
|
|
103
109
|
get_docs path="features/filtering"
|
|
@@ -105,7 +111,7 @@ get_docs path="features/filtering"
|
|
|
105
111
|
|
|
106
112
|
### `get_code_example`
|
|
107
113
|
|
|
108
|
-
|
|
114
|
+
Pull code snippets from a doc page, optionally filtered by framework.
|
|
109
115
|
|
|
110
116
|
```
|
|
111
117
|
get_code_example path="features/editing" framework="angular"
|
|
@@ -113,7 +119,7 @@ get_code_example path="features/editing" framework="angular"
|
|
|
113
119
|
|
|
114
120
|
### `detect_version`
|
|
115
121
|
|
|
116
|
-
|
|
122
|
+
Checks which OGrid packages are installed in your project.
|
|
117
123
|
|
|
118
124
|
```
|
|
119
125
|
detect_version path="/path/to/project"
|
|
@@ -123,7 +129,7 @@ detect_version path="/path/to/project"
|
|
|
123
129
|
|
|
124
130
|
## MCP resources
|
|
125
131
|
|
|
126
|
-
Resources can be read
|
|
132
|
+
Resources can be read by your editor without calling a tool explicitly.
|
|
127
133
|
|
|
128
134
|
| Resource | Description |
|
|
129
135
|
|----------|-------------|
|
|
@@ -133,39 +139,34 @@ Resources can be read directly by the AI assistant without calling a tool.
|
|
|
133
139
|
|
|
134
140
|
---
|
|
135
141
|
|
|
136
|
-
## MCP prompts
|
|
137
|
-
|
|
138
|
-
### `migrate-from-ag-grid`
|
|
139
|
-
|
|
140
|
-
Guides the AI through an AG Grid → OGrid migration. Provide your existing AG Grid code and the AI will produce equivalent OGrid code with explanations.
|
|
141
|
-
|
|
142
|
-
---
|
|
143
|
-
|
|
144
142
|
## Live testing bridge
|
|
145
143
|
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
- Read the current grid state (rows, columns, pagination, filters, sort)
|
|
149
|
-
- Update cell values
|
|
150
|
-
- Apply or clear filters
|
|
151
|
-
- Change sort order
|
|
152
|
-
- Navigate pages
|
|
144
|
+
The live bridge lets your editor see and control an OGrid instance running in your browser.
|
|
153
145
|
|
|
154
|
-
|
|
146
|
+
Start the MCP server with the bridge enabled:
|
|
155
147
|
|
|
156
148
|
```bash
|
|
157
|
-
# Start with bridge enabled
|
|
158
149
|
npx @alaarab/ogrid-mcp --bridge
|
|
159
150
|
|
|
160
|
-
#
|
|
151
|
+
# Custom port if needed
|
|
161
152
|
OGRID_BRIDGE_PORT=7890 npx @alaarab/ogrid-mcp
|
|
162
153
|
```
|
|
163
154
|
|
|
155
|
+
Once running, your editor can:
|
|
156
|
+
|
|
157
|
+
- Read the current grid state (visible rows, active filters, sort, pagination)
|
|
158
|
+
- Update individual cell values
|
|
159
|
+
- Apply or clear filters
|
|
160
|
+
- Change sort order
|
|
161
|
+
- Navigate to a specific page
|
|
162
|
+
|
|
163
|
+
See the [Live Testing Bridge guide](./mcp-live-testing) for the full setup and available commands.
|
|
164
|
+
|
|
164
165
|
---
|
|
165
166
|
|
|
166
167
|
## Version
|
|
167
168
|
|
|
168
|
-
The MCP server is published
|
|
169
|
+
The MCP server is published and versioned independently from the grid packages:
|
|
169
170
|
|
|
170
171
|
```bash
|
|
171
172
|
npx @alaarab/ogrid-mcp --version
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* OGrid MCP Bridge Client
|
|
3
3
|
*
|
|
4
4
|
* Include this in your dev app to connect a running OGrid instance to the
|
|
5
|
-
* MCP bridge server, enabling
|
|
5
|
+
* MCP bridge server, enabling MCP-connected editors to read
|
|
6
6
|
* grid state and send test commands in real time.
|
|
7
7
|
*
|
|
8
8
|
* Usage (React):
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
* return () => bridge.disconnect();
|
|
24
24
|
* }, []);
|
|
25
25
|
*
|
|
26
|
-
* This module contains NO Node.js-specific imports
|
|
26
|
+
* This module contains NO Node.js-specific imports - safe to bundle in browsers.
|
|
27
27
|
*/
|
|
28
28
|
interface BridgeColumnInfo {
|
|
29
29
|
columnId: string;
|
|
@@ -69,7 +69,7 @@ interface ConnectGridOptions {
|
|
|
69
69
|
getFilters?: () => Record<string, unknown>;
|
|
70
70
|
/** IOGridApi reference for filter/sort/page commands. */
|
|
71
71
|
api?: BridgeGridApi;
|
|
72
|
-
/** Called when the
|
|
72
|
+
/** Called when the editor sends an update_cell command. */
|
|
73
73
|
onCellUpdate?: (rowIndex: number, columnId: string, value: unknown) => void;
|
|
74
74
|
/** Bridge server URL (default: http://localhost:7890). */
|
|
75
75
|
bridgeUrl?: string;
|
package/dist/esm/index.js
CHANGED
|
@@ -302,7 +302,7 @@ ${formatted}`
|
|
|
302
302
|
};
|
|
303
303
|
}
|
|
304
304
|
const formatted = entries.map(
|
|
305
|
-
(entry) => `- **${entry.title}**
|
|
305
|
+
(entry) => `- **${entry.title}** - ${entry.description}
|
|
306
306
|
Path: \`${entry.path}\` | Resource: \`ogrid://docs/${toResourcePath(entry.path)}\``
|
|
307
307
|
).join("\n");
|
|
308
308
|
const header = category ? `Documentation in "${category}" (${entries.length} pages):` : `All documentation (${entries.length} pages):`;
|
|
@@ -665,7 +665,7 @@ Use \`list_docs\` tool or \`resources/list\` to see available paths.`
|
|
|
665
665
|
"",
|
|
666
666
|
"Then start the MCP server with bridge enabled:",
|
|
667
667
|
" OGRID_BRIDGE_PORT=7890 npx @alaarab/ogrid-mcp",
|
|
668
|
-
"
|
|
668
|
+
" - or - ",
|
|
669
669
|
" npx @alaarab/ogrid-mcp --bridge"
|
|
670
670
|
].join("\n")
|
|
671
671
|
}
|
|
@@ -700,7 +700,7 @@ ${formatted}`
|
|
|
700
700
|
"Get the current state of a connected OGrid instance: displayed rows, columns, sort, filters, pagination, and selection.",
|
|
701
701
|
{
|
|
702
702
|
gridId: z.string().describe("Grid ID as registered by connectGridToBridge()"),
|
|
703
|
-
includeData: z.boolean().optional().describe("Whether to include the full row data (default: false
|
|
703
|
+
includeData: z.boolean().optional().describe("Whether to include the full row data (default: false - shows only summary)"),
|
|
704
704
|
maxRows: z.number().int().min(1).max(200).optional().describe("Max rows to include when includeData=true (default: 20)")
|
|
705
705
|
},
|
|
706
706
|
async ({ gridId, includeData, maxRows }) => {
|
|
@@ -763,11 +763,11 @@ _${state.rowCount - limit} more rows not shown. Increase maxRows to see more._`)
|
|
|
763
763
|
"Send a command to a connected OGrid instance and wait for the result.",
|
|
764
764
|
"",
|
|
765
765
|
"Command types:",
|
|
766
|
-
" update_cell
|
|
767
|
-
" set_filter
|
|
768
|
-
" clear_filters
|
|
769
|
-
' set_sort
|
|
770
|
-
" go_to_page
|
|
766
|
+
" update_cell - { rowIndex: number, columnId: string, value: unknown }",
|
|
767
|
+
" set_filter - { columnId: string, value: string | string[] }",
|
|
768
|
+
" clear_filters - {}",
|
|
769
|
+
' set_sort - { sortModel: [{ columnId, direction: "asc"|"desc" }] }',
|
|
770
|
+
" go_to_page - { page: number }"
|
|
771
771
|
].join("\n"),
|
|
772
772
|
{
|
|
773
773
|
gridId: z.string().describe("Grid ID as registered by connectGridToBridge()"),
|
|
@@ -872,7 +872,7 @@ var BridgeStore = class {
|
|
|
872
872
|
selectedRowIndices: [],
|
|
873
873
|
...existing,
|
|
874
874
|
...partial,
|
|
875
|
-
// gridId must always be the canonical value
|
|
875
|
+
// gridId must always be the canonical value - set last so partial can't override it
|
|
876
876
|
gridId
|
|
877
877
|
});
|
|
878
878
|
if (!this.commandQueues.has(gridId)) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alaarab/ogrid-mcp",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.8",
|
|
4
4
|
"description": "MCP server for OGrid documentation",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -24,7 +24,8 @@
|
|
|
24
24
|
"scripts": {
|
|
25
25
|
"prebuild": "node scripts/bundle-docs.mjs",
|
|
26
26
|
"build": "tsup",
|
|
27
|
-
"dev": "tsup --watch"
|
|
27
|
+
"dev": "tsup --watch",
|
|
28
|
+
"test": "jest"
|
|
28
29
|
},
|
|
29
30
|
"dependencies": {
|
|
30
31
|
"@modelcontextprotocol/sdk": "^1.0.0",
|