Skip to content

Commit 449c9cd

Browse files
MCP READMEs simplified and deduplicated with official documentation
1 parent 474f955 commit 449c9cd

File tree

2 files changed

+116
-382
lines changed

2 files changed

+116
-382
lines changed

packages/b2c-dx-mcp/CONTRIBUTING.md

Lines changed: 49 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,30 @@
22

33
For general contributing guidelines, see the [root CONTRIBUTING.md](../../CONTRIBUTING.md).
44

5+
## Quick Start
6+
7+
```bash
8+
# Install dependencies (from monorepo root)
9+
pnpm install
10+
11+
# Build all packages (builds SDK first, then MCP)
12+
pnpm run build
13+
14+
# Run MCP tests (includes linting)
15+
pnpm --filter @salesforce/b2c-dx-mcp run test
16+
17+
# Format code
18+
pnpm run -r format
19+
20+
# Lint only
21+
pnpm run lint
22+
23+
# Clean MCP build artifacts
24+
pnpm --filter @salesforce/b2c-dx-mcp run clean
25+
```
26+
27+
For package-specific commands (e.g. `inspect:dev`), run from `packages/b2c-dx-mcp` or use `pnpm --filter @salesforce/b2c-dx-mcp run <script>`.
28+
529
## Development Build (Local)
630

731
For local development or testing, use the development build directly:
@@ -32,6 +56,30 @@ pnpm run inspect:dev
3256

3357
This runs TypeScript directly (no build needed). Open the localhost URL shown in the terminal, click **Connect**, then **List Tools** to see available tools.
3458

59+
For CLI-based testing:
60+
61+
```bash
62+
# List all tools
63+
npx mcp-inspector --cli node bin/dev.js --toolsets all --allow-non-ga-tools --method tools/list
64+
65+
# Call a specific tool
66+
npx mcp-inspector --cli node bin/dev.js --toolsets all --allow-non-ga-tools \
67+
--method tools/call \
68+
--tool-name storefront_next_page_designer_decorator
69+
```
70+
71+
### JSON-RPC via stdin
72+
73+
Send raw MCP protocol messages for testing:
74+
75+
```bash
76+
# List all tools (run from packages/b2c-dx-mcp)
77+
echo '{"jsonrpc":"2.0","id":1,"method":"tools/list"}' | node bin/dev.js --toolsets all --allow-non-ga-tools
78+
79+
# Call a specific tool
80+
echo '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"cartridge_deploy","arguments":{}}}' | node bin/dev.js --toolsets all --allow-non-ga-tools
81+
```
82+
3583
### IDE Integration
3684

3785
Configure your IDE to use the local MCP server. Add this to your IDE's MCP configuration:
@@ -53,6 +101,6 @@ Configure your IDE to use the local MCP server. Add this to your IDE's MCP confi
53101

54102
> **Note:** When developing the B2C DX MCP package (`packages/b2c-dx-mcp`), use `node` with the path to `bin/dev.js` in args. Build to latest (`pnpm run build` from the repo root) so changes that require a rebuild are reflected when you run the server.
55103
>
56-
> **Note:** Make sure the script is executable: `chmod +x /full/path/to/packages/b2c-dx-mcp/bin/dev.js`
104+
> **Note:** Make sure the script is executable: `chmod +x /full/path/to/packages/b2c-dx-mcp/bin/dev.js`. The script's shebang (`#!/usr/bin/env -S node --conditions development`) handles Node.js setup automatically.
57105
>
58106
> **Note:** Restart the MCP server in your IDE to pick up code changes.

0 commit comments

Comments
 (0)