@orygn/opa-mcp 0.1.10 → 0.1.11

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/CHANGELOG.md CHANGED
@@ -17,6 +17,21 @@ not part of the public surface and may change in minor releases.
17
17
 
18
18
  ## [Unreleased]
19
19
 
20
+ ## [0.1.11] - 2026-05-24
21
+
22
+ ### Added
23
+
24
+ - **`rego_check_schema` (48 tools total)** -- new authoring tool that runs
25
+ `opa check --schema` to validate that every `input.*` field reference in a
26
+ Rego policy exists in the provided JSON Schema. Schema violations surface as
27
+ `rego_type_error` diagnostics with file/line locations. Accepts the schema
28
+ inline (`inlineSchema` -- pass the `schema` output of `rego_infer_input_schema`
29
+ directly) or as a path to a JSON Schema file on disk (`schemaPath`). Closes the
30
+ infer-then-validate loop: use `rego_infer_input_schema` to derive the schema
31
+ from an existing policy, then validate a new or modified policy against it
32
+ without leaving the MCP session. Supports `strict` mode and all standard
33
+ path-validation and subprocess error handling.
34
+
20
35
  ## [0.1.10] - 2026-05-22
21
36
 
22
37
  ### Added
@@ -608,7 +623,9 @@ wrappers end-to-end. CI matrix: Ubuntu, macOS, and Windows on Node
608
623
  20 and 22, plus CodeQL security scanning and weekly Dependabot updates
609
624
  for npm, GitHub Actions, and Docker base images.
610
625
 
611
- [Unreleased]: https://github.com/OrygnsCode/opa-mcp-server/compare/v0.1.9...HEAD
626
+ [Unreleased]: https://github.com/OrygnsCode/opa-mcp-server/compare/v0.1.11...HEAD
627
+ [0.1.11]: https://github.com/OrygnsCode/opa-mcp-server/compare/v0.1.10...v0.1.11
628
+ [0.1.10]: https://github.com/OrygnsCode/opa-mcp-server/compare/v0.1.9...v0.1.10
612
629
  [0.1.9]: https://github.com/OrygnsCode/opa-mcp-server/compare/v0.1.8...v0.1.9
613
630
  [0.1.8]: https://github.com/OrygnsCode/opa-mcp-server/compare/v0.1.7...v0.1.8
614
631
  [0.1.7]: https://github.com/OrygnsCode/opa-mcp-server/compare/v0.1.6...v0.1.7
package/README.md CHANGED
@@ -18,10 +18,10 @@ environment.
18
18
  +--------------------+ MCP / stdio +-----------------+ spawn / HTTP +------------------------+
19
19
  | Claude · Cursor · | ------------> | @orygn/opa-mcp | -------------> | opa · regal · conftest |
20
20
  | VS Code · ... | <------------ | | <------------- | OPA REST API |
