@cplace/test-mcp-server 0.1.10 → 0.1.11
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 +113 -29
- package/dist/api.d.ts +1 -0
- package/dist/api.d.ts.map +1 -1
- package/dist/api.js.map +1 -1
- package/dist/conditional-registration.d.ts +4 -0
- package/dist/conditional-registration.d.ts.map +1 -0
- package/dist/conditional-registration.js +40 -0
- package/dist/conditional-registration.js.map +1 -0
- package/dist/index.js +51 -19
- package/dist/index.js.map +1 -1
- package/dist/profiles.d.ts +10 -0
- package/dist/profiles.d.ts.map +1 -0
- package/dist/profiles.js +138 -0
- package/dist/profiles.js.map +1 -0
- package/dist/searchSchema.d.ts +44 -44
- package/dist/tools/change-listeners.d.ts +4 -0
- package/dist/tools/change-listeners.d.ts.map +1 -0
- package/dist/tools/change-listeners.js +98 -0
- package/dist/tools/change-listeners.js.map +1 -0
- package/dist/tools/pages.d.ts.map +1 -1
- package/dist/tools/pages.js +77 -0
- package/dist/tools/pages.js.map +1 -1
- package/dist/tools/ppt-export-profiles.d.ts +4 -0
- package/dist/tools/ppt-export-profiles.d.ts.map +1 -0
- package/dist/tools/ppt-export-profiles.js +242 -0
- package/dist/tools/ppt-export-profiles.js.map +1 -0
- package/dist/tools/search.js +1 -1
- package/dist/tools/search.js.map +1 -1
- package/dist/tools/validators.d.ts +4 -0
- package/dist/tools/validators.d.ts.map +1 -0
- package/dist/tools/validators.js +87 -0
- package/dist/tools/validators.js.map +1 -0
- package/dist/tools/workspace.d.ts.map +1 -1
- package/dist/tools/workspace.js +278 -0
- package/dist/tools/workspace.js.map +1 -1
- package/dist/utils.d.ts +1 -0
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +24 -0
- package/dist/utils.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
# @cplace/mcp-server
|
|
2
2
|
|
|
3
|
-
An MCP (Model Context Protocol) server that provides Claude Desktop with tools to interact with cplace APIs. This server exposes cplace functionality through a comprehensive set of
|
|
3
|
+
An MCP (Model Context Protocol) server that provides Claude Desktop and Claude Code with tools to interact with cplace APIs. This server exposes cplace functionality through a comprehensive set of MCP tools for workspace management, page operations, search capabilities, layout management, type definitions, automation scripts, and version history tracking.
|
|
4
|
+
|
|
5
|
+
The server supports a profile-based tool loading system to optimize LLM context usage by only loading the tools you need.
|
|
4
6
|
|
|
5
7
|
## Installation & Setup
|
|
6
8
|
|
|
7
9
|
### Claude Desktop Installation
|
|
8
|
-
|
|
10
|
+
|
|
11
|
+
#### Basic Setup (All tools)
|
|
12
|
+
By default, all tools are loaded. Add this entry to your Claude Desktop MCP server configuration file:
|
|
9
13
|
|
|
10
14
|
```json
|
|
11
15
|
{
|
|
@@ -22,9 +26,27 @@ Add this entry to your Claude Desktop MCP server configuration file:
|
|
|
22
26
|
}
|
|
23
27
|
```
|
|
24
28
|
|
|
29
|
+
#### With Profile Selection (Recommended for reduced token usage)
|
|
30
|
+
To load only specific tool groups and reduce LLM context usage, add the `--profiles` argument:
|
|
31
|
+
|
|
32
|
+
```json
|
|
33
|
+
{
|
|
34
|
+
"mcpServers": {
|
|
35
|
+
"cplace": {
|
|
36
|
+
"command": "npx",
|
|
37
|
+
"args": ["@cplace/test-mcp-server", "--profiles=layouts"],
|
|
38
|
+
"env": {
|
|
39
|
+
"CPLACE_URL": "https://your-cplace-instance.com/your-tenant/",
|
|
40
|
+
"API_TOKEN": "your-api-token"
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
```
|
|
46
|
+
|
|
25
47
|
### Claude Code Installation
|
|
26
|
-
Use the Claude Code CLI to add the MCP server:
|
|
27
48
|
|
|
49
|
+
#### All tools (default):
|
|
28
50
|
```bash
|
|
29
51
|
claude mcp add cplace \
|
|
30
52
|
--env CPLACE_URL=https://your-cplace-instance.com/your-tenant/ \
|
|
@@ -32,6 +54,14 @@ claude mcp add cplace \
|
|
|
32
54
|
-- npx -y @cplace/test-mcp-server
|
|
33
55
|
```
|
|
34
56
|
|
|
57
|
+
#### With specific profiles (recommended):
|
|
58
|
+
```bash
|
|
59
|
+
claude mcp add cplace \
|
|
60
|
+
--env CPLACE_URL=https://your-cplace-instance.com/your-tenant/ \
|
|
61
|
+
--env API_TOKEN=your-api-token \
|
|
62
|
+
-- npx -y @cplace/test-mcp-server --profiles=layouts
|
|
63
|
+
```
|
|
64
|
+
|
|
35
65
|
Verify the installation:
|
|
36
66
|
```bash
|
|
37
67
|
claude mcp list
|
|
@@ -59,67 +89,121 @@ The `cplace-citizen-ai` repository must be part of the deployment. These plugins
|
|
|
59
89
|
|
|
60
90
|
To change `CPLACE_URL` or `API_TOKEN`, update the values in the Claude Desktop configuration, then close & reopen Claude Desktop.
|
|
61
91
|
|
|
92
|
+
## Profile System
|
|
93
|
+
|
|
94
|
+
The server uses a profile-based tool loading system to optimize LLM context usage. By default, **all tools are loaded** if no profiles are specified. You can restrict to specific tool groups to reduce LLM context usage.
|
|
95
|
+
|
|
96
|
+
### Available Tool Groups
|
|
97
|
+
|
|
98
|
+
| Group | Description | Tools |
|
|
99
|
+
|-------|-------------|-------|
|
|
100
|
+
| **core** | Essential operations | Workspace navigation, page CRUD, search, users, references |
|
|
101
|
+
| **history** | Version history | Track changes and view page history |
|
|
102
|
+
| **layouts** | Widget and layout management | Full dashboard and widget management |
|
|
103
|
+
| **types_write** | Type and attribute management | Create and modify type definitions |
|
|
104
|
+
| **low_code** | Validators and change listeners | Automation scripts and validation |
|
|
105
|
+
| **ppt_export** | PowerPoint export | Create PowerPoint export profiles |
|
|
106
|
+
| **csv_export** | CSV export functionality | Export search results to CSV |
|
|
107
|
+
|
|
108
|
+
### Profile Usage Examples
|
|
109
|
+
|
|
110
|
+
```bash
|
|
111
|
+
# All tools (default - no profiles specified)
|
|
112
|
+
npx @cplace/test-mcp-server
|
|
113
|
+
|
|
114
|
+
# Just core functionality
|
|
115
|
+
npx @cplace/test-mcp-server --profiles=core
|
|
116
|
+
|
|
117
|
+
# Dashboard development (core + layouts)
|
|
118
|
+
npx @cplace/test-mcp-server --profiles=layouts
|
|
119
|
+
|
|
120
|
+
# Type development (core + types_write + low_code)
|
|
121
|
+
npx @cplace/test-mcp-server --profiles=types_write+low_code
|
|
62
122
|
|
|
123
|
+
# Data analysis (core + csv_export + history)
|
|
124
|
+
npx @cplace/test-mcp-server --profiles=csv_export+history
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
### Checking Active Profiles
|
|
128
|
+
|
|
129
|
+
Use the `cplace_profile_info` tool in Claude to see which profiles are currently active and what tools are available.
|
|
63
130
|
|
|
64
131
|
## Available Tools
|
|
65
132
|
|
|
66
|
-
###
|
|
133
|
+
### Core (Always Loaded)
|
|
134
|
+
Essential operations including workspace navigation, page CRUD operations, search, users, and references.
|
|
135
|
+
|
|
67
136
|
- `cplace_list_workspaces` - Get all workspaces with essential properties
|
|
68
137
|
- `cplace_get_workspace_details` - Get comprehensive details about a specific workspace including all metadata, permissions, type definitions, styling, and configuration
|
|
69
138
|
- `cplace_list_types` - List all types available in a workspace
|
|
70
139
|
- `cplace_get_type_datamodel` - Get the datamodel of a type including its attributes, constraints, and permissions
|
|
71
|
-
|
|
72
|
-
### Page Operations
|
|
73
140
|
- `cplace_get_page_by_id` - Get page by ID with full details
|
|
74
141
|
- `cplace_create_page` - Create a new page with specified attributes and content
|
|
75
142
|
- `cplace_update_page` - Update an existing page's attributes, content, or structure
|
|
76
143
|
- `cplace_update_page_attributes` - Lightweight tool for updating only page attributes
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
- `cplace_search_pages` - Search pages of a type in cplace
|
|
144
|
+
- `cplace_delete_page` - Permanently delete a single page (leaf pages only)
|
|
145
|
+
- `cplace_delete_page_with_children` - Permanently delete a page and optionally all its children
|
|
146
|
+
- `cplace_search_pages` - Search pages of a type in cplace with advanced filtering
|
|
80
147
|
- `cplace_search_pages_fulltext` - Make a fulltext search across all pages in cplace
|
|
81
148
|
- `cplace_list_pages_of_type` - List all pages of a specific type in a workspace
|
|
82
|
-
- `cplace_search_pages_csv` - Same as cplace_search_pages but returns results in CSV format
|
|
83
|
-
|
|
84
|
-
### User & Person Management
|
|
85
149
|
- `cplace_get_person_by_id` - Get details about a person including their name and email
|
|
86
150
|
- `cplace_get_person_by_name` - Get details about a person by searching for their name
|
|
87
151
|
- `cplace_get_current_user` - Get information about the currently logged-in user
|
|
88
|
-
|
|
89
|
-
### Reference Management
|
|
90
152
|
- `cplace_get_type_incoming_references` - Get comprehensive information about all incoming references to a specific type definition
|
|
91
153
|
- `cplace_get_page_incoming_references` - Get comprehensive information about all incoming references to a specific page
|
|
154
|
+
- `cplace_profile_info` - Get information about active MCP profiles and available groups
|
|
92
155
|
|
|
93
|
-
###
|
|
94
|
-
|
|
95
|
-
- `cplace_get_page_state_at_timestamp` - Reconstruct and return the complete state of a page as it was at a specific point in time
|
|
96
|
-
- `cplace_get_page_diff` - Compare page states between two timestamps and return the differences
|
|
97
|
-
- `cplace_get_page_changesets_summary` - Get a summary of recent changes for a page (convenience tool for last 7 days by default)
|
|
156
|
+
### Layouts (Profile: layouts)
|
|
157
|
+
Widget and dashboard layout management.
|
|
98
158
|
|
|
99
|
-
### Widget & Layout Management
|
|
100
|
-
|
|
101
|
-
#### Widget Definitions & Discovery
|
|
102
159
|
- `cplace_list_widget_definitions` - Get a list of all available widget definitions with their metadata
|
|
103
160
|
- `cplace_get_widget_definition` - Get detailed information about a specific widget definition including its configuration schema
|
|
104
|
-
|
|
105
|
-
#### Page Layout Operations
|
|
106
161
|
- `cplace_get_page_layout_overview` - Get the high-level layout structure of a page including rows, columns, and widget summaries
|
|
107
162
|
- `cplace_get_widget_details` - Get detailed configuration for a specific widget within a page layout
|
|
108
163
|
- `cplace_add_widget_to_layout` - Add a new widget to a page layout at a specific position
|
|
109
164
|
- `cplace_remove_widget_from_layout` - Remove an existing widget from a page layout
|
|
110
165
|
- `cplace_update_widget_in_layout` - Modify widget configuration or display properties
|
|
111
166
|
- `cplace_move_widget_in_layout` - Relocate a widget to a different position in the layout
|
|
112
|
-
- `cplace_compact_page_layout` - Remove all empty rows from a page layout, compacting it by keeping only rows with widgets
|
|
113
|
-
|
|
114
|
-
#### Embedded Layout Operations
|
|
115
167
|
- `cplace_get_embedded_layout` - Get the widget layout structure of an embedded widget within a container widget
|
|
116
168
|
- `cplace_add_widget_to_embedded_layout` - Add a new widget to an embedded layout within a container widget
|
|
117
169
|
- `cplace_remove_widget_from_embedded_layout` - Remove an existing widget from an embedded layout within a container widget
|
|
118
|
-
|
|
119
|
-
|
|
170
|
+
- `cplace_compact_page_layout` - Remove all empty rows from a page layout, compacting it by keeping only rows with widgets
|
|
171
|
+
- `cplace_add_row_to_page_layout` - Create a new row with specific column layout in a page layout
|
|
120
172
|
- `cplace_get_type_layout` - Get widget layout structure of a specific type definition (default or alternative layout)
|
|
121
173
|
- `cplace_list_type_alternative_layouts` - List all available layouts for a type with usage statistics (default + alternatives)
|
|
122
174
|
|
|
175
|
+
### Types Write (Profile: types_write)
|
|
176
|
+
Type and attribute creation and updates.
|
|
177
|
+
|
|
178
|
+
- `cplace_manage_type_definition` - Create or update type definitions in a workspace with comprehensive configuration options
|
|
179
|
+
- `cplace_manage_attribute_definition` - Create or update attribute definitions within existing type definitions
|
|
180
|
+
|
|
181
|
+
### Low-Code (Profile: low_code)
|
|
182
|
+
Validators and change listeners.
|
|
183
|
+
|
|
184
|
+
- `cplace_get_validator_by_attribute` - Get JavaScript validator script and metadata for a specific attribute
|
|
185
|
+
- `cplace_manage_validator` - Create or update JavaScript validators for attribute definitions
|
|
186
|
+
- `cplace_get_change_listeners_by_type` - Get all JavaScript automation scripts (change listeners) for a type
|
|
187
|
+
- `cplace_manage_change_listener` - Create or update JavaScript automation scripts that execute when specified attributes change
|
|
188
|
+
|
|
189
|
+
### PPT Export (Profile: ppt_export)
|
|
190
|
+
PowerPoint export profiles.
|
|
191
|
+
|
|
192
|
+
- `cplace_manage_ppt_export_profile` - Create or update PowerPoint Export Profiles with comprehensive configuration for page layout, timeline settings, task classes, and visual formatting
|
|
193
|
+
|
|
194
|
+
### History (Profile: history)
|
|
195
|
+
Version history and change tracking.
|
|
196
|
+
|
|
197
|
+
- `cplace_get_page_changesets` - Get all changesets (modification records) for a specific page within an optional time range
|
|
198
|
+
- `cplace_get_page_state_at_timestamp` - Reconstruct and return the complete state of a page as it was at a specific point in time
|
|
199
|
+
- `cplace_get_page_diff` - Compare page states between two timestamps and return the differences
|
|
200
|
+
- `cplace_get_page_changesets_summary` - Get a summary of recent changes for a page (convenience tool for last 7 days by default)
|
|
201
|
+
|
|
202
|
+
### CSV Export (Profile: csv_export)
|
|
203
|
+
CSV export functionality for search results.
|
|
204
|
+
|
|
205
|
+
- `cplace_search_pages_csv` - Export search results to CSV format
|
|
206
|
+
|
|
123
207
|
## Development
|
|
124
208
|
|
|
125
209
|
For development setup, contribution guidelines, and extending the server, see [DEVELOPMENT.md](DEVELOPMENT.md).
|
package/dist/api.d.ts
CHANGED
package/dist/api.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAe,MAAM,YAAY,CAAC;AAIvD,MAAM,WAAW,iBAAiB;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,OAAO,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,OAAO,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,oBAAoB,CAAC;IAClC,IAAI,EAAE,aAAa,CAAC;IACpB,OAAO,EA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,EAAE,GAAG,GACT,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;IAGrB,cAAc,CAAC,CAAC,GAAG,GAAG,EAC1B,QAAQ,EAAE,MAAM,EAChB,MAAM,CAAC,EAAE,KAAK,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,EAC5C,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAC5B,IAAI,CAAC,EAAE,GAAG,GACT,OAAO,CAAC,CAAC,CAAC;CAuFd"}
|
package/dist/api.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.js","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":"AAAA,OAAO,KAAwB,MAAM,OAAO,CAAC;AAE7C,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"api.js","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":"AAAA,OAAO,KAAwB,MAAM,OAAO,CAAC;AAE7C,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAsM9C,MAAM,OAAO,eAAe;IAClB,MAAM,CAAe;IAE7B,YAAY,MAAoB;QAC9B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAkBD,KAAK,CAAC,cAAc,CAClB,QAAgB,EAChB,SAA8C,KAAK,EACnD,MAA4B,EAC5B,IAAU;QAEV,eAAe,CAAC,YAAY,EAAE,UAAU,MAAM,yBAAyB,QAAQ,EAAE,CAAC,CAAC;QACnF,eAAe,CAAC,YAAY,EAAE,WAAW,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;QACnE,eAAe,CAAC,YAAY,EAAE,SAAS,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QAE/D,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,EA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I,CAAC,SAAS,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC;gBAE9F,MAAM,YAAY,GAAG,YAAY,CAAC,KAAK,IAAI,YAAY,CAAC,YAAY,IAAI,eAAe,CAAC;gBACxF,MAAM,IAAI,KAAK,CAAC,cAAc,YAAY,aAAa,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC;YAC7E,CAAC;QACH,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,IAAI,KAAK,CAAC,YAAY,CAAC,KAAK,CAAC,EAAE,CAAC;gBAC9B,eAAe,CAAC,YAAY,EAAE,eAAe,KAAK,CAAC,QAAQ,EAAE,MAAM,MAAM,KAAK,CAAC,QAAQ,EAAE,UAAU,EAAE,CAAC,CAAC;gBACvG,eAAe,CAAC,YAAY,EAAE,kBAAkB,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,QAAQ,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC;gBACxF,eAAe,CAAC,YAAY,EAAE,eAAe,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;gBAC9D,MAAM,IAAI,KAAK,CAAC,mBAAmB,KAAK,CAAC,OAAO,aAAa,KAAK,CAAC,QAAQ,EAAE,MAAM,GAAG,CAAC,CAAC;YAC1F,CAAC;iBAAM,CAAC;gBACN,eAAe,CAAC,YAAY,EAAE,mBAAmB,KAAK,EAAE,CAAC,CAAC;gBAC1D,MAAM,KAAK,CAAC;YACd,CAAC;QACH,CAAC;IACH,CAAC;CACF"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
2
|
+
import { CplaceApiClient } from './api.js';
|
|
3
|
+
export declare function registerActiveTools(server: McpServer, client: CplaceApiClient, activeGroups: Set<string>): void;
|
|
4
|
+
//# sourceMappingURL=conditional-registration.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"conditional-registration.d.ts","sourceRoot":"","sources":["../src/conditional-registration.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAmC3C,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,SAAS,EACjB,MAAM,EAAE,eAAe,EACvB,YAAY,EAAE,GAAG,CAAC,MAAM,CAAC,GACxB,IAAI,CAeN"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { getRequiredModules } from './profiles.js';
|
|
2
|
+
import { debugLogWithTag } from './logger.js';
|
|
3
|
+
import { registerWorkspaceTools } from './tools/workspace.js';
|
|
4
|
+
import { registerPageTools } from './tools/pages.js';
|
|
5
|
+
import { registerSearchTools } from './tools/search.js';
|
|
6
|
+
import { registerUserTools } from './tools/users.js';
|
|
7
|
+
import { registerReferenceTools } from './tools/references.js';
|
|
8
|
+
import { registerWidgetTools } from './tools/widgets.js';
|
|
9
|
+
import { registerTypeLayoutTools } from './tools/type-layouts.js';
|
|
10
|
+
import { registerVersionHistoryTools } from './tools/version-history.js';
|
|
11
|
+
import { registerChangeListenerTools } from './tools/change-listeners.js';
|
|
12
|
+
import { registerValidatorTools } from './tools/validators.js';
|
|
13
|
+
import { registerPPTExportProfileTools } from './tools/ppt-export-profiles.js';
|
|
14
|
+
const MODULE_REGISTRY = {
|
|
15
|
+
'workspace': registerWorkspaceTools,
|
|
16
|
+
'pages': registerPageTools,
|
|
17
|
+
'search': registerSearchTools,
|
|
18
|
+
'users': registerUserTools,
|
|
19
|
+
'references': registerReferenceTools,
|
|
20
|
+
'widgets': registerWidgetTools,
|
|
21
|
+
'type-layouts': registerTypeLayoutTools,
|
|
22
|
+
'version-history': registerVersionHistoryTools,
|
|
23
|
+
'change-listeners': registerChangeListenerTools,
|
|
24
|
+
'validators': registerValidatorTools,
|
|
25
|
+
'ppt-export-profiles': registerPPTExportProfileTools
|
|
26
|
+
};
|
|
27
|
+
export function registerActiveTools(server, client, activeGroups) {
|
|
28
|
+
const requiredModules = getRequiredModules(activeGroups);
|
|
29
|
+
debugLogWithTag('MCP', `Loading modules: ${Array.from(requiredModules).join(', ')}`);
|
|
30
|
+
for (const moduleName of requiredModules) {
|
|
31
|
+
const registrationFunction = MODULE_REGISTRY[moduleName];
|
|
32
|
+
if (registrationFunction) {
|
|
33
|
+
registrationFunction(server, client);
|
|
34
|
+
}
|
|
35
|
+
else {
|
|
36
|
+
debugLogWithTag('MCP', `Warning: No registration function found for module '${moduleName}'`);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=conditional-registration.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"conditional-registration.js","sourceRoot":"","sources":["../src/conditional-registration.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAG9C,OAAO,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAC9D,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAClE,OAAO,EAAE,2BAA2B,EAAE,MAAM,4BAA4B,CAAC;AACzE,OAAO,EAAE,2BAA2B,EAAE,MAAM,6BAA6B,CAAC;AAC1E,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,EAAE,6BAA6B,EAAE,MAAM,gCAAgC,CAAC;AAG/E,MAAM,eAAe,GAAyE;IAC5F,WAAW,EAAE,sBAAsB;IACnC,OAAO,EAAE,iBAAiB;IAC1B,QAAQ,EAAE,mBAAmB;IAC7B,OAAO,EAAE,iBAAiB;IAC1B,YAAY,EAAE,sBAAsB;IACpC,SAAS,EAAE,mBAAmB;IAC9B,cAAc,EAAE,uBAAuB;IACvC,iBAAiB,EAAE,2BAA2B;IAC9C,kBAAkB,EAAE,2BAA2B;IAC/C,YAAY,EAAE,sBAAsB;IACpC,qBAAqB,EAAE,6BAA6B;CACrD,CAAC;AAKF,MAAM,UAAU,mBAAmB,CACjC,MAAiB,EACjB,MAAuB,EACvB,YAAyB;IAGzB,MAAM,eAAe,GAAG,kBAAkB,CAAC,YAAY,CAAC,CAAC;IAEzD,eAAe,CAAC,KAAK,EAAE,oBAAoB,KAAK,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAGrF,KAAK,MAAM,UAAU,IAAI,eAAe,EAAE,CAAC;QACzC,MAAM,oBAAoB,GAAG,eAAe,CAAC,UAAU,CAAC,CAAC;QACzD,IAAI,oBAAoB,EAAE,CAAC;YACzB,oBAAoB,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QACvC,CAAC;aAAM,CAAC;YACN,eAAe,CAAC,KAAK,EAAE,uDAAuD,UAAU,GAAG,CAAC,CAAC;QAC/F,CAAC;IACH,CAAC;AACH,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -3,15 +3,10 @@ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
|
3
3
|
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
4
4
|
import * as dotenv from 'dotenv';
|
|
5
5
|
import { CplaceApiClient } from './api.js';
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { registerSearchTools } from './tools/search.js';
|
|
9
|
-
import { registerUserTools } from './tools/users.js';
|
|
10
|
-
import { registerReferenceTools } from './tools/references.js';
|
|
11
|
-
import { registerWidgetTools } from './tools/widgets.js';
|
|
12
|
-
import { registerTypeLayoutTools } from './tools/type-layouts.js';
|
|
6
|
+
import { parseProfiles, getActiveTools, TOOL_GROUPS } from './profiles.js';
|
|
7
|
+
import { registerActiveTools } from './conditional-registration.js';
|
|
13
8
|
import { registerSystemTools } from './tools/system.js';
|
|
14
|
-
import {
|
|
9
|
+
import { debugLogWithTag } from './logger.js';
|
|
15
10
|
dotenv.config();
|
|
16
11
|
const config = {
|
|
17
12
|
url: process.env.CPLACE_URL || '',
|
|
@@ -19,26 +14,63 @@ const config = {
|
|
|
19
14
|
registerSystemInfoTool: process.env.REGISTER_SYSTEM_INFO_TOOL === 'true' || false,
|
|
20
15
|
};
|
|
21
16
|
const client = new CplaceApiClient(config);
|
|
17
|
+
const activeGroups = parseProfiles(process.argv);
|
|
18
|
+
const activeTools = getActiveTools(activeGroups);
|
|
19
|
+
debugLogWithTag('MCP', '====================================');
|
|
20
|
+
debugLogWithTag('MCP', 'cplace MCP Server Profile Configuration');
|
|
21
|
+
debugLogWithTag('MCP', '====================================');
|
|
22
|
+
debugLogWithTag('MCP', `Active groups: ${Array.from(activeGroups).join(', ')}`);
|
|
23
|
+
debugLogWithTag('MCP', `Total tools to register: ${activeTools.size}`);
|
|
24
|
+
debugLogWithTag('MCP', '====================================');
|
|
22
25
|
const server = new McpServer({
|
|
23
|
-
name:
|
|
26
|
+
name: `cplace-mcp-server`,
|
|
24
27
|
version: "1.0.0"
|
|
25
28
|
});
|
|
26
|
-
|
|
27
|
-
registerPageTools(server, client);
|
|
28
|
-
registerSearchTools(server, client);
|
|
29
|
-
registerUserTools(server, client);
|
|
30
|
-
registerReferenceTools(server, client);
|
|
31
|
-
registerWidgetTools(server, client);
|
|
32
|
-
registerTypeLayoutTools(server, client);
|
|
33
|
-
registerVersionHistoryTools(server, client);
|
|
29
|
+
registerActiveTools(server, client, activeGroups);
|
|
34
30
|
registerSystemTools(server, config);
|
|
31
|
+
server.registerTool("cplace_profile_info", {
|
|
32
|
+
description: "Get information about active MCP profiles and available groups",
|
|
33
|
+
inputSchema: {},
|
|
34
|
+
annotations: { title: "Profile Information" }
|
|
35
|
+
}, async () => {
|
|
36
|
+
const groupDetails = Array.from(activeGroups).map(name => ({
|
|
37
|
+
name,
|
|
38
|
+
description: TOOL_GROUPS[name]?.description || 'Unknown group',
|
|
39
|
+
toolCount: TOOL_GROUPS[name]?.tools.length || 0,
|
|
40
|
+
tools: TOOL_GROUPS[name]?.tools || []
|
|
41
|
+
}));
|
|
42
|
+
const allGroups = Object.entries(TOOL_GROUPS).map(([name, group]) => ({
|
|
43
|
+
name,
|
|
44
|
+
description: group.description,
|
|
45
|
+
toolCount: group.tools.length,
|
|
46
|
+
active: activeGroups.has(name)
|
|
47
|
+
}));
|
|
48
|
+
return {
|
|
49
|
+
content: [{
|
|
50
|
+
type: "text",
|
|
51
|
+
text: JSON.stringify({
|
|
52
|
+
active_groups: Array.from(activeGroups),
|
|
53
|
+
total_active_tools: activeTools.size,
|
|
54
|
+
active_group_details: groupDetails,
|
|
55
|
+
all_available_groups: allGroups,
|
|
56
|
+
usage_examples: {
|
|
57
|
+
minimal: "No --profiles argument (core only)",
|
|
58
|
+
page_editing: "--profiles=pages_write",
|
|
59
|
+
dashboard_dev: "--profiles=pages_write+layouts",
|
|
60
|
+
type_dev: "--profiles=types_write+low_code",
|
|
61
|
+
full_access: "--profiles=all"
|
|
62
|
+
}
|
|
63
|
+
}, null, 2)
|
|
64
|
+
}]
|
|
65
|
+
};
|
|
66
|
+
});
|
|
35
67
|
async function runServer() {
|
|
36
68
|
const transport = new StdioServerTransport();
|
|
37
69
|
await server.connect(transport);
|
|
38
|
-
|
|
70
|
+
debugLogWithTag('MCP', 'Server running on stdio');
|
|
39
71
|
}
|
|
40
72
|
runServer().catch((error) => {
|
|
41
|
-
|
|
73
|
+
debugLogWithTag('MCP', `Fatal error running server: ${error}`);
|
|
42
74
|
process.exit(1);
|
|
43
75
|
});
|
|
44
76
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AACjC,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAC3C,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AACjC,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC3E,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AACpE,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAG9C,MAAM,CAAC,MAAM,EAAE,CAAC;AAGhB,MAAM,MAAM,GAAG;IACb,GAAG,EAAE,OAAO,CAAC,GAAG,CAAC,UAAU,IAAI,EAAE;IACjC,QAAQ,EAAE,OAAO,CAAC,GAAG,CAAC,SAAS,IAAI,EAAE;IACrC,sBAAsB,EAAE,OAAO,CAAC,GAAG,CAAC,yBAAyB,KAAK,MAAM,IAAI,KAAK;CAClF,CAAC;AAGF,MAAM,MAAM,GAAG,IAAI,eAAe,CAAC,MAAM,CAAC,CAAC;AAG3C,MAAM,YAAY,GAAG,aAAa,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;AACjD,MAAM,WAAW,GAA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|
2
|
+
description: string;
|
|
3
|
+
tools: string[];
|
|
4
|
+
modules: string[];
|
|
5
|
+
}
|
|
6
|
+
export declare const TOOL_GROUPS: Record<string, ToolGroup>;
|
|
7
|
+
export declare function parseProfiles(argv: string[]): Set<string>;
|
|
8
|
+
export declare function getActiveTools(activeGroups: Set<string>): Set<string>;
|
|
9
|
+
export declare function getRequiredModules(activeGroups: Set<string>): Set<string>;
|
|
10
|
+
//# sourceMappingURL=profiles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"profiles.d.ts","sourceRoot":"","sources":["../src/profiles.ts"],"names":[],"mappings":"AAOA,MAAM,WAAW,SAAS;IACxB,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB;AAED,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAoFjD,CAAC;AAKF,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,GAAG,CAAC,MAAM,CAAC,CA2CzD;AAKD,wBAAgB,cAAc,CAAC,YAAY,EAAE,GAAG,CAAC,MAAM,CAAC,GAAG,GAAG,CAAC,MAAM,CAAC,CAWrE;AAKD,wBAAgB,kBAAkB,CAAC,YAAY,EAAE,GAAG,CAAC,MAAM,CAAC,GAAG,GAAG,CAAC,MAAM,CAAC,CAWzE"}
|
package/dist/profiles.js
ADDED
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import { debugLogWithTag } from './logger.js';
|
|
2
|
+
export const TOOL_GROUPS = {
|
|
3
|
+
core: {
|
|
4
|
+
description: "Essential operations including workspace navigation, page operations, search, users, and references",
|
|
5
|
+
tools: [
|
|
6
|
+
"cplace_list_workspaces",
|
|
7
|
+
"cplace_get_workspace_details",
|
|
8
|
+
"cplace_list_types",
|
|
9
|
+
"cplace_get_type_datamodel",
|
|
10
|
+
"cplace_get_page_by_id",
|
|
11
|
+
"cplace_create_page",
|
|
12
|
+
"cplace_update_page",
|
|
13
|
+
"cplace_update_page_attributes",
|
|
14
|
+
"cplace_delete_page",
|
|
15
|
+
"cplace_delete_page_with_children",
|
|
16
|
+
"cplace_search_pages",
|
|
17
|
+
"cplace_search_pages_fulltext",
|
|
18
|
+
"cplace_list_pages_of_type",
|
|
19
|
+
"cplace_get_person_by_id",
|
|
20
|
+
"cplace_get_person_by_name",
|
|
21
|
+
"cplace_get_current_user",
|
|
22
|
+
"cplace_get_type_incoming_references",
|
|
23
|
+
"cplace_get_page_incoming_references"
|
|
24
|
+
],
|
|
25
|
+
modules: ['workspace', 'pages', 'search', 'users', 'references']
|
|
26
|
+
},
|
|
27
|
+
csv_export: {
|
|
28
|
+
description: "CSV export functionality",
|
|
29
|
+
tools: ["cplace_search_pages_csv"],
|
|
30
|
+
modules: ['search']
|
|
31
|
+
},
|
|
32
|
+
layouts: {
|
|
33
|
+
description: "Widget and layout management",
|
|
34
|
+
tools: [
|
|
35
|
+
"cplace_list_widget_definitions",
|
|
36
|
+
"cplace_get_widget_definition",
|
|
37
|
+
"cplace_get_page_layout_overview",
|
|
38
|
+
"cplace_get_widget_details",
|
|
39
|
+
"cplace_add_widget_to_layout",
|
|
40
|
+
"cplace_remove_widget_from_layout",
|
|
41
|
+
"cplace_update_widget_in_layout",
|
|
42
|
+
"cplace_move_widget_in_layout",
|
|
43
|
+
"cplace_get_embedded_layout",
|
|
44
|
+
"cplace_add_widget_to_embedded_layout",
|
|
45
|
+
"cplace_remove_widget_from_embedded_layout",
|
|
46
|
+
"cplace_compact_page_layout",
|
|
47
|
+
"cplace_add_row_to_page_layout",
|
|
48
|
+
"cplace_get_type_layout",
|
|
49
|
+
"cplace_list_type_alternative_layouts"
|
|
50
|
+
],
|
|
51
|
+
modules: ['widgets', 'type-layouts']
|
|
52
|
+
},
|
|
53
|
+
types_write: {
|
|
54
|
+
description: "Type and attribute management",
|
|
55
|
+
tools: [
|
|
56
|
+
"cplace_manage_type_definition",
|
|
57
|
+
"cplace_manage_attribute_definition"
|
|
58
|
+
],
|
|
59
|
+
modules: ['workspace']
|
|
60
|
+
},
|
|
61
|
+
low_code: {
|
|
62
|
+
description: "Validators and change listeners",
|
|
63
|
+
tools: [
|
|
64
|
+
"cplace_get_validator_by_attribute",
|
|
65
|
+
"cplace_manage_validator",
|
|
66
|
+
"cplace_get_change_listeners_by_type",
|
|
67
|
+
"cplace_manage_change_listener"
|
|
68
|
+
],
|
|
69
|
+
modules: ['validators', 'change-listeners']
|
|
70
|
+
},
|
|
71
|
+
ppt_export: {
|
|
72
|
+
description: "PowerPoint export",
|
|
73
|
+
tools: ["cplace_manage_ppt_export_profile"],
|
|
74
|
+
modules: ['ppt-export-profiles']
|
|
75
|
+
},
|
|
76
|
+
history: {
|
|
77
|
+
description: "Version history",
|
|
78
|
+
tools: [
|
|
79
|
+
"cplace_get_page_changesets",
|
|
80
|
+
"cplace_get_page_state_at_timestamp",
|
|
81
|
+
"cplace_get_page_diff",
|
|
82
|
+
"cplace_get_page_changesets_summary"
|
|
83
|
+
],
|
|
84
|
+
modules: ['version-history']
|
|
85
|
+
}
|
|
86
|
+
};
|
|
87
|
+
export function parseProfiles(argv) {
|
|
88
|
+
debugLogWithTag('MCP', `parseProfiles called with args: ${JSON.stringify(argv)}`);
|
|
89
|
+
const activeGroups = new Set();
|
|
90
|
+
const profilesArg = argv.find(arg => arg.startsWith('--profiles='));
|
|
91
|
+
if (!profilesArg) {
|
|
92
|
+
Object.keys(TOOL_GROUPS).forEach(group => activeGroups.add(group));
|
|
93
|
+
debugLogWithTag('MCP', 'No profiles specified, loading all tools');
|
|
94
|
+
return activeGroups;
|
|
95
|
+
}
|
|
96
|
+
const profilesValue = profilesArg.split('=')[1];
|
|
97
|
+
if (profilesValue === 'all') {
|
|
98
|
+
Object.keys(TOOL_GROUPS).forEach(group => activeGroups.add(group));
|
|
99
|
+
debugLogWithTag('MCP', 'Loading all groups');
|
|
100
|
+
return activeGroups;
|
|
101
|
+
}
|
|
102
|
+
const groups = profilesValue
|
|
103
|
+
.split('+')
|
|
104
|
+
.map(g => g.trim())
|
|
105
|
+
.filter(g => g);
|
|
106
|
+
activeGroups.add('core');
|
|
107
|
+
for (const group of groups) {
|
|
108
|
+
if (TOOL_GROUPS[group]) {
|
|
109
|
+
activeGroups.add(group);
|
|
110
|
+
}
|
|
111
|
+
else {
|
|
112
|
+
debugLogWithTag('MCP', `Warning: Unknown group '${group}' - skipping`);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
debugLogWithTag('MCP', `Active groups: ${Array.from(activeGroups).join(', ')}`);
|
|
116
|
+
return activeGroups;
|
|
117
|
+
}
|
|
118
|
+
export function getActiveTools(activeGroups) {
|
|
119
|
+
const activeTools = new Set();
|
|
120
|
+
for (const groupName of activeGroups) {
|
|
121
|
+
const group = TOOL_GROUPS[groupName];
|
|
122
|
+
if (group) {
|
|
123
|
+
group.tools.forEach(tool => activeTools.add(tool));
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
return activeTools;
|
|
127
|
+
}
|
|
128
|
+
export function getRequiredModules(activeGroups) {
|
|
129
|
+
const requiredModules = new Set();
|
|
130
|
+
for (const groupName of activeGroups) {
|
|
131
|
+
const group = TOOL_GROUPS[groupName];
|
|
132
|
+
if (group && group.modules) {
|
|
133
|
+
group.modules.forEach(module => requiredModules.add(module));
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
return requiredModules;
|
|
137
|
+
}
|
|
138
|
+
//# sourceMappingURL=profiles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"profiles.js","sourceRoot":"","sources":["../src/profiles.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAQ9C,MAAM,CAAC,MAAM,WAAW,GAA8B;IACpD,IAAI,EAAE;QACJ,WAAW,EAAE,qGAAqG;QAClH,KAAK,EAAE;YACL,wBAAwB;YACxB,8BAA8B;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