Skip to content

Commit aec6bc3

Browse files
authored
@W-20590941 Updates for local dev process (#18)
1 parent 41fe05a commit aec6bc3

File tree

2 files changed

+9
-23
lines changed

2 files changed

+9
-23
lines changed

packages/b2c-dx-mcp/README.md

Lines changed: 8 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -185,56 +185,41 @@ For CLI-based testing:
185185

186186
```bash
187187
# List all tools
188-
npx mcp-inspector --cli node bin/run.js --toolsets all --allow-non-ga-tools --method tools/list
188+
npx mcp-inspector --cli node bin/dev.js --toolsets all --allow-non-ga-tools --method tools/list
189189

190190
# Call a specific tool
191-
npx mcp-inspector --cli node bin/run.js --toolsets all --allow-non-ga-tools \
191+
npx mcp-inspector --cli node bin/dev.js --toolsets all --allow-non-ga-tools \
192192
--method tools/call \
193193
--tool-name sfnext_design_decorator
194194
```
195195

196196
#### 2. IDE Integration
197197

198-
Configure your IDE to use the local server. Choose development mode (no build required) or production mode (requires build).
199-
200-
**Development Mode** (recommended for active development - uses TypeScript source directly):
201-
202-
```json
203-
{
204-
"mcpServers": {
205-
"b2c-dx-local": {
206-
"command": "/full/path/to/packages/b2c-dx-mcp/bin/dev.js",
207-
"args": ["--toolsets", "all", "--allow-non-ga-tools"]
208-
}
209-
}
210-
}
211-
```
212-
213-
**Production Mode** (uses compiled JavaScript - run `pnpm run build` first):
198+
Configure your IDE to use the local MCP server. Add this to your IDE's MCP configuration:
214199

215200
```json
216201
{
217202
"mcpServers": {
218203
"b2c-dx-local": {
219-
"command": "/full/path/to/packages/b2c-dx-mcp/bin/run.js",
220-
"args": ["--toolsets", "all", "--allow-non-ga-tools"]
204+
"command": "node",
205+
"args": ["--conditions", "development", "/full/path/to/packages/b2c-dx-mcp/bin/dev.js", "--toolsets", "all", "--allow-non-ga-tools"]
221206
}
222207
}
223208
}
224209
```
225210

226-
> **Note:** For production mode, run `pnpm run build` after code changes and restart your IDE. Development mode picks up changes automatically.
211+
> **Note:** Restart the MCP server in your IDE to pick up code changes.
227212
228213
#### 3. JSON-RPC via stdin
229214

230215
Send raw MCP protocol messages:
231216

232217
```bash
233218
# List all tools (--allow-non-ga-tools required for placeholder tools)
234-
echo '{"jsonrpc":"2.0","id":1,"method":"tools/list"}' | node bin/run.js --toolsets all --allow-non-ga-tools
219+
echo '{"jsonrpc":"2.0","id":1,"method":"tools/list"}' | node bin/dev.js --toolsets all --allow-non-ga-tools
235220

236221
# Call a specific tool
237-
echo '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"cartridge_deploy","arguments":{}}}' | node bin/run.js --toolsets all --allow-non-ga-tools
222+
echo '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"cartridge_deploy","arguments":{}}}' | node bin/dev.js --toolsets all --allow-non-ga-tools
238223
```
239224

240225
### Configuration

packages/b2c-dx-mcp/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@
6666
"format:check": "prettier --check src",
6767
"preinspect": "pnpm run build",
6868
"inspect": "mcp-inspector node bin/run.js --toolsets all --allow-non-ga-tools",
69+
"inspect:dev": "mcp-inspector node --conditions development bin/dev.js --toolsets all --allow-non-ga-tools",
6970
"pretest": "tsc --noEmit -p test",
7071
"test": "mocha --forbid-only \"test/**/*.test.ts\"",
7172
"posttest": "pnpm run lint",

0 commit comments

Comments
 (0)