21
- +--------------------+ 47 tools +-----------------+ +------------------------+
21
+ +--------------------+ 48 tools +-----------------+ +------------------------+
22
22
  ```
23
23
 
24
- > **Status:** v0.1.10. Tool surface, error codes, and
24
+ > **Status:** v0.1.11. Tool surface, error codes, and
25
25
  > environment variables follow [SemVer](https://semver.org/) from
26
26
  > v0.1.0 forward.
27
27
 
@@ -707,7 +707,7 @@ Dependabot or a manual PR.
707
707
 
708
708
  ## License
709
709
 
710
- [MIT](./LICENSE) © Orygn LLC
710
+ [MIT](./LICENSE) © [Orygn LLC](https://orygn.tech)
711
711
 
712
712
  `@orygn/opa-mcp` is an independent project. It is not affiliated with,
713
713
  endorsed by, or sponsored by the Open Policy Agent project, the Cloud
@@ -4,5 +4,5 @@
4
4
  * (server.ts -> tools -> meta -> server.ts).
5
5
  */
6
6
  export declare const SERVER_NAME = "orygn-opa-mcp";
7
- export declare const SERVER_VERSION = "0.1.10";
7
+ export declare const SERVER_VERSION = "0.1.11";
8
8
  //# sourceMappingURL=constants.d.ts.map
package/dist/constants.js CHANGED
@@ -4,5 +4,5 @@
4
4
  * (server.ts -> tools -> meta -> server.ts).
5
5
  */
6
6
  export const SERVER_NAME = 'orygn-opa-mcp';
7
- export const SERVER_VERSION = '0.1.10';
7
+ export const SERVER_VERSION = '0.1.11';
8
8
  //# sourceMappingURL=constants.js.map
@@ -0,0 +1,20 @@
1
+ import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
+ import type { Config } from '../../config.js';
3
+ interface CheckErrorRecord {
4
+ message?: string;
5
+ code?: string;
6
+ location?: {
7
+ file?: string;
8
+ row?: number;
9
+ col?: number;
10
+ };
11
+ }
12
+ export interface RegoCheckSchemaOutput {
13
+ /** Whether the policy passes schema-aware type checking. */
14
+ valid: boolean;
15
+ /** Structured diagnostics. Empty when `valid` is true. */
16
+ errors: CheckErrorRecord[];
17
+ }
18
+ export declare function registerRegoCheckSchema(server: McpServer, config: Config): void;
19
+ export {};
20
+ //# sourceMappingURL=check-schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"check-schema.d.ts","sourceRoot":"","sources":["../../../src/tools/authoring/check-schema.ts"],"names":[],"mappings":"AAsBA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAEzE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AA4C9C,UAAU,gBAAgB;IACxB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,GAAG,CAAC,EAAE,MAAM,CAAC;QAAC,GAAG,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CAC1D;AAED,MAAM,WAAW,qBAAqB;IACpC,4DAA4D;IAC5D,KAAK,EAAE,OAAO,CAAC;IACf,0DAA0D;IAC1D,MAAM,EAAE,gBAAgB,EAAE,CAAC;CAC5B;AAED,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,CA8H/E"}
@@ -0,0 +1,140 @@
1
+ /**
2
+ * `rego_check_schema` -- validate that a Rego policy's input.* references
3
+ * are consistent with a JSON Schema.
4
+ *
5
+ * Wraps `opa check --schema` to add schema-aware type checking on top of the
6
+ * standard AST check: every `input.*` field the policy reads must exist in the
7
+ * provided schema. Fields referenced in the policy but absent from the schema
8
+ * surface as rego_type_error diagnostics with file/line locations.
9
+ *
10
+ * Accepts the schema inline (a JSON Schema object) or as a file path on disk.
11
+ * Inline schemas are written to a temporary file via mkdtemp (atomic creation)
12
+ * and cleaned up unconditionally after the subprocess completes.
13
+ *
14
+ * Designed to close the loop with rego_infer_input_schema: call
15
+ * rego_infer_input_schema to derive the schema from policy A, then pass its
16
+ * output directly as `inlineSchema` here to validate policy B against it.
17
+ */
18
+ import { mkdtemp, rm, writeFile } from 'node:fs/promises';
19
+ import { tmpdir } from 'node:os';
20
+ import { join } from 'node:path';
21
+ import { z } from 'zod';
22
+ import { OpaCli } from '../../lib/opa-cli.js';
23
+ import { err, ok } from '../../lib/errors.js';
24
+ import { mapSubprocessFailure, sanitizeInlinePath, tryParseJson, validatePaths, withToolEnvelope, } from '../../lib/tool-helpers.js';
25
+ const RegoCheckSchemaInput = {
26
+ source: z
27
+ .string()
28
+ .optional()
29
+ .describe('Inline Rego source to validate against the schema. Mutually exclusive with `paths`.'),
30
+ paths: z
31
+ .array(z.string())
32
+ .optional()
33
+ .describe('Filesystem paths to policy files or directories to validate. Each path must be inside an allowed root (OPA_MCP_ALLOWED_PATHS). Mutually exclusive with `source`.'),
34
+ inlineSchema: z
35
+ .record(z.unknown())
36
+ .optional()
37
+ .describe('JSON Schema (draft-07) object describing the expected shape of the `input` document. Mutually exclusive with `schemaPath`. Accepts the `schema` field from `rego_infer_input_schema` output directly.'),
38
+ schemaPath: z
39
+ .string()
40
+ .optional()
41
+ .describe('Path to a JSON Schema file on disk to use for `input` validation. Must be inside an allowed root (OPA_MCP_ALLOWED_PATHS). Mutually exclusive with `inlineSchema`.'),
42
+ strict: z
43
+ .boolean()
44
+ .optional()
45
+ .describe('Enable strict mode -- also fail on unused variables, deprecated builtins, and other non-fatal issues in addition to schema violations.'),
46
+ };
47
+ export function registerRegoCheckSchema(server, config) {
48
+ const opa = new OpaCli(config);
49
+ server.registerTool('rego_check_schema', {
50
+ title: 'Check Rego against a JSON Schema',
51
+ description: "Validate that a Rego policy's input.* field references are consistent with a JSON Schema using `opa check --schema`. Every field the policy reads from `input` must exist in the schema; mismatches surface as rego_type_error diagnostics with file/line locations. Returns `{ valid: true, errors: [] }` when all references match the schema, or `{ valid: false, errors: [...] }` with structured diagnostics when they do not. Accepts the schema inline (pass the `schema` output of `rego_infer_input_schema` directly as `inlineSchema`) or as a path to an existing JSON Schema file on disk (`schemaPath`). Provide `source` for inline Rego or `paths` for file/directory checking.",
52
+ inputSchema: RegoCheckSchemaInput,
53
+ annotations: {
54
+ readOnlyHint: true,
55
+ destructiveHint: false,
56
+ idempotentHint: true,
57
+ openWorldHint: false,
58
+ },
59
+ }, async ({ source, paths, inlineSchema, schemaPath, strict }, { signal }) => {
60
+ return withToolEnvelope(config, async () => {
61
+ // ── Policy input validation ─────────────────────────────────────
62
+ if (!source && !paths?.length) {
63
+ return err('INVALID_INPUT', 'rego_check_schema requires either `source` or at least one entry in `paths`.');
64
+ }
65
+ if (source && paths?.length) {
66
+ return err('INVALID_INPUT', 'rego_check_schema does not accept both `source` and `paths` -- pass one or the other.');
67
+ }
68
+ // ── Schema input validation ─────────────────────────────────────
69
+ if (!inlineSchema && !schemaPath) {
70
+ return err('INVALID_INPUT', 'rego_check_schema requires either `inlineSchema` (a JSON Schema object) or `schemaPath` (a path to a schema file on disk).');
71
+ }
72
+ if (inlineSchema && schemaPath) {
73
+ return err('INVALID_INPUT', 'rego_check_schema does not accept both `inlineSchema` and `schemaPath` -- pass one or the other.');
74
+ }
75
+ // ── Policy path resolution ──────────────────────────────────────
76
+ let resolvedPaths;
77
+ if (paths?.length) {
78
+ const validation = validatePaths(paths, config, { mustExist: true });
79
+ if (!validation.ok)
80
+ return validation.error;
81
+ resolvedPaths = validation.resolved;
82
+ }
83
+ // ── Schema path resolution ──────────────────────────────────────
84
+ let resolvedSchemaFile;
85
+ if (schemaPath) {
86
+ const v = validatePaths([schemaPath], config, { mustExist: true });
87
+ if (!v.ok)
88
+ return v.error;
89
+ resolvedSchemaFile = v.resolved[0];
90
+ }
91
+ // ── Inline schema: write to a temp file, clean up unconditionally ─
92
+ let tempDir;
93
+ try {
94
+ if (inlineSchema !== undefined) {
95
+ tempDir = await mkdtemp(join(tmpdir(), 'orygn-schema-'));
96
+ const schemaFile = join(tempDir, 'schema.json');
97
+ await writeFile(schemaFile, JSON.stringify(inlineSchema), 'utf8');
98
+ resolvedSchemaFile = schemaFile;
99
+ }
100
+ // ── Run opa check ─────────────────────────────────────────────
101
+ const result = await opa.check({
102
+ source,
103
+ paths: resolvedPaths,
104
+ strict,
105
+ schemaDir: resolvedSchemaFile,
106
+ }, signal);
107
+ const subprocessFailure = mapSubprocessFailure(result, 'opa');
108
+ if (subprocessFailure)
109
+ return subprocessFailure;
110
+ if (result.exitCode === 0) {
111
+ return ok({ valid: true, errors: [] });
112
+ }
113
+ // `opa check --format=json` writes diagnostics to stderr.
114
+ const parsed = tryParseJson(result.stderr);
115
+ if (!parsed) {
116
+ return err('INVALID_REGO', 'opa check exited non-zero but produced no parseable diagnostics.', { details: { stderr: result.stderr.trim(), stdout: result.stdout.trim() } });
117
+ }
118
+ const rawErrors = parsed.errors ?? [];
119
+ // When source was provided inline, OPA references a temp .rego path in
120
+ // error locations. Replace those paths with the sentinel <inline> so
121
+ // callers see a stable, meaningful location instead of an ephemeral path.
122
+ const errors = source !== undefined
123
+ ? rawErrors.map((e) => e.location?.file
124
+ ? {
125
+ ...e,
126
+ location: { ...e.location, file: sanitizeInlinePath(e.location.file) },
127
+ }
128
+ : e)
129
+ : rawErrors;
130
+ return ok({ valid: false, errors });
131
+ }
132
+ finally {
133
+ if (tempDir !== undefined) {
134
+ await rm(tempDir, { recursive: true, force: true });
135
+ }
136
+ }
137
+ });
138
+ });
139
+ }
140
+ //# sourceMappingURL=check-schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"check-schema.js","sourceRoot":"","sources":["../../../src/tools/authoring/check-schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;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":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tools/authoring/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAEzE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAW9C,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,CAU9E"}
@@ -1,5 +1,6 @@
1
1
  import { registerRegoCapabilities } from './capabilities.js';
2
2
  import { registerRegoCheck } from './check.js';
3
+ import { registerRegoCheckSchema } from './check-schema.js';
3
4
  import { registerRegoDeps } from './deps.js';
4
5
  import { registerRegoFormat } from './format.js';
5
6
  import { registerRegoInspect } from './inspect.js';
@@ -9,6 +10,7 @@ import { registerRegoParseAst } from './parse.js';
9
10
  export function registerAuthoringTools(server, config) {
10
11
  registerRegoFormat(server, config);
11
12
  registerRegoCheck(server, config);
13
+ registerRegoCheckSchema(server, config);
12
14
  registerRegoLint(server, config);
13
15
  registerRegoParseAst(server, config);
14
16
  registerRegoInspect(server, config);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/tools/authoring/index.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AAC7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAC/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAElD,MAAM,UAAU,sBAAsB,CA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AC;IACjC,oBAAoB,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACrC,mBAAmB,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACpC,wBAAwB,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACzC,gBAAgB,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC,qBAAqB,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AACxC,CAAC"}
@@ -5,8 +5,9 @@
5
5
  * here in order; ordering doesn't affect behavior but keeps the
6
6
  * declaration site tidy.
7
7
  *
8
- * Tools (47 total):
9
- * Category A -- Authoring: rego_format, rego_check, rego_lint,
8
+ * Tools (48 total):
9
+ * Category A -- Authoring: rego_format, rego_check,
10
+ * rego_check_schema, rego_lint,
10
11
  * rego_parse_ast, rego_inspect,
11
12
  * rego_capabilities, rego_deps
12
13
  * Category B -- Evaluation: rego_eval, rego_eval_with_explain,
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAEzE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAS3C,wBAAgB,aAAa,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,CAQrE"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAEzE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAS3C,wBAAgB,aAAa,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,CAQrE"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAuCA,OAAO,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAC9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AAChE,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,6BAA6B,EAAE,MAAM,8BAA8B,CAAC;AAE7E,MAAM,UAAU,aAAa,CAAC,MAAiB,EAAE,MAAc;IAC7D,sBAAsB,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACvC,uBAAuB,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACxC,mBAAmB,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACpC,6BAA6B,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC9C,mBAAmB,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACpC,qBAAqB,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACtC,iBAAiB,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AACpC,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAwCA,OAAO,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAC9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AAChE,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,6BAA6B,EAAE,MAAM,8BAA8B,CAAC;AAE7E,MAAM,UAAU,aAAa,CAAC,MAAiB,EAAE,MAAc;IAC7D,sBAAsB,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACvC,uBAAuB,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACxC,mBAAmB,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACpC,6BAA6B,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC9C,mBAAmB,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACpC,qBAAqB,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACtC,iBAAiB,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AACpC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orygn/opa-mcp",
3
- "version": "0.1.10",
3
+ "version": "0.1.11",
4
4
  "mcpName": "io.github.OrygnsCode/opa-mcp",
5
5
  "description": "Model Context Protocol server for Open Policy Agent (OPA). Author, validate, debug, and explain Rego policies through any MCP-compatible client.",
6
6
  "type": "module",
@@ -14,7 +14,7 @@
14
14
  "type": "git",
15
15
  "url": "git+https://github.com/OrygnsCode/opa-mcp-server.git"
16
16
  },
17
- "homepage": "https://github.com/OrygnsCode/opa-mcp-server#readme",
17
+ "homepage": "https://orygn.tech/products/opa-mcp",
18
18
  "bugs": {
19
19
  "url": "https://github.com/OrygnsCode/opa-mcp-server/issues"
20
20
  },