@galaxy-stack/orbit-mcp 0.1.0 → 0.1.2

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
@@ -1,9 +1,78 @@
1
+ <div align="center">
2
+
1
3
  # @galaxy-stack/orbit-mcp
2
4
 
3
- Orbit framework package. See the [framework documentation](https://galaxy-orbit-framework.vercel.app).
5
+ **Model Context Protocol server for the Orbit framework**
6
+
7
+ Give AI coding agents first-class knowledge of Orbit: framework patterns, code scaffolding, and security review — through the [Model Context Protocol](https://modelcontextprotocol.io).
8
+
9
+ [![npm version](https://img.shields.io/npm/v/@galaxy-stack/orbit-mcp.svg)](https://www.npmjs.com/package/@galaxy-stack/orbit-mcp)
10
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
11
+ [![Bun](https://img.shields.io/badge/runtime-Bun-f9f1e1?logo=bun)](https://bun.sh)
12
+
13
+ </div>
14
+
15
+ ## What it does
16
+
17
+ Orbit MCP turns any AI coding agent (Claude, Cursor, Codex, …) into an Orbit-aware collaborator. It exposes:
18
+
19
+ | Capability | Tools / Resources | Purpose |
20
+ |---|---|---|
21
+ | **Knowledge** | `orbit_knowledge_topics`, `orbit_knowledge_read`, `orbit://knowledge/*` | Module/controller/DI/GraphQL/microservices patterns, package map, security checklist |
22
+ | **Scaffolding** | `orbit_scaffold_module`, `orbit_scaffold_graphql` | Generate complete feature modules with validation, guards, and tests |
23
+ | **Security review** | `orbit_security_review` | Static checklist against pasted code — missing validation, guards, rate limits, GraphQL limits, hardcoded secrets, unsanitized HTML |
24
+ | **Prompts** | `build_orbit_feature`, `harden_graphql_api`, `migrate_from_nestjs` | Ready-made task prompts for agents |
25
+
26
+ ## Quick start
27
+
28
+ Add to your agent's MCP config:
29
+
30
+ ```json
31
+ {
32
+ "mcpServers": {
33
+ "orbit": {
34
+ "command": "bunx",
35
+ "args": ["@galaxy-stack/orbit-mcp"]
36
+ }
37
+ }
38
+ }
39
+ ```
4
40
 
5
- ## Installation
41
+ Or run directly from a checkout:
6
42
 
7
- ```bash
8
- bun add @galaxy-stack/orbit-mcp
43
+ ```sh
44
+ bun run src/server.ts
9
45
  ```
46
+
47
+ ## Example session
48
+
49
+ > **Agent:** List what you know about Orbit.
50
+ >
51
+ > `orbit_knowledge_topics` →
52
+ > `- module-pattern — Module pattern: Organize features into @Module classes…`
53
+ > `- security-checklist — Security checklist: Helmet headers, CSRF, rate limiting…`
54
+ > `…`
55
+
56
+ > **Agent:** Review this controller for security issues.
57
+ >
58
+ > `orbit_security_review` with the pasted code →
59
+ > `1. [HIGH] Mutation endpoints lack input validation. Add ValidationPipe with a Zod schema…`
60
+ > `2. [HIGH] State-changing endpoint without an auth guard…`
61
+
62
+ ## Companion skill
63
+
64
+ The [`skills/orbit-framework/SKILL.md`](skills/orbit-framework/SKILL.md) file is a
65
+ portable skill definition covering the same guidance for agents that prefer
66
+ skills over MCP. Copy it into your agent's skills directory or reference it in
67
+ your prompt.
68
+
69
+ ## Protocol
70
+
71
+ Implements MCP `2025-03-26` over stdio (newline-delimited JSON-RPC 2.0):
72
+ `initialize`, `ping`, `tools/list`, `tools/call`, `resources/list`,
73
+ `resources/read`, `prompts/list`, `prompts/get`. Zero runtime dependencies —
74
+ runs under Bun or Node >= 18.
75
+
76
+ ## License
77
+
78
+ MIT
package/dist/cli.js CHANGED
@@ -288,9 +288,9 @@ function executeTool(name, args) {
288
288
  ${entry.content}`);
289
289
  }
290
290
  case "orbit_scaffold_module": {
291
- const name2 = String(args.name || "feature");
292
- const kebab = name2.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
293
- const cls = pascal(name2);
291
+ const name = String(args.name || "feature");
292
+ const kebab = name.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
293
+ const cls = pascal(name);
294
294
  const files = [];
295
295
  files.push(`// src/${kebab}/${kebab}.module.ts
296
296
  import { Module } from '@galaxy-stack/orbit-core';
@@ -364,9 +364,9 @@ describe('${cls}Service', () => {
364
364
  `));
365
365
  }
366
366
  case "orbit_scaffold_graphql": {
367
- const name2 = String(args.name || "feature");
368
- const kebab = name2.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
369
- const cls = pascal(name2);
367
+ const name = String(args.name || "feature");
368
+ const kebab = name.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
369
+ const cls = pascal(name);
370
370
  const loader = args.withLoaders ? `
371
371
  @ResolveField(() => Author)
372
372
  author(@Parent() parent: ${cls}, @Loader('authorLoader') loader: DataLoader) {
@@ -616,8 +616,8 @@ if (import.meta.main) {
616
616
  });
617
617
  }
618
618
  export {
619
- serveStdio,
620
- handleRequest,
619
+ PROTOCOL_VERSION,
621
620
  SERVER_INFO,
622
- PROTOCOL_VERSION
621
+ handleRequest,
622
+ serveStdio
623
623
  };
package/dist/index.js CHANGED
@@ -291,9 +291,9 @@ function executeTool(name, args) {
291
291
  ${entry.content}`);
292
292
  }
293
293
  case "orbit_scaffold_module": {
294
- const name2 = String(args.name || "feature");
295
- const kebab = name2.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
296
- const cls = pascal(name2);
294
+ const name = String(args.name || "feature");
295
+ const kebab = name.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
296
+ const cls = pascal(name);
297
297
  const files = [];
298
298
  files.push(`// src/${kebab}/${kebab}.module.ts
299
299
  import { Module } from '@galaxy-stack/orbit-core';
@@ -367,9 +367,9 @@ describe('${cls}Service', () => {
367
367
  `));
368
368
  }
369
369
  case "orbit_scaffold_graphql": {
370
- const name2 = String(args.name || "feature");
371
- const kebab = name2.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
372
- const cls = pascal(name2);
370
+ const name = String(args.name || "feature");
371
+ const kebab = name.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
372
+ const cls = pascal(name);
373
373
  const loader = args.withLoaders ? `
374
374
  @ResolveField(() => Author)
375
375
  author(@Parent() parent: ${cls}, @Loader('authorLoader') loader: DataLoader) {
@@ -614,12 +614,12 @@ async function serveStdio(input = process.stdin, output = process.stdout) {
614
614
  }
615
615
  if (false) {}
616
616
  export {
617
- serveStdio,
618
- handleRequest,
619
- getKnowledge,
620
- executeTool,
621
- TOOLS,
622
- SERVER_INFO,
617
+ KNOWLEDGE,
623
618
  PROTOCOL_VERSION,
624
- KNOWLEDGE
619
+ SERVER_INFO,
620
+ TOOLS,
621
+ executeTool,
622
+ getKnowledge,
623
+ handleRequest,
624
+ serveStdio
625
625
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@galaxy-stack/orbit-mcp",
3
- "version": "0.1.0",
4
- "description": "Model Context Protocol server for Orbit framework \u2014 AI coding agents get framework knowledge, scaffolding, and security review tools",
3
+ "version": "0.1.2",
4
+ "description": "Model Context Protocol server for Orbit framework — AI coding agents get framework knowledge, scaffolding, and security review tools",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "bin": {
@@ -29,12 +29,14 @@
29
29
  "bun",
30
30
  "nestjs-style"
31
31
  ],
32
- "dependencies": {},
32
+ "dependencies": {
33
+ "@smithery/api": "^0.68.0"
34
+ },
33
35
  "devDependencies": {
36
+ "@changesets/cli": "^2.27.0",
34
37
  "@types/bun": "latest",
35
- "typescript": "^5.0.0",
36
38
  "reflect-metadata": "^0.2.2",
37
- "@changesets/cli": "^2.27.0"
39
+ "typescript": "^5.0.0"
38
40
  },
39
41
  "author": "Orbit Team",
40
42
  "license": "MIT",