@stone-js/mcp-dev 0.8.7 → 0.8.8

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
@@ -38,26 +38,29 @@ import { StoneApp } from '@stone-js/core'
38
38
  export class Application {}
39
39
  ```
40
40
 
41
- Then start the server from your project:
41
+ ### Register it for your agent
42
+
43
+ One command writes `.mcp.json` for you (create or merge, never clobbering your own config):
42
44
 
43
45
  ```bash
44
- stone mcp
46
+ npx stone mcp --init
45
47
  ```
46
48
 
47
- `stone mcp` starts an MCP server over **stdio** and keeps running until you press `Ctrl+C`, exactly
48
- like `stone dev`. It hands the [MCP SDK](https://github.com/modelcontextprotocol) the built-in
49
- framework-knowledge tools and lets the SDK own the protocol and run the handlers these are dev and
50
- knowledge helpers, not your domain, so they do not need to traverse the kernel. Every tool call is
51
- logged to **stderr** (stdout is reserved for the JSON-RPC protocol) so you watch the agent think in
52
- real time.
53
-
54
- ### Register it for your agent
49
+ That is the whole setup: **you never start the server yourself.** It speaks MCP over **stdio**, so the
50
+ transport is the child process's own standard input and output. Your agent reads `.mcp.json`, spawns
51
+ its own `stone mcp` process and performs the handshake; a server you launch in a terminal has no
52
+ channel to your agent and would simply sit there. Restart your agent session after the first
53
+ `--init` so it picks the entry up.
55
54
 
56
- Let `stone mcp` write `.mcp.json` for you (create or merge, never clobbering your own config):
55
+ The command hands the [MCP SDK](https://github.com/modelcontextprotocol) the built-in
56
+ framework-knowledge tools and lets the SDK own the protocol and run the handlers: these are dev and
57
+ knowledge helpers, not your domain, so they do not need to traverse the kernel. Every tool call is
58
+ logged to **stderr** (stdout is reserved for the JSON-RPC protocol), so running `npx stone mcp` in a
59
+ terminal lets you read those logs live. Useful for debugging, never required.
57
60
 
58
- ```bash
59
- stone mcp --init
60
- ```
61
+ > `npx` is used because `@stone-js/cli` is a dev dependency of your project: the bare `stone` command
62
+ > only resolves if you also installed it globally (`npm i -g @stone-js/cli`). Inside a package script
63
+ > the prefix is unnecessary.
61
64
 
62
65
  Or add the entry yourself (Claude Code, Cursor, Claude Desktop, …):
63
66
 
@@ -75,7 +78,6 @@ Or add the entry yourself (Claude Code, Cursor, Claude Desktop, …):
75
78
  |---|---|
76
79
  | `stone_search` | Search the knowledge base (concepts, modules, best-practices, gaps). |
77
80
  | `stone_concept` | Explain a core concept by id (omit id to list them all). |
78
- | `stone_docs` | Links to the authoritative documentation. |
79
81
  | `stone_modules` | The ecosystem modules and what each does. |
80
82
  | `stone_best_practices` | Conventions and anti-patterns, each with its rationale. |
81
83
  | `stone_gaps` | What the framework does not (yet) provide, and what to reach for. |
package/dist/browser.js CHANGED
@@ -1,5 +1,20 @@
1
1
  import { classDecoratorLegacyWrapper } from '@stone-js/core';
2
2
 
3
+ /**
4
+ * Browser stub of `@McpDev()`: a no-op.
5
+ *
6
+ * The dev MCP server (`stone mcp`) is a Node-only, development concern. Stubbing the decorator for
7
+ * the browser keeps an isomorphic app compiling and inert there, without dragging the CLI command,
8
+ * the MCP SDK server, or `node:fs` into the browser bundle (which would break a SPA). The real
9
+ * decorator lives in the Node build.
10
+ *
11
+ * @param _options - Ignored in the browser.
12
+ * @returns A no-op class decorator.
13
+ */
14
+ const McpDev = (_options = {}) => {
15
+ return classDecoratorLegacyWrapper((_target, _context) => { });
16
+ };
17
+
3
18
  /**
4
19
  * Browser stub of the MCP dev blueprint.
5
20
  *
@@ -19,19 +34,4 @@ function defineMcpDev(options = {}) {
19
34
  return { stone: { mcpDev: options } };
20
35
  }
21
36
 
22
- /**
23
- * Browser stub of `@McpDev()`: a no-op.
24
- *
25
- * The dev MCP server (`stone mcp`) is a Node-only, development concern. Stubbing the decorator for
26
- * the browser keeps an isomorphic app compiling and inert there, without dragging the CLI command,
27
- * the MCP SDK server, or `node:fs` into the browser bundle (which would break a SPA). The real
28
- * decorator lives in the Node build.
29
- *
30
- * @param _options - Ignored in the browser.
31
- * @returns A no-op class decorator.
32
- */
33
- const McpDev = (_options = {}) => {
34
- return classDecoratorLegacyWrapper((_target, _context) => { });
35
- };
36
-
37
37
  export { McpDev, defineMcpDev, mcpDevBlueprint };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stone-js/mcp-dev",
3
- "version": "0.8.7",
3
+ "version": "0.8.8",
4
4
  "description": "Serve Stone.js's knowledge to your coding agent. A single `stone mcp` command starts an MCP server (stdio) exposing the framework's concepts, modules and best-practices plus your own tools, so the LLM masters the context while you master the domain.",
5
5
  "author": "Mr. Stone <evensstone@gmail.com>",
6
6
  "license": "MIT",
@@ -47,7 +47,7 @@
47
47
  "node": ">=18.17.0"
48
48
  },
49
49
  "peerDependencies": {
50
- "@stone-js/core": "0.8.7"
50
+ "@stone-js/core": "0.8.8"
51
51
  },
52
52
  "dependencies": {
53
53
  "@modelcontextprotocol/sdk": "^1.29.0"
@@ -47,7 +47,7 @@ The same class can be served over HTTP, in a Lambda, in the browser, or on the e
47
47
  ## Workflow
48
48
 
49
49
  1. **Before writing code, query the framework.** Call the `stone_search`, `stone_concept`,
50
- `stone_modules`, and `stone_docs` MCP tools (served by `stone mcp`) to confirm the current
50
+ `stone_modules`, and `stone_brief` MCP tools (served by `stone mcp`) to confirm the current
51
51
  conventions and the right module for the job, instead of guessing from generic Node knowledge.
52
52
  2. **Inspect the app** with `stone_app`, `stone_routes`, `stone_commands`, `stone_adapters`,
53
53
  `stone_providers`, `stone_kernel`, and `stone_config` to see what it actually declares.
@@ -53,5 +53,5 @@ platforms, and the environment decides which context applies.
53
53
  ## Verify with the MCP tools
54
54
 
55
55
  Call `stone_adapters` to list registered adapters (platform, alias, default/current) and the active
56
- platform. Use `stone_app` for a quick summary, and `stone_docs` for the adapter guides. `stone_search`
56
+ platform. Use `stone_app` for a quick summary, and `stone_adapters` for what is registered. `stone_search`
57
57
  the knowledge base when picking a target or debugging selection.
@@ -57,7 +57,7 @@ class UserController {
57
57
 
58
58
  After adding routes, call `stone_routes` to confirm the resolved tree (path, methods, name,
59
59
  handler, middleware). Use `stone_kernel` to see the middleware pipeline that every route traverses.
60
- When unsure of an option, `stone_search` the knowledge base or `stone_docs` for the routing guide.
60
+ When unsure of an option, `stone_search` the knowledge base or read `stone_brief` for the full brief.
61
61
 
62
62
  ## Do not
63
63