@norbix.ai/mcp 0.2.1 → 0.4.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/README.md +38 -6
- package/dist/manifest/dtos.api.json +349 -3
- package/dist/manifest/dtos.hub.json +1161 -108
- package/dist/manifest/endpoints.json +68 -6
- package/dist/server.js +68 -2
- package/package.json +2 -2
|
@@ -1646,7 +1646,7 @@
|
|
|
1646
1646
|
"method": "authenticate",
|
|
1647
1647
|
"requestDto": "Authenticate",
|
|
1648
1648
|
"responseDto": "AuthenticateResponse",
|
|
1649
|
-
"path": "/auth",
|
|
1649
|
+
"path": "/v3/auth",
|
|
1650
1650
|
"verb": "POST",
|
|
1651
1651
|
"pathParams": [],
|
|
1652
1652
|
"scope": "unauthenticated"
|
|
@@ -2589,6 +2589,19 @@
|
|
|
2589
2589
|
],
|
|
2590
2590
|
"scope": "project"
|
|
2591
2591
|
},
|
|
2592
|
+
{
|
|
2593
|
+
"surface": "hub",
|
|
2594
|
+
"group": "database",
|
|
2595
|
+
"method": "getDatabaseSchemaIndexStatus",
|
|
2596
|
+
"requestDto": "GetDatabaseSchemaIndexStatus",
|
|
2597
|
+
"responseDto": "GetDatabaseSchemaIndexStatusResponse",
|
|
2598
|
+
"path": "/{version}/database/schemas/{Id}/index-status",
|
|
2599
|
+
"verb": "GET",
|
|
2600
|
+
"pathParams": [
|
|
2601
|
+
"Id"
|
|
2602
|
+
],
|
|
2603
|
+
"scope": "project"
|
|
2604
|
+
},
|
|
2592
2605
|
{
|
|
2593
2606
|
"surface": "hub",
|
|
2594
2607
|
"group": "database",
|
|
@@ -3578,6 +3591,17 @@
|
|
|
3578
3591
|
"pathParams": [],
|
|
3579
3592
|
"scope": "project"
|
|
3580
3593
|
},
|
|
3594
|
+
{
|
|
3595
|
+
"surface": "hub",
|
|
3596
|
+
"group": "files",
|
|
3597
|
+
"method": "getFileById",
|
|
3598
|
+
"requestDto": "GetFileById",
|
|
3599
|
+
"responseDto": "GetFileByIdResponse",
|
|
3600
|
+
"path": "/{version}/files/item/by-id",
|
|
3601
|
+
"verb": "GET",
|
|
3602
|
+
"pathParams": [],
|
|
3603
|
+
"scope": "project"
|
|
3604
|
+
},
|
|
3581
3605
|
{
|
|
3582
3606
|
"surface": "hub",
|
|
3583
3607
|
"group": "files",
|
|
@@ -5852,10 +5876,21 @@
|
|
|
5852
5876
|
{
|
|
5853
5877
|
"surface": "hub",
|
|
5854
5878
|
"group": "oauth",
|
|
5855
|
-
"method": "
|
|
5856
|
-
"requestDto": "
|
|
5857
|
-
"responseDto": "
|
|
5858
|
-
"path": "/{version}/oauth/
|
|
5879
|
+
"method": "oAuthConsent",
|
|
5880
|
+
"requestDto": "OAuthConsentRequest",
|
|
5881
|
+
"responseDto": "OAuthConsentResponse",
|
|
5882
|
+
"path": "/{version}/oauth/consent",
|
|
5883
|
+
"verb": "GET",
|
|
5884
|
+
"pathParams": [],
|
|
5885
|
+
"scope": "project"
|
|
5886
|
+
},
|
|
5887
|
+
{
|
|
5888
|
+
"surface": "hub",
|
|
5889
|
+
"group": "oauth",
|
|
5890
|
+
"method": "oAuthConsentDecision",
|
|
5891
|
+
"requestDto": "OAuthConsentDecisionRequest",
|
|
5892
|
+
"responseDto": "OAuthConsentDecisionResponse",
|
|
5893
|
+
"path": "/{version}/oauth/consent",
|
|
5859
5894
|
"verb": "POST",
|
|
5860
5895
|
"pathParams": [],
|
|
5861
5896
|
"scope": "project"
|
|
@@ -6301,6 +6336,19 @@
|
|
|
6301
6336
|
"pathParams": [],
|
|
6302
6337
|
"scope": "project"
|
|
6303
6338
|
},
|
|
6339
|
+
{
|
|
6340
|
+
"surface": "hub",
|
|
6341
|
+
"group": "scheduler",
|
|
6342
|
+
"method": "getSchedulerTaskRuns",
|
|
6343
|
+
"requestDto": "GetSchedulerTaskRuns",
|
|
6344
|
+
"responseDto": "SchedulerTaskRunsResponse",
|
|
6345
|
+
"path": "/{version}/scheduler/tasks/{id}/runs",
|
|
6346
|
+
"verb": "GET",
|
|
6347
|
+
"pathParams": [
|
|
6348
|
+
"id"
|
|
6349
|
+
],
|
|
6350
|
+
"scope": "project"
|
|
6351
|
+
},
|
|
6304
6352
|
{
|
|
6305
6353
|
"surface": "hub",
|
|
6306
6354
|
"group": "scheduler",
|
|
@@ -6802,7 +6850,7 @@
|
|
|
6802
6850
|
"method": "authenticate",
|
|
6803
6851
|
"requestDto": "Authenticate",
|
|
6804
6852
|
"responseDto": "AuthenticateResponse",
|
|
6805
|
-
"path": "/auth",
|
|
6853
|
+
"path": "/v3/auth",
|
|
6806
6854
|
"verb": "POST",
|
|
6807
6855
|
"pathParams": [],
|
|
6808
6856
|
"scope": "unauthenticated"
|
|
@@ -7185,6 +7233,20 @@
|
|
|
7185
7233
|
],
|
|
7186
7234
|
"scope": "project"
|
|
7187
7235
|
},
|
|
7236
|
+
{
|
|
7237
|
+
"surface": "api",
|
|
7238
|
+
"group": "files",
|
|
7239
|
+
"method": "getFileById",
|
|
7240
|
+
"requestDto": "GetFileByIdRequest",
|
|
7241
|
+
"responseDto": "GetFileByIdResponse",
|
|
7242
|
+
"path": "/{version}/files/{filesIntegrationId}/by-id/{id}",
|
|
7243
|
+
"verb": "GET",
|
|
7244
|
+
"pathParams": [
|
|
7245
|
+
"filesIntegrationId",
|
|
7246
|
+
"id"
|
|
7247
|
+
],
|
|
7248
|
+
"scope": "project"
|
|
7249
|
+
},
|
|
7188
7250
|
{
|
|
7189
7251
|
"surface": "api",
|
|
7190
7252
|
"group": "files",
|
package/dist/server.js
CHANGED
|
@@ -72,7 +72,6 @@ export const curated = [
|
|
|
72
72
|
{ name: 'norbix_get_marketplace_integrations', surface: 'hub', group: 'code', method: 'getMarketplaceIntegrations', description: 'List marketplace integrations of the project.' },
|
|
73
73
|
{ name: 'norbix_save_marketplace_integration', surface: 'hub', group: 'code', method: 'saveMarketplaceIntegration', description: 'Create or update a marketplace integration.' },
|
|
74
74
|
{ name: 'norbix_get_database_schemas', surface: 'hub', group: 'database', method: 'getDatabaseSchemas', description: 'List database collection schemas of the project.' },
|
|
75
|
-
{ name: 'norbix_find_documents', surface: 'api', group: 'database', method: 'find', description: 'Query documents in a database collection (filter, sort, projection, paging).' },
|
|
76
75
|
{ name: 'norbix_get_roles', surface: 'hub', group: 'membership', method: 'getRoles', description: 'List membership roles of the project.' },
|
|
77
76
|
{ name: 'norbix_get_policies', surface: 'hub', group: 'membership', method: 'getPolicies', description: 'List membership policies of the project.' },
|
|
78
77
|
{ name: 'norbix_get_logs', surface: 'hub', group: 'logs', method: 'getLogs', description: 'Query project logs.' },
|
|
@@ -106,6 +105,69 @@ export function buildServer(handle) {
|
|
|
106
105
|
.string()
|
|
107
106
|
.optional()
|
|
108
107
|
.describe('Database integration id; omit for the project default database.');
|
|
108
|
+
const expandReferences = z
|
|
109
|
+
.boolean()
|
|
110
|
+
.optional()
|
|
111
|
+
.describe('true = every reference field (user, role, taxonomy term, collection record, file) comes back as { id, display } — an array of them when the field is multiple. display is the target’s displayField (a term: { title, slug? }); null when the target is missing or your key may not read it. Default false = the stored ids only.');
|
|
112
|
+
server.registerTool('norbix_find_documents', {
|
|
113
|
+
title: 'norbix_find_documents',
|
|
114
|
+
description: 'Query documents in a database collection: MongoDB filter, sort, cursor paging, optional reference expansion. [GET /{version}/database/collections/{collectionName}]',
|
|
115
|
+
inputSchema: {
|
|
116
|
+
collectionName: z.string().describe('Collection (schema) name, e.g. "products".'),
|
|
117
|
+
filter: jsonValue.optional().describe('MongoDB filter (object or JSON string), e.g. { "price": { "$gt": 5 } }.'),
|
|
118
|
+
sortBy: z.string().optional().describe('Field to sort by.'),
|
|
119
|
+
sortOrder: z.number().int().optional().describe('1 = ascending, -1 = descending.'),
|
|
120
|
+
pageSize: z.number().int().min(1).max(1000).optional(),
|
|
121
|
+
startingAfter: z.string().optional().describe('Cursor paging: id of the last document of the previous page.'),
|
|
122
|
+
endingBefore: z.string().optional().describe('Cursor paging: id of the first document of the next page.'),
|
|
123
|
+
expandReferences,
|
|
124
|
+
databaseIntegrationId: integrationId,
|
|
125
|
+
body: z
|
|
126
|
+
.record(z.unknown())
|
|
127
|
+
.optional()
|
|
128
|
+
.describe('Any other FindRequest field (schemaVersion, pagingArgs, …). The named inputs above win over the same key here.'),
|
|
129
|
+
},
|
|
130
|
+
}, async ({ collectionName, filter, sortBy, sortOrder, pageSize, startingAfter, endingBefore, expandReferences: expand, databaseIntegrationId, body }) => {
|
|
131
|
+
try {
|
|
132
|
+
return json(await invoke(handle.client, 'api', 'database', 'find', {
|
|
133
|
+
...(body ?? {}),
|
|
134
|
+
collectionName,
|
|
135
|
+
...(filter !== undefined ? { filter: asJson(filter) } : {}),
|
|
136
|
+
...(sortBy !== undefined ? { sortBy } : {}),
|
|
137
|
+
...(sortOrder !== undefined ? { sortOrder } : {}),
|
|
138
|
+
...(pageSize !== undefined ? { pageSize } : {}),
|
|
139
|
+
...(startingAfter !== undefined ? { startingAfter } : {}),
|
|
140
|
+
...(endingBefore !== undefined ? { endingBefore } : {}),
|
|
141
|
+
...(expand !== undefined ? { expandReferences: expand } : {}),
|
|
142
|
+
...(databaseIntegrationId ? { databaseIntegrationId } : {}),
|
|
143
|
+
}));
|
|
144
|
+
}
|
|
145
|
+
catch (e) {
|
|
146
|
+
return err(e);
|
|
147
|
+
}
|
|
148
|
+
});
|
|
149
|
+
server.registerTool('norbix_find_one_document', {
|
|
150
|
+
title: 'norbix_find_one_document',
|
|
151
|
+
description: 'Get one document by id, with optional reference expansion. [GET /{version}/database/collections/{collectionName}/{id}]',
|
|
152
|
+
inputSchema: {
|
|
153
|
+
collectionName: z.string().describe('Collection (schema) name.'),
|
|
154
|
+
id: z.string().describe('Document id.'),
|
|
155
|
+
expandReferences,
|
|
156
|
+
databaseIntegrationId: integrationId,
|
|
157
|
+
},
|
|
158
|
+
}, async ({ collectionName, id, expandReferences: expand, databaseIntegrationId }) => {
|
|
159
|
+
try {
|
|
160
|
+
return json(await invoke(handle.client, 'api', 'database', 'findOne', {
|
|
161
|
+
collectionName,
|
|
162
|
+
id,
|
|
163
|
+
...(expand !== undefined ? { expandReferences: expand } : {}),
|
|
164
|
+
...(databaseIntegrationId ? { databaseIntegrationId } : {}),
|
|
165
|
+
}));
|
|
166
|
+
}
|
|
167
|
+
catch (e) {
|
|
168
|
+
return err(e);
|
|
169
|
+
}
|
|
170
|
+
});
|
|
109
171
|
server.registerTool('norbix_insert_document', {
|
|
110
172
|
title: 'norbix_insert_document',
|
|
111
173
|
description: 'Insert one document into a database collection. Returns the new id. [POST /{version}/database/collections/{collectionName}]',
|
|
@@ -133,14 +195,18 @@ export function buildServer(handle) {
|
|
|
133
195
|
collectionName: z.string().describe('Collection (schema) name.'),
|
|
134
196
|
id: z.string().describe('Document id.'),
|
|
135
197
|
update: jsonValue.describe('The fields to change as a plain document, e.g. { "field": "value" } (object or JSON string). No $ operators.'),
|
|
198
|
+
arrayFilters: jsonValue
|
|
199
|
+
.optional()
|
|
200
|
+
.describe('MongoDB arrayFilters for positional paths in update, e.g. update { "items.$[i].qty": 2 } with arrayFilters [ { "i.sku": "A1" } ] (array or JSON string).'),
|
|
136
201
|
databaseIntegrationId: integrationId,
|
|
137
202
|
},
|
|
138
|
-
}, async ({ collectionName, id, update, databaseIntegrationId }) => {
|
|
203
|
+
}, async ({ collectionName, id, update, arrayFilters, databaseIntegrationId }) => {
|
|
139
204
|
try {
|
|
140
205
|
return json(await invoke(handle.client, 'api', 'database', 'updateOne', {
|
|
141
206
|
collectionName,
|
|
142
207
|
id,
|
|
143
208
|
update: asJson(update),
|
|
209
|
+
...(arrayFilters !== undefined ? { arrayFilters: asJson(arrayFilters) } : {}),
|
|
144
210
|
...(databaseIntegrationId ? { databaseIntegrationId } : {}),
|
|
145
211
|
}));
|
|
146
212
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@norbix.ai/mcp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "Norbix MCP server — manage projects, integrations, databases, membership, notifications and every other Norbix Hub/API endpoint from Claude, Cursor, VS Code, Windsurf or any MCP client.",
|
|
5
5
|
"author": "UAB Isidos",
|
|
6
6
|
"license": "MIT",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
47
|
"@modelcontextprotocol/sdk": "^1.12.0",
|
|
48
|
-
"@norbix.ai/ts": "^4.
|
|
48
|
+
"@norbix.ai/ts": "^4.17.0",
|
|
49
49
|
"express": "^4.21.2",
|
|
50
50
|
"zod": "^3.24.0"
|
|
51
51
|
},
|