workday-studio-mcp-server 2.0.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.
Potentially problematic release.
This version of workday-studio-mcp-server might be problematic. Click here for more details.
- package/.env.example +40 -0
- package/LICENSE +21 -0
- package/README.md +258 -0
- package/dist/config.d.ts +22 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +67 -0
- package/dist/config.js.map +1 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +84 -0
- package/dist/index.js.map +1 -0
- package/dist/schemas/index.d.ts +473 -0
- package/dist/schemas/index.d.ts.map +1 -0
- package/dist/schemas/index.js +172 -0
- package/dist/schemas/index.js.map +1 -0
- package/dist/tools/copy-file.d.ts +7 -0
- package/dist/tools/copy-file.d.ts.map +1 -0
- package/dist/tools/copy-file.js +82 -0
- package/dist/tools/copy-file.js.map +1 -0
- package/dist/tools/delete-file.d.ts +7 -0
- package/dist/tools/delete-file.d.ts.map +1 -0
- package/dist/tools/delete-file.js +85 -0
- package/dist/tools/delete-file.js.map +1 -0
- package/dist/tools/list-assembly-steps.d.ts +7 -0
- package/dist/tools/list-assembly-steps.d.ts.map +1 -0
- package/dist/tools/list-assembly-steps.js +107 -0
- package/dist/tools/list-assembly-steps.js.map +1 -0
- package/dist/tools/list-files.d.ts +7 -0
- package/dist/tools/list-files.d.ts.map +1 -0
- package/dist/tools/list-files.js +66 -0
- package/dist/tools/list-files.js.map +1 -0
- package/dist/tools/list-integration-params.d.ts +7 -0
- package/dist/tools/list-integration-params.d.ts.map +1 -0
- package/dist/tools/list-integration-params.js +95 -0
- package/dist/tools/list-integration-params.js.map +1 -0
- package/dist/tools/list-projects.d.ts +7 -0
- package/dist/tools/list-projects.d.ts.map +1 -0
- package/dist/tools/list-projects.js +68 -0
- package/dist/tools/list-projects.js.map +1 -0
- package/dist/tools/read-file.d.ts +7 -0
- package/dist/tools/read-file.d.ts.map +1 -0
- package/dist/tools/read-file.js +63 -0
- package/dist/tools/read-file.js.map +1 -0
- package/dist/tools/rename-file.d.ts +7 -0
- package/dist/tools/rename-file.d.ts.map +1 -0
- package/dist/tools/rename-file.js +86 -0
- package/dist/tools/rename-file.js.map +1 -0
- package/dist/tools/search-files.d.ts +7 -0
- package/dist/tools/search-files.d.ts.map +1 -0
- package/dist/tools/search-files.js +110 -0
- package/dist/tools/search-files.js.map +1 -0
- package/dist/tools/validate-xml.d.ts +7 -0
- package/dist/tools/validate-xml.d.ts.map +1 -0
- package/dist/tools/validate-xml.js +69 -0
- package/dist/tools/validate-xml.js.map +1 -0
- package/dist/tools/workspace-tree.d.ts +7 -0
- package/dist/tools/workspace-tree.d.ts.map +1 -0
- package/dist/tools/workspace-tree.js +93 -0
- package/dist/tools/workspace-tree.js.map +1 -0
- package/dist/tools/write-file.d.ts +7 -0
- package/dist/tools/write-file.d.ts.map +1 -0
- package/dist/tools/write-file.js +87 -0
- package/dist/tools/write-file.js.map +1 -0
- package/dist/utils/errors.d.ts +42 -0
- package/dist/utils/errors.d.ts.map +1 -0
- package/dist/utils/errors.js +50 -0
- package/dist/utils/errors.js.map +1 -0
- package/dist/utils/fs.d.ts +17 -0
- package/dist/utils/fs.d.ts.map +1 -0
- package/dist/utils/fs.js +35 -0
- package/dist/utils/fs.js.map +1 -0
- package/dist/utils/logger.d.ts +24 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/logger.js +56 -0
- package/dist/utils/logger.js.map +1 -0
- package/dist/utils/xml.d.ts +14 -0
- package/dist/utils/xml.d.ts.map +1 -0
- package/dist/utils/xml.js +31 -0
- package/dist/utils/xml.js.map +1 -0
- package/package.json +66 -0
package/.env.example
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# ─── Workday Studio MCP Server — Local Environment Configuration ──────────────
|
|
2
|
+
#
|
|
3
|
+
# Copy this file to .env and populate the values before running the server.
|
|
4
|
+
# All logs are written to stderr / a local .log file and NEVER to stdout.
|
|
5
|
+
# stdout is reserved exclusively for MCP JSON-RPC protocol messages.
|
|
6
|
+
#
|
|
7
|
+
# ─────────────────────────────────────────────────────────────────────────────
|
|
8
|
+
|
|
9
|
+
# ── Workspace ────────────────────────────────────────────────────────────────
|
|
10
|
+
# Absolute path to your local Workday Studio Eclipse workspace directory.
|
|
11
|
+
# This is the root folder that contains your Studio integration projects.
|
|
12
|
+
# Example (Windows): C:\Users\YourName\workday-workspace
|
|
13
|
+
# Example (macOS/Linux): /home/yourname/workday-workspace
|
|
14
|
+
WORKDAY_WORKSPACE_PATH=/path/to/your/workday/eclipse/workspace
|
|
15
|
+
|
|
16
|
+
# ── File Operations ──────────────────────────────────────────────────────────
|
|
17
|
+
# Create .bak backup files before overwriting or deleting project resources.
|
|
18
|
+
# Set to "false" to disable (not recommended for production use).
|
|
19
|
+
BACKUP_ON_WRITE=true
|
|
20
|
+
|
|
21
|
+
# ── Logging ──────────────────────────────────────────────────────────────────
|
|
22
|
+
# Log level: error | warn | info | debug
|
|
23
|
+
# "info" is recommended for normal use. "debug" adds verbose MCP event tracing.
|
|
24
|
+
LOG_LEVEL=info
|
|
25
|
+
|
|
26
|
+
# Log output destination:
|
|
27
|
+
# stderr — write structured JSON logs to stderr (default; safe for MCP stdio transport)
|
|
28
|
+
# file — write logs to a local file (see LOG_FILE_PATH below)
|
|
29
|
+
# both — write to both stderr and a file
|
|
30
|
+
LOG_OUTPUT=stderr
|
|
31
|
+
|
|
32
|
+
# Absolute path to the log file (only used when LOG_OUTPUT=file or LOG_OUTPUT=both).
|
|
33
|
+
# Example: /tmp/workday-studio-mcp.log
|
|
34
|
+
LOG_FILE_PATH=workday-studio-mcp.log
|
|
35
|
+
|
|
36
|
+
# ── Server Identity ───────────────────────────────────────────────────────────
|
|
37
|
+
# Override the server name and version reported to MCP clients.
|
|
38
|
+
# These are informational only; they appear in the MCP handshake.
|
|
39
|
+
# SERVER_NAME=workday-studio-mcp-server
|
|
40
|
+
# SERVER_VERSION=2.0.0
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Workday Studio MCP Server Contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
# workday-studio-mcp-server
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/workday-studio-mcp-server)
|
|
4
|
+
[](https://nodejs.org)
|
|
5
|
+
[](./LICENSE)
|
|
6
|
+
|
|
7
|
+
> **Enterprise-grade MCP server that connects AI assistants to your local Workday Studio workspace.**
|
|
8
|
+
|
|
9
|
+
`workday-studio-mcp-server` is a [Model Context Protocol (MCP)](https://modelcontextprotocol.io) server that lets AI assistants such as **Claude Code**, **VS Code**, **Google Antigravity**,or any MCP-compatible client inspect, validate, initialize, and analyze Workday Studio integration projects **directly on your machine**, without copy-pasting XML back and forth.
|
|
10
|
+
|
|
11
|
+
Everything runs **locally**. No network calls. No tenant credentials. No shared state.
|
|
12
|
+
The server only sees the Studio workspace folder you point it at.
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## Overview
|
|
17
|
+
|
|
18
|
+
Workday Studio integrations are built on complex assembly XML, XSL transforms, and custom step types context that is impossible to convey through conversation alone. `workday-studio-mcp-server` bridges that gap by exposing your workspace as structured tools that any AI assistant can call in real time.
|
|
19
|
+
|
|
20
|
+
### Key Capabilities
|
|
21
|
+
|
|
22
|
+
- 🔍 **Inspect** Studio projects and integration files
|
|
23
|
+
- 📝 **Read / write** `assembly.xml` and XSL transforms
|
|
24
|
+
- ✅ **Validate** XML / XSLT well-formedness and Studio-specific rules
|
|
25
|
+
- 🏗️ **Scaffold** new integration projects from scratch
|
|
26
|
+
- 🔬 **Analyze** assembly flows and launch parameters
|
|
27
|
+
- 📋 **Parse** Workday server logs (local files only — no network)
|
|
28
|
+
- 🔄 **Update** sub-flows with auto-backup and validation
|
|
29
|
+
- 🧠 **Plan** integrations via guided design elicitation
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## Features
|
|
34
|
+
|
|
35
|
+
| Category | Tools |
|
|
36
|
+
|---|---|
|
|
37
|
+
| **Navigation** | `list_studio_projects`, `list_project_files`, `read_integration_file`, `search_studio_files`, `get_workspace_structure` |
|
|
38
|
+
| **File management** | `write_integration_file`, `copy_file_from_project`, `rename_file`, `delete_file`, `validate_xml_file` |
|
|
39
|
+
| **Project setup** | `create_studio_project`, `create_xsl_transform` |
|
|
40
|
+
| **Assembly editing** | `list_assembly_steps`, `list_integration_params`, `add_assembly_step`, `update_sub_flow`, `validate_assembly` |
|
|
41
|
+
| **Planning** | `plan_integration` |
|
|
42
|
+
| **Reference** | `get_step_type_reference` |
|
|
43
|
+
| **Diagnostics** | `parse_server_log`|
|
|
44
|
+
| **Knowledge** | `log_learning`|
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
## Requirements
|
|
49
|
+
|
|
50
|
+
- **Node.js 18+** — check with `node --version`
|
|
51
|
+
- **Workday Studio** installed with at least one project in your workspace
|
|
52
|
+
- **An MCP-compatible AI client** — Claude Desktop, Claude Code (CLI), Cursor, or similar
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
## Quick Start
|
|
57
|
+
|
|
58
|
+
### Option 1 — npx (no install needed)
|
|
59
|
+
|
|
60
|
+
Add the following to your MCP client configuration and the package will be downloaded and run automatically via `npx`:
|
|
61
|
+
|
|
62
|
+
```json
|
|
63
|
+
{
|
|
64
|
+
"mcpServers": {
|
|
65
|
+
"workday-studio-mcp-server": {
|
|
66
|
+
"command": "npx",
|
|
67
|
+
"args": ["workday-studio-mcp-server"],
|
|
68
|
+
"env": {
|
|
69
|
+
"WORKDAY_STUDIO_WORKSPACE": "C:\\Users\\YourName\\eclipse-workspace"
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
> **Windows tip:** Use double backslashes `\\` or forward slashes `/` in the path.
|
|
77
|
+
|
|
78
|
+
### Option 2 — Global install
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
npm install -g workday-studio-mcp-server
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
Then reference the installed binary in your MCP config:
|
|
85
|
+
|
|
86
|
+
```json
|
|
87
|
+
{
|
|
88
|
+
"mcpServers": {
|
|
89
|
+
"workday-studio-mcp-server": {
|
|
90
|
+
"command": "workday-studio-mcp-server",
|
|
91
|
+
"env": {
|
|
92
|
+
"WORKDAY_STUDIO_WORKSPACE": "C:\\Users\\YourName\\eclipse-workspace"
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
---
|
|
100
|
+
|
|
101
|
+
## Installation
|
|
102
|
+
|
|
103
|
+
### Install via npm
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
npm install -g workday-studio-mcp-server
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
### Install via npx (zero-install)
|
|
110
|
+
|
|
111
|
+
No installation is required. Simply reference `npx workday-studio-mcp-server` in your MCP configuration as shown in the Quick Start section above.
|
|
112
|
+
|
|
113
|
+
---
|
|
114
|
+
|
|
115
|
+
## Usage Examples
|
|
116
|
+
|
|
117
|
+
### Claude Desktop
|
|
118
|
+
|
|
119
|
+
Edit the Claude Desktop config file:
|
|
120
|
+
|
|
121
|
+
- **Windows:** `%APPDATA%\Claude\claude_desktop_config.json`
|
|
122
|
+
- **macOS:** `~/Library/Application Support/Claude/claude_desktop_config.json`
|
|
123
|
+
|
|
124
|
+
```json
|
|
125
|
+
{
|
|
126
|
+
"mcpServers": {
|
|
127
|
+
"workday-studio-mcp-server": {
|
|
128
|
+
"command": "npx",
|
|
129
|
+
"args": ["workday-studio-mcp-server"],
|
|
130
|
+
"env": {
|
|
131
|
+
"WORKDAY_STUDIO_WORKSPACE": "C:\\Users\\YourName\\eclipse-workspace"
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
Save the file and **restart Claude Desktop**.
|
|
139
|
+
|
|
140
|
+
---
|
|
141
|
+
|
|
142
|
+
### Cursor
|
|
143
|
+
|
|
144
|
+
Open **Cursor Settings → MCP** and add:
|
|
145
|
+
|
|
146
|
+
```json
|
|
147
|
+
{
|
|
148
|
+
"mcpServers": {
|
|
149
|
+
"workday-studio-mcp-server": {
|
|
150
|
+
"command": "npx",
|
|
151
|
+
"args": ["workday-studio-mcp-server"],
|
|
152
|
+
"env": {
|
|
153
|
+
"WORKDAY_STUDIO_WORKSPACE": "C:\\Users\\YourName\\eclipse-workspace"
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
---
|
|
161
|
+
|
|
162
|
+
### Claude Code (CLI)
|
|
163
|
+
|
|
164
|
+
```bash
|
|
165
|
+
claude mcp add workday-studio-mcp-server \
|
|
166
|
+
--command npx \
|
|
167
|
+
--args workday-studio-mcp-server \
|
|
168
|
+
--env WORKDAY_STUDIO_WORKSPACE=/Users/yourname/eclipse-workspace
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
Confirm it is registered:
|
|
172
|
+
|
|
173
|
+
```bash
|
|
174
|
+
claude mcp list
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
---
|
|
178
|
+
|
|
179
|
+
## Environment Variables
|
|
180
|
+
|
|
181
|
+
| Variable | Description | Required |
|
|
182
|
+
|---|---|---|
|
|
183
|
+
| `WORKDAY_STUDIO_WORKSPACE` | Absolute path to your Eclipse / Workday Studio workspace folder | ✅ Yes |
|
|
184
|
+
|
|
185
|
+
---
|
|
186
|
+
|
|
187
|
+
## Tool Reference
|
|
188
|
+
|
|
189
|
+
### Navigation
|
|
190
|
+
|
|
191
|
+
| Tool | Description |
|
|
192
|
+
|---|---|
|
|
193
|
+
| `list_studio_projects` | List all projects in the configured workspace |
|
|
194
|
+
| `list_project_files` | List files in a specific project, with optional extension filter |
|
|
195
|
+
| `read_integration_file` | Read the content of any file in the workspace |
|
|
196
|
+
| `search_studio_files` | Full-text search across all workspace files |
|
|
197
|
+
| `get_workspace_structure` | Return a tree view of the entire workspace |
|
|
198
|
+
|
|
199
|
+
### File Management
|
|
200
|
+
|
|
201
|
+
| Tool | Description |
|
|
202
|
+
|---|---|
|
|
203
|
+
| `write_integration_file` | Write (create or overwrite) a file in the workspace |
|
|
204
|
+
| `copy_file_from_project` | Copy a file between projects |
|
|
205
|
+
| `rename_file` | Rename a file within its project |
|
|
206
|
+
| `delete_file` | Delete a file (with optional backup) |
|
|
207
|
+
| `validate_xml_file` | Validate XML well-formedness of a file |
|
|
208
|
+
|
|
209
|
+
### Project Setup
|
|
210
|
+
|
|
211
|
+
| Tool | Description |
|
|
212
|
+
|---|---|
|
|
213
|
+
| `create_studio_project` | Scaffold a new Workday Studio integration project |
|
|
214
|
+
| `create_xsl_transform` | Create a new XSL transform file with boilerplate |
|
|
215
|
+
|
|
216
|
+
### Assembly Operations
|
|
217
|
+
|
|
218
|
+
| Tool | Description |
|
|
219
|
+
|---|---|
|
|
220
|
+
| `list_assembly_steps` | List all steps in an assembly.xml |
|
|
221
|
+
| `list_integration_params` | List launch parameters defined in an assembly |
|
|
222
|
+
| `add_assembly_step` | Append a new step to an assembly flow |
|
|
223
|
+
| `update_sub_flow` | Surgically replace a sub-flow stub with real implementation |
|
|
224
|
+
| `validate_assembly` | Run Studio-specific validation rules on an assembly |
|
|
225
|
+
|
|
226
|
+
### Reference & Planning
|
|
227
|
+
|
|
228
|
+
| Tool | Description |
|
|
229
|
+
|---|---|
|
|
230
|
+
| `plan_integration` | Guided design elicitation before writing any XML |
|
|
231
|
+
| `get_step_type_reference` | Look up confirmed XML examples for any step type |
|
|
232
|
+
| `lookup_soap_operations` | Look up SOAP operations for Workday web services |
|
|
233
|
+
|
|
234
|
+
### Diagnostics
|
|
235
|
+
|
|
236
|
+
| Tool | Description |
|
|
237
|
+
|---|---|
|
|
238
|
+
| `parse_server_log` | Parse a `server-*.log` from `~/Downloads` into structured events |
|
|
239
|
+
|
|
240
|
+
### Knowledge Capture
|
|
241
|
+
|
|
242
|
+
| Tool | Description |
|
|
243
|
+
|---|---|
|
|
244
|
+
| `log_learning` | Persist a Studio pattern or lesson to the shared knowledge base |
|
|
245
|
+
|
|
246
|
+
---
|
|
247
|
+
|
|
248
|
+
## Security
|
|
249
|
+
|
|
250
|
+
- The server **only reads/writes files inside your configured workspace path** path-traversal attempts are blocked.
|
|
251
|
+
- **No credentials, API keys, or Workday tenant details** are stored or transmitted.
|
|
252
|
+
- The server communicates over **stdio only** no network ports are opened.
|
|
253
|
+
|
|
254
|
+
---
|
|
255
|
+
|
|
256
|
+
## License
|
|
257
|
+
|
|
258
|
+
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
package/dist/config.d.ts
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Server configuration — loaded once at startup from environment variables.
|
|
3
|
+
* Supports both .env file (via dotenv) and direct process.env values.
|
|
4
|
+
*/
|
|
5
|
+
export interface ServerConfig {
|
|
6
|
+
/** Absolute path to the Workday Studio Eclipse workspace. */
|
|
7
|
+
workspacePath: string;
|
|
8
|
+
/** Create .bak backup files before writing/deleting resources. */
|
|
9
|
+
backupOnWrite: boolean;
|
|
10
|
+
/** Winston log level. */
|
|
11
|
+
logLevel: 'error' | 'warn' | 'info' | 'debug';
|
|
12
|
+
/** Where logs are written (never stdout). */
|
|
13
|
+
logOutput: 'stderr' | 'file' | 'both';
|
|
14
|
+
/** Log file path when logOutput includes 'file'. */
|
|
15
|
+
logFilePath: string;
|
|
16
|
+
/** Server name reported in MCP handshake. */
|
|
17
|
+
serverName: string;
|
|
18
|
+
/** Server version reported in MCP handshake. */
|
|
19
|
+
serverVersion: string;
|
|
20
|
+
}
|
|
21
|
+
export declare function getConfig(): ServerConfig;
|
|
22
|
+
//# sourceMappingURL=config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAQH,MAAM,WAAW,YAAY;IAC3B,6DAA6D;IAC7D,aAAa,EAAE,MAAM,CAAC;IACtB,kEAAkE;IAClE,aAAa,EAAE,OAAO,CAAC;IACvB,yBAAyB;IACzB,QAAQ,EAAE,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;IAC9C,6CAA6C;IAC7C,SAAS,EAAE,QAAQ,GAAG,MAAM,GAAG,MAAM,CAAC;IACtC,oDAAoD;IACpD,WAAW,EAAE,MAAM,CAAC;IACpB,6CAA6C;IAC7C,UAAU,EAAE,MAAM,CAAC;IACnB,gDAAgD;IAChD,aAAa,EAAE,MAAM,CAAC;CACvB;AAID,wBAAgB,SAAS,IAAI,YAAY,CAgBxC"}
|
package/dist/config.js
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Server configuration — loaded once at startup from environment variables.
|
|
3
|
+
* Supports both .env file (via dotenv) and direct process.env values.
|
|
4
|
+
*/
|
|
5
|
+
import { config as loadDotenv } from 'dotenv';
|
|
6
|
+
import { existsSync, readFileSync } from 'fs';
|
|
7
|
+
import { resolve } from 'path';
|
|
8
|
+
loadDotenv(); // loads .env if present; silently no-ops if not found
|
|
9
|
+
let _config = null;
|
|
10
|
+
export function getConfig() {
|
|
11
|
+
if (_config)
|
|
12
|
+
return _config;
|
|
13
|
+
const workspacePath = resolveWorkspacePath();
|
|
14
|
+
_config = {
|
|
15
|
+
workspacePath,
|
|
16
|
+
backupOnWrite: (process.env['BACKUP_ON_WRITE'] ?? 'true').toLowerCase() !== 'false',
|
|
17
|
+
logLevel: validateLogLevel(process.env['LOG_LEVEL'] ?? 'info'),
|
|
18
|
+
logOutput: validateLogOutput(process.env['LOG_OUTPUT'] ?? 'stderr'),
|
|
19
|
+
logFilePath: process.env['LOG_FILE_PATH'] ?? 'workday-studio-mcp.log',
|
|
20
|
+
serverName: process.env['SERVER_NAME'] ?? 'workday-studio-mcp-server',
|
|
21
|
+
serverVersion: process.env['SERVER_VERSION'] ?? '2.0.0',
|
|
22
|
+
};
|
|
23
|
+
return _config;
|
|
24
|
+
}
|
|
25
|
+
function resolveWorkspacePath() {
|
|
26
|
+
// 1. Environment variable (highest priority)
|
|
27
|
+
const fromEnv = process.env['WORKDAY_WORKSPACE_PATH'];
|
|
28
|
+
if (fromEnv) {
|
|
29
|
+
const abs = resolve(fromEnv);
|
|
30
|
+
if (!existsSync(abs)) {
|
|
31
|
+
process.stderr.write(JSON.stringify({
|
|
32
|
+
log_level: 'WARN',
|
|
33
|
+
context: 'Config',
|
|
34
|
+
message: `WORKDAY_WORKSPACE_PATH does not exist on disk: ${abs}`,
|
|
35
|
+
}) + '\n');
|
|
36
|
+
}
|
|
37
|
+
return abs;
|
|
38
|
+
}
|
|
39
|
+
// 2. Legacy config.json in cwd
|
|
40
|
+
const legacyConfig = resolve(process.cwd(), 'config.json');
|
|
41
|
+
if (existsSync(legacyConfig)) {
|
|
42
|
+
try {
|
|
43
|
+
const raw = JSON.parse(readFileSync(legacyConfig, 'utf-8'));
|
|
44
|
+
if (typeof raw['workspacePath'] === 'string' && raw['workspacePath']) {
|
|
45
|
+
return resolve(raw['workspacePath']);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
catch {
|
|
49
|
+
// ignore parse errors — fall through to default
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
// 3. Fallback — current working directory (development convenience)
|
|
53
|
+
return resolve(process.cwd());
|
|
54
|
+
}
|
|
55
|
+
function validateLogLevel(val) {
|
|
56
|
+
const allowed = ['error', 'warn', 'info', 'debug'];
|
|
57
|
+
return allowed.includes(val)
|
|
58
|
+
? val
|
|
59
|
+
: 'info';
|
|
60
|
+
}
|
|
61
|
+
function validateLogOutput(val) {
|
|
62
|
+
const allowed = ['stderr', 'file', 'both'];
|
|
63
|
+
return allowed.includes(val)
|
|
64
|
+
? val
|
|
65
|
+
: 'stderr';
|
|
66
|
+
}
|
|
67
|
+
//# sourceMappingURL=config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,IAAI,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAE/B,UAAU,EAAE,CAAC,CAAC,sDAAsD;AAmBpE,IAAI,OAAO,GAAwB,IAAI,CAAC;AAExC,MAAM,UAAU,SAAS;IACvB,IAAI,OAAO;QAAE,OAAO,OAAO,CAAC;IAE5B,MAAM,aAAa,GAAG,oBAAoB,EAAE,CAAC;IAE7C,OAAO,GAAG;QACR,aAAa;QACb,aAAa,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC,IAAI,MAAM,CAAC,CAAC,WAAW,EAAE,KAAK,OAAO;QACnF,QAAQ,EAAE,gBAAgB,CAAC,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC,IAAI,MAAM,CAAC;QAC9D,SAAS,EAAE,iBAAiB,CAAC,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,IAAI,QAAQ,CAAC;QACnE,WAAW,EAAE,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,IAAI,wBAAwB;QACrE,UAAU,EAAE,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,IAAI,2BAA2B;QACrE,aAAa,EAAE,OAAO,CAAC,GAAG,CAAC,gBAAgB,CAAC,IAAI,OAAO;KACxD,CAAC;IAEF,OAAO,OAAO,CAAC;AACjB,CAAC;AAED,SAAS,oBAAoB;IAC3B,6CAA6C;IAC7C,MAAM,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,wBAAwB,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,GAAW;IACpC,MAAM,OAAO,GAAgC,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IACxE,OAAO,OAAO,CAAC,QAAQ,CAAC,GAAgC,CAAC;QACvD,CAAC,CAAE,GAAiC;QACpC,CAAC,CAAC,QAAQ,CAAC;AACf,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Workday Studio MCP Server — main entry point.
|
|
3
|
+
*
|
|
4
|
+
* Transport: StdioServerTransport (stdout = MCP JSON-RPC, stderr = diagnostic logs)
|
|
5
|
+
* All tool registrations are modular; each tool lives in src/tools/.
|
|
6
|
+
*/
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Workday Studio MCP Server — main entry point.
|
|
3
|
+
*
|
|
4
|
+
* Transport: StdioServerTransport (stdout = MCP JSON-RPC, stderr = diagnostic logs)
|
|
5
|
+
* All tool registrations are modular; each tool lives in src/tools/.
|
|
6
|
+
*/
|
|
7
|
+
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
8
|
+
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
9
|
+
import { getConfig } from './config.js';
|
|
10
|
+
import { logger } from './utils/logger.js';
|
|
11
|
+
// ── Tool registrations ────────────────────────────────────────────────────────
|
|
12
|
+
import { register as registerListProjects } from './tools/list-projects.js';
|
|
13
|
+
import { register as registerListFiles } from './tools/list-files.js';
|
|
14
|
+
import { register as registerReadFile } from './tools/read-file.js';
|
|
15
|
+
import { register as registerWriteFile } from './tools/write-file.js';
|
|
16
|
+
import { register as registerSearchFiles } from './tools/search-files.js';
|
|
17
|
+
import { register as registerValidateXml } from './tools/validate-xml.js';
|
|
18
|
+
import { register as registerWorkspaceTree } from './tools/workspace-tree.js';
|
|
19
|
+
import { register as registerRenameFile } from './tools/rename-file.js';
|
|
20
|
+
import { register as registerCopyFile } from './tools/copy-file.js';
|
|
21
|
+
import { register as registerDeleteFile } from './tools/delete-file.js';
|
|
22
|
+
import { register as registerListAssemblySteps } from './tools/list-assembly-steps.js';
|
|
23
|
+
import { register as registerListIntegrationParams } from './tools/list-integration-params.js';
|
|
24
|
+
// ── Global error boundaries ───────────────────────────────────────────────────
|
|
25
|
+
process.on('uncaughtException', (err) => {
|
|
26
|
+
logger.error('Uncaught exception — shutting down', {
|
|
27
|
+
context: 'Server',
|
|
28
|
+
error: err instanceof Error ? err.message : String(err),
|
|
29
|
+
stack: err instanceof Error ? err.stack : undefined,
|
|
30
|
+
});
|
|
31
|
+
process.exit(1);
|
|
32
|
+
});
|
|
33
|
+
process.on('unhandledRejection', (reason) => {
|
|
34
|
+
logger.error('Unhandled promise rejection — shutting down', {
|
|
35
|
+
context: 'Server',
|
|
36
|
+
reason: reason instanceof Error ? reason.message : String(reason),
|
|
37
|
+
});
|
|
38
|
+
process.exit(1);
|
|
39
|
+
});
|
|
40
|
+
// ── Bootstrap ─────────────────────────────────────────────────────────────────
|
|
41
|
+
async function main() {
|
|
42
|
+
const cfg = getConfig();
|
|
43
|
+
logger.info('Starting Workday Studio MCP Server', {
|
|
44
|
+
context: 'Server',
|
|
45
|
+
name: cfg.serverName,
|
|
46
|
+
version: cfg.serverVersion,
|
|
47
|
+
workspace: cfg.workspacePath,
|
|
48
|
+
});
|
|
49
|
+
const server = new McpServer({
|
|
50
|
+
name: cfg.serverName,
|
|
51
|
+
version: cfg.serverVersion,
|
|
52
|
+
});
|
|
53
|
+
// Register all tools
|
|
54
|
+
registerListProjects(server);
|
|
55
|
+
registerListFiles(server);
|
|
56
|
+
registerReadFile(server);
|
|
57
|
+
registerWriteFile(server);
|
|
58
|
+
registerSearchFiles(server);
|
|
59
|
+
registerValidateXml(server);
|
|
60
|
+
registerWorkspaceTree(server);
|
|
61
|
+
registerRenameFile(server);
|
|
62
|
+
registerCopyFile(server);
|
|
63
|
+
registerDeleteFile(server);
|
|
64
|
+
registerListAssemblySteps(server);
|
|
65
|
+
registerListIntegrationParams(server);
|
|
66
|
+
logger.info('All tools registered — connecting stdio transport', {
|
|
67
|
+
context: 'Server',
|
|
68
|
+
toolCount: 12,
|
|
69
|
+
});
|
|
70
|
+
const transport = new StdioServerTransport();
|
|
71
|
+
await server.connect(transport);
|
|
72
|
+
logger.info('Server running — awaiting MCP requests via stdio', {
|
|
73
|
+
context: 'Server',
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
main().catch((err) => {
|
|
77
|
+
logger.error('Fatal startup error', {
|
|
78
|
+
context: 'Server',
|
|
79
|
+
error: err instanceof Error ? err.message : String(err),
|
|
80
|
+
stack: err instanceof Error ? err.stack : undefined,
|
|
81
|
+
});
|
|
82
|
+
process.exit(1);
|
|
83
|
+
});
|
|
84
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AAEjF,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAE3C,iFAAiF;AACjF,OAAO,EAAE,QAAQ,IAAI,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAC5E,OAAO,EAAE,QAAQ,IAAI,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AACtE,OAAO,EAAE,QAAQ,IAAI,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACpE,OAAO,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