@mandujs/mcp 0.9.45 → 0.10.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 CHANGED
@@ -48,9 +48,23 @@ cd /path/to/project
48
48
  bunx @mandujs/mcp
49
49
  ```
50
50
 
51
+ ### Global Mode
52
+
53
+ Run MCP without project auto-detection (use current directory):
54
+
55
+ ```bash
56
+ bunx @mandujs/mcp --global
57
+ ```
58
+
59
+ Optional: target a specific root directory:
60
+
61
+ ```bash
62
+ bunx @mandujs/mcp --root /path/to/project
63
+ ```
64
+
51
65
  ---
52
66
 
53
- ## Tools (25+)
67
+ ## Tools (28+)
54
68
 
55
69
  ### Spec Management
56
70
 
@@ -104,6 +118,14 @@ bunx @mandujs/mcp
104
118
  | `mandu_watch_status` | Get watcher status |
105
119
  | `mandu_watch_stop` | Stop file watcher |
106
120
 
121
+ ### Project & Dev
122
+
123
+ | Tool | Description |
124
+ |------|-------------|
125
+ | `mandu_init` | Initialize new Mandu project (init + optional install) |
126
+ | `mandu_dev_start` | Start dev server (bun run dev) |
127
+ | `mandu_dev_stop` | Stop dev server |
128
+
107
129
  ### Hydration & Build
108
130
 
109
131
  | Tool | Description |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mandujs/mcp",
3
- "version": "0.9.45",
3
+ "version": "0.10.0",
4
4
  "description": "Mandu MCP Server - Agent-native interface for Mandu framework operations",
5
5
  "type": "module",
6
6
  "main": "./src/index.ts",
package/src/index.ts CHANGED
@@ -1,9 +1,20 @@
1
1
  #!/usr/bin/env bun
2
2
 
3
- import { startServer } from "./server.js";
4
-
5
- // Start the MCP server
6
- startServer().catch((error) => {
7
- console.error("Failed to start Mandu MCP server:", error);
8
- process.exit(1);
9
- });
3
+ import { startServer } from "./server.js";
4
+ import path from "path";
5
+
6
+ // Start the MCP server
7
+ const args = process.argv.slice(2);
8
+ const globalMode = args.includes("--global");
9
+ const rootIndex = args.indexOf("--root");
10
+ const rootArg = rootIndex >= 0 ? args[rootIndex + 1] : undefined;
11
+ const projectRoot = rootArg
12
+ ? path.resolve(rootArg)
13
+ : globalMode
14
+ ? process.cwd()
15
+ : undefined;
16
+
17
+ startServer(projectRoot).catch((error) => {
18
+ console.error("Failed to start Mandu MCP server:", error);
19
+ process.exit(1);
20
+ });
package/src/server.ts CHANGED
@@ -15,11 +15,12 @@ import { transactionTools, transactionToolDefinitions } from "./tools/transactio
15
15
  import { historyTools, historyToolDefinitions } from "./tools/history.js";
16
16
  import { guardTools, guardToolDefinitions } from "./tools/guard.js";
17
17
  import { slotTools, slotToolDefinitions } from "./tools/slot.js";
18
- import { hydrationTools, hydrationToolDefinitions } from "./tools/hydration.js";
19
- import { contractTools, contractToolDefinitions } from "./tools/contract.js";
20
- import { brainTools, brainToolDefinitions } from "./tools/brain.js";
21
- import { runtimeTools, runtimeToolDefinitions } from "./tools/runtime.js";
22
- import { seoTools, seoToolDefinitions } from "./tools/seo.js";
18
+ import { hydrationTools, hydrationToolDefinitions } from "./tools/hydration.js";
19
+ import { contractTools, contractToolDefinitions } from "./tools/contract.js";
20
+ import { brainTools, brainToolDefinitions } from "./tools/brain.js";
21
+ import { runtimeTools, runtimeToolDefinitions } from "./tools/runtime.js";
22
+ import { seoTools, seoToolDefinitions } from "./tools/seo.js";
23
+ import { projectTools, projectToolDefinitions } from "./tools/project.js";
23
24
  import { resourceHandlers, resourceDefinitions } from "./resources/handlers.js";
24
25
  import { findProjectRoot } from "./utils/project.js";
25
26
  import { applyWarningInjection } from "./utils/withWarnings.js";
@@ -52,21 +53,22 @@ export class ManduMcpServer {
52
53
  this.registerResourceHandlers();
53
54
  }
54
55
 
55
- private getAllToolDefinitions(): Tool[] {
56
- return [
57
- ...specToolDefinitions,
58
- ...generateToolDefinitions,
59
- ...transactionToolDefinitions,
60
- ...historyToolDefinitions,
61
- ...guardToolDefinitions,
62
- ...slotToolDefinitions,
63
- ...hydrationToolDefinitions,
64
- ...contractToolDefinitions,
65
- ...brainToolDefinitions,
66
- ...runtimeToolDefinitions,
67
- ...seoToolDefinitions,
68
- ];
69
- }
56
+ private getAllToolDefinitions(): Tool[] {
57
+ return [
58
+ ...specToolDefinitions,
59
+ ...generateToolDefinitions,
60
+ ...transactionToolDefinitions,
61
+ ...historyToolDefinitions,
62
+ ...guardToolDefinitions,
63
+ ...slotToolDefinitions,
64
+ ...hydrationToolDefinitions,
65
+ ...contractToolDefinitions,
66
+ ...brainToolDefinitions,
67
+ ...runtimeToolDefinitions,
68
+ ...seoToolDefinitions,
69
+ ...projectToolDefinitions,
70
+ ];
71
+ }
70
72
 
71
73
  private getAllToolHandlers(): Record<string, (args: Record<string, unknown>) => Promise<unknown>> {
72
74
  const handlers = {
@@ -78,10 +80,11 @@ export class ManduMcpServer {
78
80
  ...slotTools(this.projectRoot),
79
81
  ...hydrationTools(this.projectRoot),
80
82
  ...contractTools(this.projectRoot),
81
- ...brainTools(this.projectRoot, this.server, this.monitor),
82
- ...runtimeTools(this.projectRoot),
83
- ...seoTools(this.projectRoot),
84
- };
83
+ ...brainTools(this.projectRoot, this.server, this.monitor),
84
+ ...runtimeTools(this.projectRoot),
85
+ ...seoTools(this.projectRoot),
86
+ ...projectTools(this.projectRoot, this.server, this.monitor),
87
+ };
85
88
 
86
89
  return applyWarningInjection(handlers);
87
90
  }