@centrali-io/centrali-mcp 4.2.0 → 4.2.1
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 +25 -1
- package/dist/index.js +4 -0
- package/dist/tools/describe.d.ts +10 -0
- package/dist/tools/describe.js +1309 -0
- package/dist/tools/pages.d.ts +3 -0
- package/dist/tools/pages.js +477 -0
- package/package.json +2 -2
- package/src/index.ts +4 -0
- package/src/tools/describe.ts +1622 -0
- package/src/tools/pages.ts +573 -0
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
MCP (Model Context Protocol) server for the Centrali platform. Lets AI assistants (Claude, Cursor, etc.) interact with Centrali workspaces — query data, manage records, search, trigger compute functions, and more.
|
|
4
4
|
|
|
5
|
-
Built on `@centrali-io/centrali-sdk`
|
|
5
|
+
Built on `@centrali-io/centrali-sdk` v4.2.0. Authenticates via service account client credentials.
|
|
6
6
|
|
|
7
7
|
## Setup
|
|
8
8
|
|
|
@@ -33,6 +33,7 @@ Add to your MCP client configuration (e.g., Claude Desktop, Cursor):
|
|
|
33
33
|
| `CENTRALI_CLIENT_ID` | Yes | Service account client ID |
|
|
34
34
|
| `CENTRALI_CLIENT_SECRET` | Yes | Service account client secret |
|
|
35
35
|
| `CENTRALI_WORKSPACE` | Yes | Workspace slug to operate in |
|
|
36
|
+
| `CENTRALI_PAGES_URL` | No | Override pages API URL (default: derived as `api.{domain}/pages`) |
|
|
36
37
|
|
|
37
38
|
## Available Tools
|
|
38
39
|
|
|
@@ -75,6 +76,29 @@ Add to your MCP client configuration (e.g., Claude Desktop, Cursor):
|
|
|
75
76
|
| `list_smart_queries` | List smart queries, optionally filtered by structure |
|
|
76
77
|
| `execute_smart_query` | Execute a smart query with optional variables |
|
|
77
78
|
|
|
79
|
+
### Pages
|
|
80
|
+
| Tool | Description |
|
|
81
|
+
|------|-------------|
|
|
82
|
+
| `list_pages` | List all pages in the workspace |
|
|
83
|
+
| `get_page` | Get a page by ID |
|
|
84
|
+
| `create_page` | Create a new page (list, detail, form, or dashboard) |
|
|
85
|
+
| `update_page` | Update page metadata (name, slug, description) |
|
|
86
|
+
| `delete_page` | Soft-delete a page |
|
|
87
|
+
| `save_page_draft` | Save or update a page's draft definition |
|
|
88
|
+
| `get_page_draft` | Get the current draft of a page |
|
|
89
|
+
| `list_page_versions` | List all versions of a page |
|
|
90
|
+
| `validate_page` | Validate a page draft before publishing |
|
|
91
|
+
| `publish_page` | Publish a page to its runtime URL |
|
|
92
|
+
| `unpublish_page` | Unpublish a page |
|
|
93
|
+
| `set_page_access_policy` | Set access policy (public, authenticated, role-gated) |
|
|
94
|
+
| `get_page_theme` | Get workspace page theme |
|
|
95
|
+
| `set_page_theme` | Set workspace page theme (colors, logo, font) |
|
|
96
|
+
| `get_navigation` | Get workspace navigation config |
|
|
97
|
+
| `set_navigation` | Set workspace navigation config |
|
|
98
|
+
| `delete_navigation` | Delete navigation config (revert to standalone pages) |
|
|
99
|
+
| `generate_starter_pages` | Generate page proposals from structure IDs |
|
|
100
|
+
| `accept_page_proposal` | Accept a generated proposal and create the page |
|
|
101
|
+
|
|
78
102
|
## Resources
|
|
79
103
|
|
|
80
104
|
| URI | Description |
|
package/dist/index.js
CHANGED
|
@@ -21,6 +21,8 @@ const smart_queries_js_1 = require("./tools/smart-queries.js");
|
|
|
21
21
|
const orchestrations_js_1 = require("./tools/orchestrations.js");
|
|
22
22
|
const insights_js_1 = require("./tools/insights.js");
|
|
23
23
|
const validation_js_1 = require("./tools/validation.js");
|
|
24
|
+
const pages_js_1 = require("./tools/pages.js");
|
|
25
|
+
const describe_js_1 = require("./tools/describe.js");
|
|
24
26
|
const structures_js_2 = require("./resources/structures.js");
|
|
25
27
|
function getRequiredEnv(name) {
|
|
26
28
|
const value = process.env[name];
|
|
@@ -56,6 +58,8 @@ function main() {
|
|
|
56
58
|
(0, orchestrations_js_1.registerOrchestrationTools)(server, sdk);
|
|
57
59
|
(0, insights_js_1.registerInsightTools)(server, sdk);
|
|
58
60
|
(0, validation_js_1.registerValidationTools)(server, sdk);
|
|
61
|
+
(0, pages_js_1.registerPageTools)(server, sdk, baseUrl, workspaceId);
|
|
62
|
+
(0, describe_js_1.registerDescribeTools)(server);
|
|
59
63
|
// Register resources
|
|
60
64
|
(0, structures_js_2.registerCollectionResources)(server, sdk);
|
|
61
65
|
(0, structures_js_2.registerStructureResources)(server, sdk);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
2
|
+
/**
|
|
3
|
+
* Introspection tools that teach AI assistants the valid shapes, schemas,
|
|
4
|
+
* and domain concepts for every Centrali API. These tools return static
|
|
5
|
+
* documentation — no network calls, no auth required.
|
|
6
|
+
*
|
|
7
|
+
* Pattern inspired by Supabase MCP (list_tables / get_schemas) and
|
|
8
|
+
* Stripe MCP (search_stripe_documentation).
|
|
9
|
+
*/
|
|
10
|
+
export declare function registerDescribeTools(server: McpServer): void;
|