@rolexjs/mcp-server 0.2.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.
@@ -0,0 +1,2 @@
1
+
2
+ export { }
package/dist/index.js ADDED
@@ -0,0 +1,255 @@
1
+ #!/usr/bin/env node
2
+
3
+ // src/index.ts
4
+ import { FastMCP } from "fastmcp";
5
+ import { z } from "zod";
6
+ import {
7
+ Rolex,
8
+ Organization,
9
+ INSTRUCTIONS,
10
+ DESC_SOCIETY,
11
+ DESC_ORGANIZATION,
12
+ DESC_GROWUP,
13
+ DESC_IDENTITY,
14
+ DESC_FOCUS,
15
+ DESC_WANT,
16
+ DESC_PLAN,
17
+ DESC_TODO,
18
+ DESC_ACHIEVE,
19
+ DESC_ABANDON,
20
+ DESC_FINISH,
21
+ renderFeatures,
22
+ renderFeature,
23
+ bootstrap
24
+ } from "rolexjs";
25
+ import { LocalPlatform } from "@rolexjs/local-platform";
26
+ import { join } from "path";
27
+ import { homedir } from "os";
28
+ var DEFAULT_ROLEX_DIR = join(homedir(), ".rolex");
29
+ var rolexDir = process.argv[2] || process.env.ROLEX_DIR || DEFAULT_ROLEX_DIR;
30
+ var platform = new LocalPlatform(rolexDir);
31
+ bootstrap(platform);
32
+ var rolex = new Rolex(platform);
33
+ var currentRole = null;
34
+ var server = new FastMCP({
35
+ name: "Rolex MCP Server",
36
+ version: "0.1.0",
37
+ instructions: INSTRUCTIONS
38
+ });
39
+ function requireRole() {
40
+ if (!currentRole) {
41
+ throw new Error("No active role. Call identity(roleId) first to activate a role.");
42
+ }
43
+ return currentRole;
44
+ }
45
+ server.addTool({
46
+ name: "society",
47
+ description: DESC_SOCIETY,
48
+ parameters: z.object({
49
+ operation: z.enum(["born", "found", "directory", "find", "teach"]).describe("The society operation to perform"),
50
+ name: z.string().optional().describe("Role name (born/find/teach) or organization name (found)"),
51
+ source: z.string().optional().describe("Gherkin feature source (born: persona, teach: knowledge)"),
52
+ roleId: z.string().optional().describe("Target role name for teach operation"),
53
+ type: z.enum(["knowledge", "experience", "voice"]).optional().describe("Growth dimension for teach operation"),
54
+ dimensionName: z.string().optional().describe("Name for the knowledge being taught (e.g. 'distributed-systems')")
55
+ }),
56
+ execute: async ({ operation, name, source, roleId, type, dimensionName }) => {
57
+ switch (operation) {
58
+ case "born": {
59
+ if (!name || !source) throw new Error("born requires: name, source");
60
+ const feature = rolex.born(name, source);
61
+ return `Role born: ${feature.name}`;
62
+ }
63
+ case "found": {
64
+ if (!name) throw new Error("found requires: name");
65
+ rolex.found(name);
66
+ return `Organization founded: ${name}`;
67
+ }
68
+ case "directory": {
69
+ const dir = rolex.directory();
70
+ const lines = [];
71
+ for (const entry of dir.organizations) {
72
+ const orgInstance = rolex.find(entry.name);
73
+ const info = orgInstance.info();
74
+ lines.push(`Organization: ${info.name}`);
75
+ for (const role of info.roles) {
76
+ lines.push(` - ${role.name} (team: ${role.team})`);
77
+ }
78
+ }
79
+ return lines.join("\n") || "No organizations found.";
80
+ }
81
+ case "find": {
82
+ if (!name) throw new Error("find requires: name");
83
+ const result = rolex.find(name);
84
+ if (result instanceof Organization) {
85
+ const info = result.info();
86
+ return `Organization: ${info.name} (${info.roles.length} roles)`;
87
+ }
88
+ const features = result.identity();
89
+ return renderFeatures(features);
90
+ }
91
+ case "teach": {
92
+ if (!roleId || !type || !dimensionName || !source)
93
+ throw new Error("teach requires: roleId, type, dimensionName, source");
94
+ const feature = rolex.teach(roleId, type, dimensionName, source);
95
+ return `Taught ${type}: ${feature.name}`;
96
+ }
97
+ default:
98
+ throw new Error(`Unknown society operation: ${operation}`);
99
+ }
100
+ }
101
+ });
102
+ server.addTool({
103
+ name: "organization",
104
+ description: DESC_ORGANIZATION,
105
+ parameters: z.object({
106
+ operation: z.enum(["hire", "fire"]).describe("The organization operation to perform"),
107
+ name: z.string().describe("Role name to hire or fire")
108
+ }),
109
+ execute: async ({ operation, name }) => {
110
+ const dir = rolex.directory();
111
+ const org = rolex.find(dir.organizations[0].name);
112
+ switch (operation) {
113
+ case "hire": {
114
+ org.hire(name);
115
+ return `Role hired: ${name}`;
116
+ }
117
+ case "fire": {
118
+ org.fire(name);
119
+ return `Role fired: ${name}`;
120
+ }
121
+ default:
122
+ throw new Error(`Unknown organization operation: ${operation}`);
123
+ }
124
+ }
125
+ });
126
+ server.addTool({
127
+ name: "identity",
128
+ description: DESC_IDENTITY,
129
+ parameters: z.object({
130
+ roleId: z.string().describe("Role name (e.g. 'sean')")
131
+ }),
132
+ execute: async ({ roleId }) => {
133
+ currentRole = rolex.role(roleId);
134
+ const features = currentRole.identity();
135
+ return renderFeatures(features);
136
+ }
137
+ });
138
+ server.addTool({
139
+ name: "growup",
140
+ description: DESC_GROWUP,
141
+ parameters: z.object({
142
+ type: z.enum(["knowledge", "experience", "voice"]).describe(
143
+ "Growth dimension: knowledge (what I know), experience (what I've lived), voice (how I'm perceived)"
144
+ ),
145
+ name: z.string().describe("Name for this growth (used as filename, e.g. 'distributed-systems')"),
146
+ source: z.string().describe("Gherkin feature source text")
147
+ }),
148
+ execute: async ({ type, name, source }) => {
149
+ const role = requireRole();
150
+ const feature = role.growup(type, name, source);
151
+ return `Growth added (${type}): ${feature.name}`;
152
+ }
153
+ });
154
+ server.addTool({
155
+ name: "focus",
156
+ description: DESC_FOCUS,
157
+ parameters: z.object({}),
158
+ execute: async () => {
159
+ const role = requireRole();
160
+ const goal = role.focus();
161
+ if (!goal) return "No active goal. Use want() to set a new goal.";
162
+ const parts = [renderFeature(goal)];
163
+ if (goal.plan) {
164
+ parts.push(renderFeature(goal.plan));
165
+ }
166
+ for (const task of goal.tasks) {
167
+ parts.push(renderFeature(task));
168
+ }
169
+ return parts.join("\n\n");
170
+ }
171
+ });
172
+ server.addTool({
173
+ name: "want",
174
+ description: DESC_WANT,
175
+ parameters: z.object({
176
+ name: z.string().describe("Goal name (used as directory name, e.g. 'local-platform')"),
177
+ source: z.string().describe("Gherkin feature source text for the goal"),
178
+ testable: z.boolean().optional().default(false).describe("Whether this goal's scenarios should become persistent automated verification")
179
+ }),
180
+ execute: async ({ name, source, testable }) => {
181
+ const role = requireRole();
182
+ const goal = role.want(name, source, testable);
183
+ return `Goal created: ${goal.name}`;
184
+ }
185
+ });
186
+ server.addTool({
187
+ name: "plan",
188
+ description: DESC_PLAN,
189
+ parameters: z.object({
190
+ source: z.string().describe("Gherkin feature source text for the plan")
191
+ }),
192
+ execute: async ({ source }) => {
193
+ const role = requireRole();
194
+ const p = role.plan(source);
195
+ return `Plan created: ${p.name}`;
196
+ }
197
+ });
198
+ server.addTool({
199
+ name: "todo",
200
+ description: DESC_TODO,
201
+ parameters: z.object({
202
+ name: z.string().describe("Task name (used as filename, e.g. 'implement-loader')"),
203
+ source: z.string().describe("Gherkin feature source text for the task"),
204
+ testable: z.boolean().optional().default(false).describe("Whether this task's scenarios should become unit or integration tests")
205
+ }),
206
+ execute: async ({ name, source, testable }) => {
207
+ const role = requireRole();
208
+ const task = role.todo(name, source, testable);
209
+ return `Task created: ${task.name}`;
210
+ }
211
+ });
212
+ server.addTool({
213
+ name: "achieve",
214
+ description: DESC_ACHIEVE,
215
+ parameters: z.object({
216
+ experience: z.string().optional().describe(
217
+ "Optional Gherkin feature source capturing what was learned \u2014 auto-saved as experience growup"
218
+ )
219
+ }),
220
+ execute: async ({ experience }) => {
221
+ const role = requireRole();
222
+ role.achieve(experience);
223
+ return experience ? "Goal achieved. Experience captured." : "Goal achieved.";
224
+ }
225
+ });
226
+ server.addTool({
227
+ name: "abandon",
228
+ description: DESC_ABANDON,
229
+ parameters: z.object({
230
+ experience: z.string().optional().describe(
231
+ "Optional Gherkin feature source capturing what was learned \u2014 auto-saved as experience growup"
232
+ )
233
+ }),
234
+ execute: async ({ experience }) => {
235
+ const role = requireRole();
236
+ role.abandon(experience);
237
+ return experience ? "Goal abandoned. Experience captured." : "Goal abandoned.";
238
+ }
239
+ });
240
+ server.addTool({
241
+ name: "finish",
242
+ description: DESC_FINISH,
243
+ parameters: z.object({
244
+ name: z.string().describe("Task name to mark as done")
245
+ }),
246
+ execute: async ({ name }) => {
247
+ const role = requireRole();
248
+ role.finish(name);
249
+ return `Task finished: ${name}`;
250
+ }
251
+ });
252
+ server.start({
253
+ transportType: "stdio"
254
+ });
255
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/index.ts"],"sourcesContent":["/**\n * @rolexjs/mcp-server\n *\n * MCP server for Rolex — Role-Driven Development.\n *\n * Tools:\n * society — Admin: born, found, directory, find, teach\n * organization — Admin: hire, fire\n * identity — Activate a role\n * growup/focus/want/plan/todo/achieve/abandon/finish — Role lifecycle\n *\n * Usage:\n * rolex-mcp [.rolex-dir]\n */\n\nimport { FastMCP } from \"fastmcp\";\nimport { z } from \"zod\";\nimport {\n Rolex,\n Organization,\n Role,\n INSTRUCTIONS,\n DESC_SOCIETY,\n DESC_ORGANIZATION,\n DESC_GROWUP,\n DESC_IDENTITY,\n DESC_FOCUS,\n DESC_WANT,\n DESC_PLAN,\n DESC_TODO,\n DESC_ACHIEVE,\n DESC_ABANDON,\n DESC_FINISH,\n renderFeatures,\n renderFeature,\n bootstrap,\n} from \"rolexjs\";\nimport { LocalPlatform } from \"@rolexjs/local-platform\";\n\nimport { join } from \"node:path\";\nimport { homedir } from \"node:os\";\n\nconst DEFAULT_ROLEX_DIR = join(homedir(), \".rolex\");\nconst rolexDir = process.argv[2] || process.env.ROLEX_DIR || DEFAULT_ROLEX_DIR;\nconst platform = new LocalPlatform(rolexDir);\nbootstrap(platform);\nconst rolex = new Rolex(platform);\nlet currentRole: Role | null = null;\n\nconst server = new FastMCP({\n name: \"Rolex MCP Server\",\n version: \"0.1.0\",\n instructions: INSTRUCTIONS,\n});\n\n// ========== Helpers ==========\n\nfunction requireRole(): Role {\n if (!currentRole) {\n throw new Error(\"No active role. Call identity(roleId) first to activate a role.\");\n }\n return currentRole;\n}\n\n// ========== Society (folded) ==========\n\nserver.addTool({\n name: \"society\",\n description: DESC_SOCIETY,\n parameters: z.object({\n operation: z\n .enum([\"born\", \"found\", \"directory\", \"find\", \"teach\"])\n .describe(\"The society operation to perform\"),\n name: z\n .string()\n .optional()\n .describe(\"Role name (born/find/teach) or organization name (found)\"),\n source: z\n .string()\n .optional()\n .describe(\"Gherkin feature source (born: persona, teach: knowledge)\"),\n roleId: z.string().optional().describe(\"Target role name for teach operation\"),\n type: z\n .enum([\"knowledge\", \"experience\", \"voice\"])\n .optional()\n .describe(\"Growth dimension for teach operation\"),\n dimensionName: z\n .string()\n .optional()\n .describe(\"Name for the knowledge being taught (e.g. 'distributed-systems')\"),\n }),\n execute: async ({ operation, name, source, roleId, type, dimensionName }) => {\n switch (operation) {\n case \"born\": {\n if (!name || !source) throw new Error(\"born requires: name, source\");\n const feature = rolex.born(name, source);\n return `Role born: ${feature.name}`;\n }\n case \"found\": {\n if (!name) throw new Error(\"found requires: name\");\n rolex.found(name);\n return `Organization founded: ${name}`;\n }\n case \"directory\": {\n const dir = rolex.directory();\n const lines: string[] = [];\n for (const entry of dir.organizations) {\n const orgInstance = rolex.find(entry.name) as Organization;\n const info = orgInstance.info();\n lines.push(`Organization: ${info.name}`);\n for (const role of info.roles) {\n lines.push(` - ${role.name} (team: ${role.team})`);\n }\n }\n return lines.join(\"\\n\") || \"No organizations found.\";\n }\n case \"find\": {\n if (!name) throw new Error(\"find requires: name\");\n const result = rolex.find(name);\n if (result instanceof Organization) {\n const info = result.info();\n return `Organization: ${info.name} (${info.roles.length} roles)`;\n }\n const features = (result as Role).identity();\n return renderFeatures(features);\n }\n case \"teach\": {\n if (!roleId || !type || !dimensionName || !source)\n throw new Error(\"teach requires: roleId, type, dimensionName, source\");\n const feature = rolex.teach(roleId, type, dimensionName, source);\n return `Taught ${type}: ${feature.name}`;\n }\n default:\n throw new Error(`Unknown society operation: ${operation}`);\n }\n },\n});\n\n// ========== Organization (folded) ==========\n\nserver.addTool({\n name: \"organization\",\n description: DESC_ORGANIZATION,\n parameters: z.object({\n operation: z.enum([\"hire\", \"fire\"]).describe(\"The organization operation to perform\"),\n name: z.string().describe(\"Role name to hire or fire\"),\n }),\n execute: async ({ operation, name }) => {\n const dir = rolex.directory();\n const org = rolex.find(dir.organizations[0].name) as Organization;\n\n switch (operation) {\n case \"hire\": {\n org.hire(name);\n return `Role hired: ${name}`;\n }\n case \"fire\": {\n org.fire(name);\n return `Role fired: ${name}`;\n }\n default:\n throw new Error(`Unknown organization operation: ${operation}`);\n }\n },\n});\n\n// ========== Role Activation ==========\n\nserver.addTool({\n name: \"identity\",\n description: DESC_IDENTITY,\n parameters: z.object({\n roleId: z.string().describe(\"Role name (e.g. 'sean')\"),\n }),\n execute: async ({ roleId }) => {\n currentRole = rolex.role(roleId);\n const features = currentRole.identity();\n return renderFeatures(features);\n },\n});\n\n// ========== Role Tools ==========\n\nserver.addTool({\n name: \"growup\",\n description: DESC_GROWUP,\n parameters: z.object({\n type: z\n .enum([\"knowledge\", \"experience\", \"voice\"])\n .describe(\n \"Growth dimension: knowledge (what I know), experience (what I've lived), voice (how I'm perceived)\"\n ),\n name: z\n .string()\n .describe(\"Name for this growth (used as filename, e.g. 'distributed-systems')\"),\n source: z.string().describe(\"Gherkin feature source text\"),\n }),\n execute: async ({ type, name, source }) => {\n const role = requireRole();\n const feature = role.growup(type, name, source);\n return `Growth added (${type}): ${feature.name}`;\n },\n});\n\nserver.addTool({\n name: \"focus\",\n description: DESC_FOCUS,\n parameters: z.object({}),\n execute: async () => {\n const role = requireRole();\n const goal = role.focus();\n if (!goal) return \"No active goal. Use want() to set a new goal.\";\n\n const parts: string[] = [renderFeature(goal)];\n if (goal.plan) {\n parts.push(renderFeature(goal.plan));\n }\n for (const task of goal.tasks) {\n parts.push(renderFeature(task));\n }\n return parts.join(\"\\n\\n\");\n },\n});\n\nserver.addTool({\n name: \"want\",\n description: DESC_WANT,\n parameters: z.object({\n name: z.string().describe(\"Goal name (used as directory name, e.g. 'local-platform')\"),\n source: z.string().describe(\"Gherkin feature source text for the goal\"),\n testable: z\n .boolean()\n .optional()\n .default(false)\n .describe(\"Whether this goal's scenarios should become persistent automated verification\"),\n }),\n execute: async ({ name, source, testable }) => {\n const role = requireRole();\n const goal = role.want(name, source, testable);\n return `Goal created: ${goal.name}`;\n },\n});\n\nserver.addTool({\n name: \"plan\",\n description: DESC_PLAN,\n parameters: z.object({\n source: z.string().describe(\"Gherkin feature source text for the plan\"),\n }),\n execute: async ({ source }) => {\n const role = requireRole();\n const p = role.plan(source);\n return `Plan created: ${p.name}`;\n },\n});\n\nserver.addTool({\n name: \"todo\",\n description: DESC_TODO,\n parameters: z.object({\n name: z.string().describe(\"Task name (used as filename, e.g. 'implement-loader')\"),\n source: z.string().describe(\"Gherkin feature source text for the task\"),\n testable: z\n .boolean()\n .optional()\n .default(false)\n .describe(\"Whether this task's scenarios should become unit or integration tests\"),\n }),\n execute: async ({ name, source, testable }) => {\n const role = requireRole();\n const task = role.todo(name, source, testable);\n return `Task created: ${task.name}`;\n },\n});\n\nserver.addTool({\n name: \"achieve\",\n description: DESC_ACHIEVE,\n parameters: z.object({\n experience: z\n .string()\n .optional()\n .describe(\n \"Optional Gherkin feature source capturing what was learned — auto-saved as experience growup\"\n ),\n }),\n execute: async ({ experience }) => {\n const role = requireRole();\n role.achieve(experience);\n return experience ? \"Goal achieved. Experience captured.\" : \"Goal achieved.\";\n },\n});\n\nserver.addTool({\n name: \"abandon\",\n description: DESC_ABANDON,\n parameters: z.object({\n experience: z\n .string()\n .optional()\n .describe(\n \"Optional Gherkin feature source capturing what was learned — auto-saved as experience growup\"\n ),\n }),\n execute: async ({ experience }) => {\n const role = requireRole();\n role.abandon(experience);\n return experience ? \"Goal abandoned. Experience captured.\" : \"Goal abandoned.\";\n },\n});\n\nserver.addTool({\n name: \"finish\",\n description: DESC_FINISH,\n parameters: z.object({\n name: z.string().describe(\"Task name to mark as done\"),\n }),\n execute: async ({ name }) => {\n const role = requireRole();\n role.finish(name);\n return `Task finished: ${name}`;\n },\n});\n\nserver.start({\n transportType: \"stdio\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ACN,aAAa;AAAA,EACb,YAAY,EAAE,OAAO;AAAA,IACnB,YAAY,EACT,OAAO,EACP,SAAS,EACT;AAAA,MACC;AAAA,IACF;AAAA,EACJ,CAAC;AAAA,EACD,SAAS,OAAO,EAAE,WAAW,MAAM;AACjC,UAAM,OAAO,YAAY;AACzB,SAAK,QAAQ,UAAU;AACvB,WAAO,aAAa,yCAAyC;AAAA,EAC/D;AACF,CAAC;AAED,OAAO,QAAQ;AAAA,EACb,MAAM;AAAA,EACN,aAAa;AAAA,EACb,YAAY,EAAE,OAAO;AAAA,IACnB,MAAM,EAAE,OAAO,EAAE,SAAS,2BAA2B;AAAA,EACvD,CAAC;AAAA,EACD,SAAS,OAAO,EAAE,KAAK,MAAM;AAC3B,UAAM,OAAO,YAAY;AACzB,SAAK,OAAO,IAAI;AAChB,WAAO,kBAAkB,IAAI;AAAA,EAC/B;AACF,CAAC;AAED,OAAO,MAAM;AAAA,EACX,eAAe;AACjB,CAAC;","names":[]}
package/package.json ADDED
@@ -0,0 +1,53 @@
1
+ {
2
+ "name": "@rolexjs/mcp-server",
3
+ "version": "0.2.0",
4
+ "description": "MCP server for Rolex — expose RDD role management as MCP tools",
5
+ "keywords": [
6
+ "rolex",
7
+ "mcp",
8
+ "rdd",
9
+ "role",
10
+ "agent"
11
+ ],
12
+ "repository": {
13
+ "type": "git",
14
+ "url": "git+https://github.com/Deepractice/RoleX.git",
15
+ "directory": "packages/mcp-server"
16
+ },
17
+ "license": "MIT",
18
+ "engines": {
19
+ "node": ">=22.0.0"
20
+ },
21
+ "type": "module",
22
+ "main": "./dist/index.js",
23
+ "types": "./dist/index.d.ts",
24
+ "bin": {
25
+ "rolex-mcp": "./dist/index.js"
26
+ },
27
+ "exports": {
28
+ ".": {
29
+ "types": "./dist/index.d.ts",
30
+ "default": "./dist/index.js"
31
+ }
32
+ },
33
+ "files": [
34
+ "dist"
35
+ ],
36
+ "scripts": {
37
+ "build": "tsup",
38
+ "dev": "bun run src/index.ts",
39
+ "lint": "eslint .",
40
+ "typecheck": "tsc --noEmit",
41
+ "clean": "rm -rf dist"
42
+ },
43
+ "dependencies": {
44
+ "rolexjs": "workspace:*",
45
+ "@rolexjs/local-platform": "workspace:*",
46
+ "fastmcp": "^3.0.0",
47
+ "zod": "^3.25.0"
48
+ },
49
+ "devDependencies": {},
50
+ "publishConfig": {
51
+ "access": "public"
52
+ }
53
+ }