@mfdaves/okf-mcp 0.9.1 → 0.13.0-rc.1

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.
Files changed (115) hide show
  1. package/CHANGELOG.md +100 -0
  2. package/README.md +452 -26
  3. package/bin/okf-mcp.js +6 -1
  4. package/okf/okf-mcp/distribution/reference-bundle.md +10 -3
  5. package/okf/okf-mcp/index.md +2 -1
  6. package/okf/okf-mcp/interfaces/http-authoring-api.md +11 -2
  7. package/okf/okf-mcp/interfaces/mcp-http.md +64 -0
  8. package/okf/okf-mcp/interfaces/mcp-tools.md +25 -6
  9. package/okf/okf-mcp/overview/okf-mcp.md +16 -6
  10. package/okf/okf-mcp/policies/authoring-safety.md +28 -5
  11. package/okf/okf-mcp/runtime/indexer.md +14 -1
  12. package/okf/okf-mcp/runtime/mcp-server.md +16 -8
  13. package/okf/okf-mcp/specs/producer-api.md +16 -2
  14. package/package.json +17 -5
  15. package/server.json +38 -2
  16. package/src/assets.js +165 -73
  17. package/src/authoring/candidates.js +434 -0
  18. package/src/authoring/git-preflight.js +225 -0
  19. package/src/authoring/git-publish.js +783 -0
  20. package/src/authoring/live.js +757 -0
  21. package/src/authoring/paths.js +112 -0
  22. package/src/authoring/policy-hook.js +221 -0
  23. package/src/authoring/proposal-policy.js +159 -0
  24. package/src/authoring/receipts.js +373 -0
  25. package/src/authoring/render.js +38 -0
  26. package/src/authoring/shared.js +75 -0
  27. package/src/authoring/staging.js +216 -0
  28. package/src/authoring.js +386 -287
  29. package/src/cache/files.js +147 -0
  30. package/src/cache/lock.js +201 -0
  31. package/src/cache/paths.js +197 -0
  32. package/src/cache/store.js +703 -0
  33. package/src/catalog-text.js +19 -0
  34. package/src/cli/commands.js +448 -0
  35. package/src/cli/http-options.js +193 -0
  36. package/src/cli/options.js +554 -0
  37. package/src/cli/usage.js +96 -0
  38. package/src/cli.js +18 -932
  39. package/src/computation.js +99 -61
  40. package/src/context/assemble.js +567 -0
  41. package/src/context/cli-options.js +88 -0
  42. package/src/context/score.js +234 -0
  43. package/src/context/sections.js +274 -0
  44. package/src/embed/interface.js +160 -0
  45. package/src/embed/openai.js +715 -0
  46. package/src/embed/prepare.js +182 -0
  47. package/src/embed/units.js +96 -0
  48. package/src/error-details.js +53 -0
  49. package/src/git-source.js +112 -52
  50. package/src/graph.js +95 -37
  51. package/src/http-server.js +36 -17
  52. package/src/index.js +15 -0
  53. package/src/indexer/assemble.js +566 -0
  54. package/src/indexer/build.js +290 -0
  55. package/src/indexer/cache.js +81 -0
  56. package/src/indexer/edges.js +430 -0
  57. package/src/indexer/index.js +44 -0
  58. package/src/indexer/paths.js +178 -0
  59. package/src/indexer/resolve.js +282 -0
  60. package/src/indexer/update.js +720 -0
  61. package/src/indexer.js +3 -1068
  62. package/src/live-authoring.js +4 -2329
  63. package/src/markdown.js +21 -16
  64. package/src/mcp/auth.js +409 -0
  65. package/src/mcp/http.js +317 -0
  66. package/src/mcp/principal.js +59 -0
  67. package/src/mcp/registry.js +356 -0
  68. package/src/mcp/resources.js +45 -0
  69. package/src/mcp/server.js +567 -0
  70. package/src/mcp/tools/catalog.js +247 -0
  71. package/src/mcp/tools/computation.js +83 -0
  72. package/src/mcp/tools/context.js +133 -0
  73. package/src/mcp/tools/graph.js +167 -0
  74. package/src/mcp/tools/live-authoring.js +316 -0
  75. package/src/mcp/tools/migration.js +86 -0
  76. package/src/mcp/tools/producers.js +79 -0
  77. package/src/mcp/tools/proposals.js +225 -0
  78. package/src/mcp/tools/provenance.js +87 -0
  79. package/src/mcp/tools/remote.js +79 -0
  80. package/src/mcp/tools/search.js +242 -0
  81. package/src/mcp-server.js +3 -1611
  82. package/src/migration.js +431 -253
  83. package/src/parser.js +245 -130
  84. package/src/plugins.js +71 -48
  85. package/src/policy/write-policy.js +713 -0
  86. package/src/producer-publisher.js +202 -78
  87. package/src/producers.js +311 -103
  88. package/src/project.js +346 -93
  89. package/src/remote.js +96 -61
  90. package/src/search/cli-options.js +107 -0
  91. package/src/search/confidence.js +61 -0
  92. package/src/search/dense.js +304 -0
  93. package/src/search/embedding-cli.js +57 -0
  94. package/src/search/embedding-config.js +217 -0
  95. package/src/search/fusion.js +249 -0
  96. package/src/search/hybrid.js +526 -0
  97. package/src/search/languages.js +200 -0
  98. package/src/search/lexical.js +695 -0
  99. package/src/search/query.js +620 -0
  100. package/src/search/stem/among.js +43 -0
  101. package/src/search/stem/base-stemmer.js +311 -0
  102. package/src/search/stem/en-regions.js +456 -0
  103. package/src/search/stem/en-suffixes.js +664 -0
  104. package/src/search/stem/en-tables.js +176 -0
  105. package/src/search/stem/en.js +238 -0
  106. package/src/search/stem/it-regions.js +459 -0
  107. package/src/search/stem/it-suffixes.js +471 -0
  108. package/src/search/stem/it-tables.js +257 -0
  109. package/src/search/stem/it.js +155 -0
  110. package/src/search-index.js +2 -81
  111. package/src/search.js +2 -252
  112. package/src/store.js +134 -81
  113. package/src/tool-packs.js +346 -0
  114. package/src/v02.js +301 -105
  115. package/src/validation.js +24 -20
@@ -3,7 +3,11 @@ id: okf://okf-mcp/distribution/reference-bundle
3
3
  type: OKF Distribution
4
4
  title: Published okf-mcp Reference Bundle
5
5
  description: Canonical public OKF bundle describing the okf-mcp product and its durable contracts.
6
- tags: [distribution, reference, remote-bundle, dogfooding]
6
+ tags:
7
+ - distribution
8
+ - reference
9
+ - remote-bundle
10
+ - dogfooding
7
11
  relations:
8
12
  - type: consumes
9
13
  target: okf://okf-mcp/specs/concept-format
@@ -23,6 +27,9 @@ relations:
23
27
  target: repo://.github/workflows/release.yml
24
28
  - type: configured_by
25
29
  target: repo://.agents/skills/okf-mcp-release/SKILL.md
30
+ generated:
31
+ by: anthropic/claude-code
32
+ at: 2026-11-14T17:33:39.682Z
26
33
  ---
27
34
 
28
35
  # Published okf-mcp Reference Bundle
@@ -35,9 +42,9 @@ The latest public bundle can be loaded from:
35
42
 
36
43
  Consumers that need reproducibility should replace `main` with a release tag. Remote loading indexes only the Markdown tree and does not execute repository code.
37
44
 
38
- The public npm package is `@mfdaves/okf-mcp`. Its allowlist includes `okf.project.yaml`, `server.json`, and the `okf` directory so installed artifacts carry the same reference bundle and MCP Registry metadata. The package declares the Registry name `io.github.mfdaves/okf-mcp`.
45
+ The public npm package is `@mfdaves/okf-mcp`. Its allowlist includes `okf.project.yaml`, `server.json`, and the `okf` directory so installed artifacts carry the same reference bundle and MCP Registry metadata. The package declares the Registry name `io.github.mfdaves/okf-mcp`, and `server.json` describes two transports of the same package: stdio, and Streamable HTTP at `http://127.0.0.1:8766/mcp` started with the extra `--http` argument.
39
46
 
40
- The package smoke gate verifies that package, lockfile, CLI, MCP server, and Registry versions and identities agree. It installs the generated tarball into a clean temporary project, executes both binaries, validates this bundle, and uses the official client SDK to exercise both modern `2026-07-28` and legacy `2025-11-25` stdio sessions through tool discovery, resource discovery, resource reads, and concept retrieval.
47
+ The package smoke gate verifies that package, lockfile, CLI, MCP server, and Registry versions and identities agree. It installs the generated tarball into a clean temporary project, executes both binaries, validates this bundle, and uses the official client SDK to exercise both modern `2026-07-28` and legacy `2025-11-25` stdio sessions through tool discovery, resource discovery, resource reads, and concept retrieval. It also serves the installed package over Streamable HTTP and lists tools and searches in both revisions.
41
48
 
42
49
  The repository release skill defines the package identity, capability matrix, protocol, schema enforcement, self-validation, tarball, clean-install, prerelease, and registry synchronization gates. The trusted-publishing workflow repeats those checks against an exact Git release tag before publishing. Release-candidate metadata is not published to the MCP Registry; stable Registry publication follows successful npm and `npx` verification.
43
50
 
@@ -13,11 +13,12 @@ This bundle is the canonical machine-readable reference for the `okf-mcp` runtim
13
13
  - [Attested Computation Support](specs/attested-computation.md)
14
14
  - [Pinned Git Sources](specs/git-sources.md)
15
15
  - [Producer API](specs/producer-api.md)
16
- - [MCP Stdio Server](runtime/mcp-server.md)
16
+ - [MCP Server](runtime/mcp-server.md)
17
17
  - [OKF Indexer](runtime/indexer.md)
18
18
  - [File Concept Store](runtime/file-concept-store.md)
19
19
  - [Producer Host](runtime/producer-host.md)
20
20
  - [MCP Tool Catalog](interfaces/mcp-tools.md)
21
+ - [MCP HTTP Transport](interfaces/mcp-http.md)
21
22
  - [HTTP Authoring API](interfaces/http-authoring-api.md)
22
23
  - [Concept Authoring](workflows/concept-authoring.md)
23
24
  - [Concept Update](workflows/concept-update.md)
@@ -3,7 +3,11 @@ id: okf://okf-mcp/interfaces/http-authoring-api
3
3
  type: OKF Interface
4
4
  title: HTTP Authoring API
5
5
  description: Optional local HTTP interface for validation and proposal-based concept authoring.
6
- tags: [http, api, authoring, interface]
6
+ tags:
7
+ - http
8
+ - api
9
+ - authoring
10
+ - interface
7
11
  relations:
8
12
  - type: depends_on
9
13
  target: okf://okf-mcp/workflows/concept-authoring
@@ -13,6 +17,11 @@ relations:
13
17
  target: repo://src/http-server.js
14
18
  - type: checked_by
15
19
  target: repo://test/okf-mcp.test.js
20
+ - type: related_to
21
+ target: okf://okf-mcp/interfaces/mcp-http
22
+ generated:
23
+ by: anthropic/claude-code
24
+ at: 2026-11-14T17:33:39.682Z
16
25
  ---
17
26
 
18
27
  # HTTP Authoring API
@@ -23,4 +32,4 @@ Proposal inspection and mutation endpoints require an exact bearer token supplie
23
32
 
24
33
  The API delegates all authoring behavior to the same service and file store used by MCP root and project modes. Proposal acceptance therefore uses the same validation, identity, revision, and path safeguards described by the [authoring safety policy](../policies/authoring-safety.md).
25
34
 
26
- The default listener is local. This API is not an MCP Streamable HTTP transport, authentication service, hosted multi-tenant control plane, or distributed storage layer. Public deployment requires additional transport, identity, TLS, persistence, and concurrency design.
35
+ The default listener is local. This API is not MCP over HTTP, which `mcp --http` serves (the [MCP HTTP transport](mcp-http.md)), nor an authentication service, hosted multi-tenant control plane, or distributed storage layer. Public deployment requires additional transport, identity, TLS, persistence, and concurrency design.
@@ -0,0 +1,64 @@
1
+ ---
2
+ type: OKF Interface
3
+ title: MCP HTTP Transport
4
+ description: Streamable HTTP serving of the MCP tools with per-request principals, bearer authentication, and index refresh while serving.
5
+ tags:
6
+ - mcp
7
+ - http
8
+ - streamable-http
9
+ - authentication
10
+ - interface
11
+ - cors
12
+ relations:
13
+ - type: depends_on
14
+ target: okf://okf-mcp/runtime/mcp-server
15
+ - type: related_to
16
+ target: okf://okf-mcp/interfaces/mcp-tools
17
+ - type: related_to
18
+ target: okf://okf-mcp/policies/authoring-safety
19
+ - type: configured_by
20
+ target: repo://src/mcp/http.js
21
+ - type: configured_by
22
+ target: repo://src/mcp/auth.js
23
+ - type: configured_by
24
+ target: repo://src/mcp/principal.js
25
+ - type: configured_by
26
+ target: repo://src/cli/http-options.js
27
+ - type: checked_by
28
+ target: repo://test/call-queue.test.js
29
+ - type: checked_by
30
+ target: repo://test/mcp-principal.test.js
31
+ - type: checked_by
32
+ target: repo://test/http-mcp-contract.test.js
33
+ - type: checked_by
34
+ target: repo://test/http-auth.test.js
35
+ - type: checked_by
36
+ target: repo://test/http-refresh.test.js
37
+ - type: checked_by
38
+ target: repo://test/http-remote-load.test.js
39
+ - type: configured_by
40
+ target: repo://src/tool-packs.js
41
+ - type: checked_by
42
+ target: repo://test/http-cors.test.js
43
+ - type: checked_by
44
+ target: repo://test/http-proposals.test.js
45
+ - type: checked_by
46
+ target: repo://test/tool-packs.test.js
47
+ generated:
48
+ by: anthropic/claude-code
49
+ at: 2026-11-14T18:17:23.039Z
50
+ ---
51
+
52
+ # MCP HTTP Transport
53
+
54
+ `okf mcp --http` serves the [MCP server](../runtime/mcp-server.md)'s resources, tools and schemas over Streamable HTTP instead of stdio. A small `node:http` bridge hands each request to the SDK's `createMcpHandler` as a web `Request`; the handler serves the `2026-07-28` revision and, through its stateless fallback, 2025-era clients including the `2025-11-25` `initialize` handshake. No session is kept, so `GET` and `DELETE` on the endpoint answer `405` to 2025-era clients.
55
+
56
+ The server binds `--host` (default `127.0.0.1`) and `--port` (default `8766`). `--public-url` names the URL clients use: its path is the endpoint path (default `/mcp`, answered with and without one trailing slash), its host is an accepted `Host`, and with introspection it is the token audience. Every request must carry an accepted `Host` (the localhost names, the public host, and `--allowed-host` values); requests to the endpoint must also come from an accepted browser `Origin` when they carry one (`--allowed-origin`), and are refused above 1 MiB with `413`. For an accepted browser origin the endpoint answers CORS: an `OPTIONS` preflight gets `204` before any authentication, and every answer, refusals included, echoes the exact origin (`Vary: Origin`) and exposes `WWW-Authenticate` and `Mcp-Session-Id`; a foreign origin gets `403` without CORS headers. `GET /health` answers `{"status":"ok"}`, also beside a deeper endpoint path (`/okf/mcp` gives `/okf/health`).
57
+
58
+ Each request builds an MCP server over the one shared catalog state for the request's principal, so tool calls from every client go through the state's single call queue. A principal carries a subject, an actor, scopes and optionally a name and an email. `okf.read` is required for any call; `okf.write` adds the live batch tools (with `--write`), producer runs, the stored-proposal reads `okf_list_proposals` and `okf_get_proposal` (whose candidate Markdown the REST API guards with its write token) and runtime remote loading (with `--allow-remote-tool`), which a principal without it neither sees nor can call; `list_bundles` shows absolute server paths only to it. Scopes outside `okf.*`, such as `odoo.read`, gate tool-pack tools. Writes stamp the principal's actor and are judged by the write policy for it; with `--git-commit` its name and email become the commit author, a missing one falling back to the configured identity, which stays the committer.
59
+
60
+ Without `--auth` every caller is anonymous and read-only, which is allowed only on a loopback address; `--write` then is a usage error, and `--authoring` is not available over HTTP. `--auth tokens:<file>` reads a YAML list of `{ sha256, subject, actor, scopes }`, so tokens are kept only as SHA-256 hashes. `--auth introspect:<url>` with `--authorization-server <issuer>` checks opaque bearer tokens by RFC 7662 introspection: it posts `token=<access token>` with HTTP Basic client credentials taken only from `OKF_INTROSPECTION_CLIENT_ID` and `OKF_INTROSPECTION_CLIENT_SECRET`, and accepts a token when `active` is true, `aud` equals the public URL (one trailing slash ignored on either side), `exp` is in the future and `scope` holds `okf.read`. The actor is `human:<username>` with every character outside `[A-Za-z0-9._@+-]` mapped to `-`, so it can never take the `provider/model` form. Accepted answers are cached by token hash until the earlier of `exp` and 60 seconds and refused ones for 30 seconds, in bounded LRU caches; at most 8 introspections run at once, and a request that would need a ninth gets `503`.
61
+
62
+ A refused or missing token gets `401` with a `WWW-Authenticate` challenge naming the RFC 9728 protected-resource metadata, which the server publishes with the configured issuer; a token without `okf.read` gets `403`; an authorization server that cannot answer gives `503` without detail. okf-mcp is only a resource server and never issues tokens. Token values never appear in responses, errors or logs, and the caches keep only their hash; the verified token is handed on only to tool-pack handlers, as `ctx.subjectToken`, so a pack can act for the caller on a data API of the authorization server.
63
+
64
+ Before a tool call or resource read (never `initialize`, `ping` or `tools/list`), at most once per `--refresh-interval` (default 2,000 ms), the server refreshes its index from disk inside the call queue, in the calls' order, so files changed outside okf-mcp are served without a restart. Behind a reverse proxy, okf-mcp binds a loopback address, the proxy terminates TLS, forwards the endpoint path, the health path and the metadata path unchanged with the `Authorization` header, sends an accepted `Host`, and does not buffer the Server-Sent Events responses. The [tool catalog](mcp-tools.md) and the [authoring safety policy](../policies/authoring-safety.md) apply unchanged.
@@ -3,7 +3,11 @@ id: okf://okf-mcp/interfaces/mcp-tools
3
3
  type: OKF Interface
4
4
  title: MCP Tool Catalog
5
5
  description: Agent-facing tool contract for discovery, graph navigation, validation, producer execution, remote loading, and authoring.
6
- tags: [mcp, tools, interface, agents]
6
+ tags:
7
+ - mcp
8
+ - tools
9
+ - interface
10
+ - agents
7
11
  relations:
8
12
  - type: depends_on
9
13
  target: okf://okf-mcp/runtime/mcp-server
@@ -27,6 +31,19 @@ relations:
27
31
  target: repo://test/live-agent-workflow.test.js
28
32
  - type: checked_by
29
33
  target: repo://test/producer.test.js
34
+ - type: related_to
35
+ target: okf://okf-mcp/interfaces/mcp-http
36
+ - type: checked_by
37
+ target: repo://test/mcp-principal.test.js
38
+ - type: checked_by
39
+ target: repo://test/http-remote-load.test.js
40
+ - type: configured_by
41
+ target: repo://src/tool-packs.js
42
+ - type: checked_by
43
+ target: repo://test/tool-packs.test.js
44
+ generated:
45
+ by: anthropic/claude-code
46
+ at: 2026-11-14T18:17:23.039Z
30
47
  ---
31
48
 
32
49
  # MCP Tool Catalog
@@ -43,18 +60,20 @@ Static computation tools inspect contracts, read indexed assets, prepare paramet
43
60
 
44
61
  `read_git_source` reads one pinned `sources[].git` entry from a checkout or bare repository explicitly mapped by the MCP host. It reads the Git object database rather than the working tree and never fetches. Oversized content errors include the observed size, active limit, maximum supported limit, and whether a bounded retry can succeed.
45
62
 
46
- An explicit local root or project workspace exposes candidate validation, path suggestion, and proposal inspection. Normal proposal mutations require `--authoring`; the coordinated computation proposal additionally requires `--allow-computation-authoring`. `--write --actor <actor>` exposes read-only `okf_validate_changes` plus destructive `okf_apply_changes`, both accepting the same structured create/update batch grammar without requiring agents to compose YAML. Runtime calls to `load_remote_bundle` require `--allow-remote-tool`.
63
+ An explicit local root or project workspace exposes candidate validation, path suggestion, and proposal inspection. Normal proposal mutations require `--authoring`; the coordinated computation proposal additionally requires `--allow-computation-authoring`. `--write --actor <actor>` exposes read-only `okf_validate_changes` plus destructive `okf_apply_changes`, both accepting the same structured create/update batch grammar without requiring agents to compose YAML. Runtime calls to `load_remote_bundle` require `--allow-remote-tool`. Over HTTP the calling principal also needs the `okf.write` scope for the live batch tools, `okf_run_producer` and `load_remote_bundle`; without it they are neither listed nor callable, exactly as when the flag is missing.
47
64
 
48
65
  A project with configured producers exposes `okf_list_producers` and `okf_preview_producer`. Listing is static and does not execute producer packages. Preview loads only the package allowlisted by the selected project entry, reads source metadata, and validates a complete candidate graph without changing destination files. `--write --actor <actor>` additionally exposes destructive `okf_run_producer`. Producer tool inputs select only a configured instance and receipt detail; clients cannot supply packages, connection values, SQL, bundle IDs, configuration, or output paths.
49
66
 
50
- Producer receipts report configured identity, bounded numeric source summaries, relative-path diffs, publication counts, and validation. They omit generated contents, configuration, secrets, connection details, and absolute paths. Run repeats generation and strict OKF v0.2 validation under the shared writer queue, publishes only manifest-owned files, validates persisted state, and refreshes the index.
67
+ Producer receipts report configured identity, bounded numeric source summaries, relative-path diffs, publication counts, and validation. They omit generated contents, configuration, secrets, connection details, and absolute paths. A producer that fails with its own bounded error code reports that code and its scalar details as one diagnostic; its error message is never forwarded. Run repeats generation and strict OKF v0.2 validation under the shared writer queue, publishes only manifest-owned files, validates persisted state, and refreshes the index.
51
68
 
52
- `okf_validate_changes` and `okf_apply_changes` plan 1–100 operations as one future graph, including cross-batch and loaded-remote references plus same-type/title conflicts. Validation returns a non-durable time-of-check receipt. Apply repeats planning under the process-local writer queue, stamps one server-owned `generated.at` with the configured `generated.by`, publishes the complete local batch, validates persisted state, and refreshes the index. Compact receipts are the default; `detail: "full"` retains the richer planning layout. Relation effects are structured, and generated provenance is separate from substantive changed fields.
69
+ `okf_validate_changes` and `okf_apply_changes` plan 1–100 operations as one future graph, including cross-batch and loaded-remote references plus same-type/title conflicts. Validation returns a non-durable time-of-check receipt. Apply repeats planning under the process-local writer queue, stamps one server-owned `generated.at` with the call's actor as `generated.by` (`--actor` over stdio, the principal's actor over HTTP), publishes the complete local batch, validates persisted state, and refreshes the index. Compact receipts are the default; `detail: "full"` retains the richer planning layout. Relation effects are structured, and generated provenance is separate from substantive changed fields.
53
70
 
54
71
  Optional `--git-commit` policy rejects filter declarations and hidden `assume-unchanged`/`skip-worktree` index flags, disables replace-object resolution, pins the checked-out symbolic branch, constructs an isolated index from validated bytes, and publishes its exact tree with a compare-and-swap ref update from a clean worktree. The shared index is not used to assemble the commit, so unrelated concurrently staged paths cannot enter it; only affected index paths are synchronized after publication. Determinate failures preserve matching valid working-tree files. Ambiguous outcomes, checkout changes, target replacements, and best-effort revision-checked rollback conflicts are reported explicitly; the tool never pushes.
55
72
 
56
- Every tool supplies a purpose-specific description, descriptions for all input parameters, and MCP annotations for read behavior, destructive behavior, idempotency, and external access. Tool discovery and direct invocation use the same capability checks, so a hidden tool also fails when called by name. Annotations remain hints to clients; server-side validation is authoritative.
73
+ Every tool supplies a purpose-specific description, descriptions for all input parameters, and MCP annotations for read behavior, destructive behavior, idempotency, and external access. Tool discovery and direct invocation use the same capability checks for the same principal, so a hidden tool also fails when called by name. Annotations remain hints to clients; server-side validation is authoritative.
57
74
 
58
75
  The official MCP SDK validates tool arguments against the advertised schema without coercion. Unknown or disabled tools are rejected by SDK dispatch. Argument-schema failures and expected validation, storage, network, read-only, and proposal-conflict failures from enabled tools are returned as tool results with `isError: true`. A validation operation that successfully reports invalid OKF remains a successful tool result.
59
76
 
60
- `search_concepts` and the optional text query on `list_concepts` require every case-insensitive query term, regardless of order. They rank title, type, tags, aliases, description, path, and body while keeping arbitrary frontmatter as an exact structured filter. Compact MCP results expose the URI plus bounded title, type, and description; `detail: "full"` returns navigation metadata, signals, ranking, and snippets. Queries are bounded to 512 characters and 16 terms; fuzzy, prefix, stemming, and stop-word expansion are not applied. Scores are relative retrieval scores rather than a stable public scale. Relation-type filtering selects concepts with an outgoing relation of the requested type.
77
+ `search_concepts` and the optional text query on `list_concepts` run in mode `auto` by default: concepts matching every term come first, and when fewer than `autoFill` (default 3) do, concepts matching some of the terms follow; `all` and `any` are explicit modes. Terms are stemmed in the catalog's languages (`auto` uses the Italian and English stemmers a bundle's documents call for; `languages` overrides it), diacritics are folded, stop words and single letters are dropped, and quoted or identifier-like terms are matched literally against ids, paths, aliases, titles and raw tokens. Queries are bounded to 512 characters and 16 terms after stop words. Each result carries `coverage` and `relevance`; the response reports the mode that ran, `queryTerms`, `droppedTerms`, `allTermsTotal`, `lowConfidence` and a `confidence` block, and with a configured embedder the ranking fuses lexical and semantic scores. Compact MCP results expose the URI plus bounded title, type, and description; `detail: "full"` returns navigation metadata, signals, ranking, and snippets. Scores are relative retrieval scores rather than a stable public scale. Relation-type filtering selects concepts with an outgoing relation of the requested type.
78
+
79
+ Configured tool packs, experimental and outside the 1.0 freeze, add read tools after the core tools: npm packages listed by exact name in the project's `toolPacks` and loaded from its `node_modules`. A principal sees a pack tool with `okf.read` and the tool's scope; its arguments are validated like core tool arguments, its errors reach the caller only as bounded codes and scalar details, and it runs outside the call queue unless the pack serializes. Over HTTP the caller's verified token reaches the pack's handler as its subject (the [MCP HTTP transport](mcp-http.md)).
@@ -2,8 +2,13 @@
2
2
  id: okf://okf-mcp/overview/okf-mcp
3
3
  type: OKF Product
4
4
  title: okf-mcp
5
- description: Project-agnostic OKF CLI, graph index, MCP stdio server, validated producer host, and authoring runtime.
6
- tags: [okf, mcp, runtime, knowledge-graph]
5
+ description: Project-agnostic OKF CLI, graph index, MCP server over stdio and Streamable HTTP, validated producer host, and authoring runtime.
6
+ tags:
7
+ - okf
8
+ - mcp
9
+ - runtime
10
+ - knowledge-graph
11
+ - http
7
12
  relations:
8
13
  - type: depends_on
9
14
  target: okf://okf-mcp/runtime/mcp-server
@@ -17,14 +22,19 @@ relations:
17
22
  target: okf://okf-mcp/distribution/reference-bundle
18
23
  - type: configured_by
19
24
  target: repo://package.json
25
+ - type: related_to
26
+ target: okf://okf-mcp/interfaces/mcp-http
27
+ generated:
28
+ by: anthropic/claude-code
29
+ at: 2026-11-14T17:33:39.682Z
20
30
  ---
21
31
 
22
32
  # okf-mcp
23
33
 
24
- `okf-mcp` turns one OKF v0.2 root and its explicitly referenced inert assets into a searchable in-memory knowledge graph. It provides a CLI, SDK-backed stdio MCP server, pinned Git-source reads, optional workspace federation, built-in generator plugins, configured external producers, remote GitHub bundles, and an HTTP authoring API.
34
+ `okf-mcp` turns one OKF v0.2 root and its explicitly referenced inert assets into a searchable in-memory knowledge graph. It provides a CLI, SDK-backed MCP server over stdio and Streamable HTTP, pinned Git-source reads, optional workspace federation, built-in generator plugins, configured external producers, remote GitHub bundles, and an HTTP authoring API.
25
35
 
26
- The runtime uses `js-yaml`, CommonMark, and a process-local MiniSearch BM25+ text index. It has no database, embedding service, computation executor, attester runtime, or build step. `--root` is the normal single-catalog interface and performs no network calls. The optional project manifest federates multiple roots and generator configuration; it is an okf-mcp extension rather than part of OKF v0.2.
36
+ The runtime uses `js-yaml`, CommonMark, and a process-local MiniSearch BM25+ text index. It has no database, embedding service, computation executor, attester runtime, or build step. `--root` is the normal single-catalog interface and performs no network calls; MCP over HTTP listens only when started with `--http` and contacts an authorization server only with `--auth introspect:`. The optional project manifest federates multiple roots and generator configuration; it is an okf-mcp extension rather than part of OKF v0.2.
27
37
 
28
- The primary runtime entry is the [MCP stdio server](../runtime/mcp-server.md). Concept interpretation and graph construction belong to the [indexer](../runtime/indexer.md). Configured metadata sources run through the [producer host](../runtime/producer-host.md) and its [publication workflow](../workflows/producer-publication.md). Durable knowledge changes follow the [concept authoring workflow](../workflows/concept-authoring.md) and [authoring safety policy](../policies/authoring-safety.md).
38
+ The primary runtime entry is the [MCP server](../runtime/mcp-server.md); its [HTTP transport](../interfaces/mcp-http.md) serves the same tools to remote clients, each request for an authenticated principal. Concept interpretation and graph construction belong to the [indexer](../runtime/indexer.md). Configured metadata sources run through the [producer host](../runtime/producer-host.md) and its [publication workflow](../workflows/producer-publication.md). Durable knowledge changes follow the [concept authoring workflow](../workflows/concept-authoring.md) and [authoring safety policy](../policies/authoring-safety.md).
29
39
 
30
- The HTTP server is an authoring API rather than a remotely hosted MCP transport. The canonical public architectural reference is this [published reference bundle](../distribution/reference-bundle.md), shipped with the npm package and described for discovery by the MCP Registry metadata.
40
+ The separate HTTP authoring API is a REST interface for proposals, not an MCP transport. The canonical public architectural reference is this [published reference bundle](../distribution/reference-bundle.md), shipped with the npm package and described for discovery by the MCP Registry metadata.
@@ -3,7 +3,11 @@ id: okf://okf-mcp/policies/authoring-safety
3
3
  type: OKF Policy
4
4
  title: Authoring Safety
5
5
  description: Invariants protecting project boundaries, concept identity, review state, and concurrent edits.
6
- tags: [policy, safety, authoring, filesystem]
6
+ tags:
7
+ - policy
8
+ - safety
9
+ - authoring
10
+ - filesystem
7
11
  relations:
8
12
  - type: related_to
9
13
  target: okf://okf-mcp/runtime/file-concept-store
@@ -19,6 +23,8 @@ relations:
19
23
  target: repo://src/store.js
20
24
  - type: configured_by
21
25
  target: repo://src/live-authoring.js
26
+ - type: configured_by
27
+ target: repo://src/policy/write-policy.js
22
28
  - type: checked_by
23
29
  target: repo://test/okf-mcp.test.js
24
30
  - type: checked_by
@@ -31,11 +37,26 @@ relations:
31
37
  target: repo://test/live-agent-workflow.test.js
32
38
  - type: checked_by
33
39
  target: repo://test/producer.test.js
40
+ - type: checked_by
41
+ target: repo://test/write-policy.test.js
42
+ - type: checked_by
43
+ target: repo://test/write-policy-enforcement.test.js
44
+ - type: checked_by
45
+ target: repo://test/content-boundary.test.js
46
+ - type: related_to
47
+ target: okf://okf-mcp/interfaces/mcp-http
48
+ - type: configured_by
49
+ target: repo://src/mcp/auth.js
50
+ - type: checked_by
51
+ target: repo://test/http-auth.test.js
52
+ generated:
53
+ by: anthropic/claude-code
54
+ at: 2026-11-14T17:33:39.682Z
34
55
  ---
35
56
 
36
57
  # Authoring Safety
37
58
 
38
- Authoring is allowed for an explicit local `--root` or local roots declared by `okf.project.yaml`. MCP proposal mutations require `--authoring`; coordinated computation proposals also require `--allow-computation-authoring`. Direct authoring requires `--write` and a configured actor. Remote roots are read only.
59
+ Authoring is allowed for an explicit local `--root` or local roots declared by `okf.project.yaml`. MCP proposal mutations require `--authoring`; coordinated computation proposals also require `--allow-computation-authoring`. Direct authoring requires `--write` and a configured actor; over HTTP the calling principal also needs the `okf.write` scope, and `--authoring` is not available. Remote roots are read only.
39
60
 
40
61
  Concept paths must be safe relative `.md` paths inside the selected bundle. Absolute paths, parent traversal, hidden/control-plane segments such as `.git`, case-insensitive reserved `index.md` and `log.md` targets, Markdown-file ancestor segments, symbolic-link traversal, and non-directory parents are rejected.
41
62
 
@@ -45,16 +66,18 @@ Candidates must satisfy the concept format, configured relation vocabulary, and
45
66
 
46
67
  Proposal creation never writes a concept file. Acceptance repeats validation. Updates also compare the source revision immediately before replacement and return conflicts for detected concurrent changes. After acceptance, the MCP index is rebuilt without discarding configured or runtime-loaded remote bundle state.
47
68
 
48
- Direct authoring exposes a read-only batch validator and one destructive apply tool with the same structured grammar. They share the combined-future-graph planner, while apply repeats the plan under one process-local writer lock, stamps generation metadata at the server boundary, stages every file before publication, and validates persisted state. It rejects generated-file flags, `process:*` generation owners, configured generator outputs, and computation contracts.
69
+ Direct authoring exposes a read-only batch validator and one destructive apply tool with the same structured grammar. They share the combined-future-graph planner, while apply repeats the plan under one process-local writer lock, stamps generation metadata with the call's actor at the server boundary, stages every file before publication, and validates persisted state. It rejects generated-file flags, `process:*` generation owners, configured generator outputs, and computation contracts.
70
+
71
+ An optional write policy narrows direct authoring and proposals per actor. It is trusted configuration only (`writePolicy` in `okf.project.yaml`, or `--policy <file>` with `--root`), never a tool or HTTP argument. Proposals are judged when stored, against the proposing actor, and again before acceptance writes them, against the recorded actor (else the accepting one), which publishes a create with the default status it was judged with; a write without an actor is judged as the literal actor `unknown`. Producers are judged under `process:<name>` only when the policy sets `applyToProducers: true`, and their output, which is never rewritten, must carry any required status itself. An ordered list of rules matches the call's actor (the configured actor over stdio, the principal's over HTTP) and, optionally, bundle ids, concept paths (a fixed glob subset of `*`, `**`, and literal segments, never compiled to a regular expression, with traversal and absolute patterns rejected at load), and concept types. The first matching rule decides; otherwise `defaultEffect` (`allow` unless set to `deny`) does. Allow rules may require frontmatter fields, stamp a `defaultStatus` on creates that set none, and cap the concepts per batch. Only the concepts a batch creates or updates are judged; existing content is never retro-validated. Violations are structured `policy_violation` records carrying the deciding rule id, a reason (`actor_denied`, `bundle_denied`, `path_denied`, `type_denied`, `missing_required_field`, `batch_too_large`), and the path, bundle, URI, or field involved. The batch validator reports them read-only, and apply rejects the batch before staging or writing any file. Their messages, like every error message, name rules, paths, and URIs, never catalog text.
49
72
 
50
73
  Configured producer bundle roots are also protected from direct authoring. A producer candidate must declare and emit OKF v0.2, carry valid native generation and source provenance on every concept, contain no producer-owned graph failures, and leave the complete future project conformant and valid. Secret values requested through the host are rejected if they appear in generated bytes. Invalid previews remain inspectable but are never publishable.
51
74
 
52
75
  Producer ownership is recorded in `.okf-producer.json` with relative paths and content digests. New unowned path collisions, modified owned files, corrupt or foreign manifests, path traversal, and symbolic-link traversal block publication. Only unchanged paths owned by the previous manifest may be removed. The manifest is written last after staged publication, and persisted validation failures trigger revision-aware rollback.
53
76
 
54
- Rollback revision-checks a published target immediately before restoring it. Detected external replacements are preserved and reported as rollback conflicts, but this is best-effort detection rather than a cross-process compare-and-swap primitive. Optional Git commits require a clean worktree before publication, reject active filter attributes and hidden `assume-unchanged`/`skip-worktree` index flags, and disable replace-object resolution. They build an isolated index directly from validated Markdown bytes, create the exact tree without mutating the shared index, publish it through a compare-and-swap ref update, synchronize only affected ordinary-index paths afterward, and never push. Commit, target, index, and durability states remain explicit when a timeout or concurrent replacement cannot be classified safely.
77
+ Rollback revision-checks a published target immediately before restoring it. Detected external replacements are preserved and reported as rollback conflicts, but this is best-effort detection rather than a cross-process compare-and-swap primitive. Optional Git commits require a clean worktree before publication, reject active filter attributes and hidden `assume-unchanged`/`skip-worktree` index flags, and disable replace-object resolution. Untracked files count as a dirty worktree, so with `--git-commit` the proposal directory (`.okf-proposals/` by default, or the `--proposal-root` location) must be ignored by Git. They build an isolated index directly from validated Markdown bytes, create the exact tree without mutating the shared index, publish it through a compare-and-swap ref update, synchronize only affected ordinary-index paths afterward, and never push. The commit's author is the calling principal's name and email when it carries them, a missing field falling back to the repository's configured identity; the committer is always that configured identity. Commit, target, index, and durability states remain explicit when a timeout or concurrent replacement cannot be classified safely.
55
78
 
56
79
  Computation, executor, and attester artifacts are always inert. Inspection and preflight never execute them, fetch external contract URIs, echo parameter or receipt values, persist receipts, or claim attestation. Migration adds no unverifiable provenance or trust claims and never accepts its own proposals.
57
80
 
58
- HTTP mutations require bearer authorization. Filesystem safeguards still apply after authentication.
81
+ Authoring API mutations require its bearer token. MCP over HTTP authenticates every request, with a token file of SHA-256 hashes or RFC 7662 introspection, and never logs, echoes, or stores token values. Filesystem safeguards still apply after authentication.
59
82
 
60
83
  The local file store is designed for one trusted root or project workspace. Multiple independent authoring workers require an external coordination or locking strategy.
@@ -3,7 +3,11 @@ id: okf://okf-mcp/runtime/indexer
3
3
  type: OKF Runtime Component
4
4
  title: OKF Indexer
5
5
  description: Builds the validated in-memory document, concept, relation, and reference graph.
6
- tags: [indexer, graph, validation, runtime]
6
+ tags:
7
+ - indexer
8
+ - graph
9
+ - validation
10
+ - runtime
7
11
  relations:
8
12
  - type: consumes
9
13
  target: okf://okf-mcp/specs/concept-format
@@ -19,6 +23,13 @@ relations:
19
23
  target: repo://test/conformance.test.js
20
24
  - type: checked_by
21
25
  target: repo://test/directory-links.test.js
26
+ - type: configured_by
27
+ target: repo://src/indexer/update.js
28
+ - type: checked_by
29
+ target: repo://test/http-refresh.test.js
30
+ generated:
31
+ by: anthropic/claude-code
32
+ at: 2026-11-14T17:33:39.682Z
22
33
  ---
23
34
 
24
35
  # OKF Indexer
@@ -35,6 +46,8 @@ Validation is layered. OKF conformance checks UTF-8, parseable mapping frontmatt
35
46
 
36
47
  Remote loading is two-pass: selected Markdown is parsed first, then only referenced local assets are fetched. Revision and blob metadata, digests, counts, and unresolved references remain attached to the read-only bundle.
37
48
 
49
+ An index can be brought up to date with its local roots without a rebuild: a refresh compares each Markdown file's and referenced asset's size and modification time with what the index recorded and applies the differences incrementally, returning the same index when nothing changed (about 35 ms at 5,000 concepts). Writes refresh before each batch, and the MCP server over HTTP refreshes before requests at most once per refresh interval. An edit that preserves both size and modification time is not seen.
50
+
38
51
  Results expose `conformant`, `validForProject`, and structured diagnostics. `valid` is a compatibility alias for `validForProject`. Valid concepts continue to be served even when other files produce diagnostics.
39
52
 
40
53
  The [concept format](../specs/concept-format.md) is the input contract. Indexed results power the discovery and graph families in the [MCP tool catalog](../interfaces/mcp-tools.md).
@@ -1,9 +1,14 @@
1
1
  ---
2
2
  id: okf://okf-mcp/runtime/mcp-server
3
3
  type: OKF Runtime Component
4
- title: MCP Stdio Server
5
- description: JSON-RPC stdio MCP runtime exposing OKF resources and tools.
6
- tags: [mcp, stdio, json-rpc, runtime]
4
+ title: MCP Server
5
+ description: SDK-backed MCP runtime exposing OKF resources and tools over stdio and Streamable HTTP, one call queue per process.
6
+ tags:
7
+ - mcp
8
+ - stdio
9
+ - json-rpc
10
+ - runtime
11
+ - http
7
12
  relations:
8
13
  - type: depends_on
9
14
  target: okf://okf-mcp/runtime/indexer
@@ -23,20 +28,23 @@ relations:
23
28
  target: repo://test/mcp-sdk.test.js
24
29
  - type: checked_by
25
30
  target: repo://test/producer.test.js
31
+ generated:
32
+ by: anthropic/claude-code
33
+ at: 2026-11-14T17:33:39.682Z
26
34
  ---
27
35
 
28
- # MCP Stdio Server
36
+ # MCP Server
29
37
 
30
- The MCP server exposes OKF resources and tools over stdio through the official `@modelcontextprotocol/server` v2 SDK. The application adapter registers the existing schemas and handlers; the SDK owns framing, negotiation, validation, and dispatch.
38
+ The MCP server exposes OKF resources and tools through the official `@modelcontextprotocol/server` v2 SDK, over stdio by default and over Streamable HTTP with `mcp --http` (the [MCP HTTP transport](../interfaces/mcp-http.md)). The application adapter registers the existing schemas and handlers; the SDK owns framing, negotiation, validation, and dispatch.
31
39
 
32
- The SDK serves the modern `2026-07-28` revision and its compatibility path for 2025-era clients, including `2025-11-25`. Both paths expose the same OKF resources, enabled tools, schemas, and application behavior.
40
+ On both transports the SDK serves the modern `2026-07-28` revision and its compatibility path for 2025-era clients, including `2025-11-25`, stateless over HTTP. All paths expose the same OKF resources, schemas, and application behavior.
33
41
 
34
42
  The SDK validates protocol messages and tool arguments before application dispatch. Expected application failures return tool results with `isError: true`; unexpected implementation failures are masked. Stdout remains reserved for protocol messages.
35
43
 
36
44
  Each indexed Markdown document is exposed as a `text/markdown` resource. The [MCP tool catalog](../interfaces/mcp-tools.md) exposes discovery, search, graph navigation, validation, remote loading, configured producer preview/run, proposal-based authoring, and explicitly gated live batch validation/apply.
37
45
 
38
- Root mode is the normal single-catalog interface and can supply the local store used by the [authoring workflow](../workflows/concept-authoring.md). Project mode remains an optional federation/configuration extension and is required for producer instances. Configured projects expose static producer discovery and read-only preview; producer run and live batch tools remain disabled unless the server starts with `--write --actor <actor>`. Proposal mutation tools remain disabled unless it starts with `--authoring`; runtime remote loading remains disabled unless it starts with `--allow-remote-tool`.
46
+ Root mode is the normal single-catalog interface and can supply the local store used by the [authoring workflow](../workflows/concept-authoring.md). Project mode remains an optional federation/configuration extension and is required for producer instances. Configured projects expose static producer discovery and read-only preview; producer run and live batch tools remain disabled unless the server starts with `--write --actor <actor>`. Proposal mutation tools remain disabled unless it starts with `--authoring`; runtime remote loading remains disabled unless it starts with `--allow-remote-tool`. Every call runs for a principal whose scopes decide the available tools: over stdio it comes from the flags (`--actor`, and `okf.write` only with `--write`). One server state, and one call queue, backs every server instance in the process.
39
47
 
40
48
  Remote GitHub bundles are fetched as Markdown and added to the in-memory index. They remain read only and never execute remote code. After an accepted local proposal, one reconstruction path rebuilds the index from configured local bundles, configured remote bundles, and runtime-loaded remote bundles, preserving remote concepts and relationships. The lexical search index is cached against that reconstructed OKF index, so the next query builds a fresh per-server BM25+ view without global or persisted state.
41
49
 
42
- This component is a stdio MCP transport. The separate [HTTP authoring API](../interfaces/http-authoring-api.md) does not implement MCP over HTTP.
50
+ The separate [HTTP authoring API](../interfaces/http-authoring-api.md) is a REST interface for proposals, not MCP.
@@ -3,7 +3,11 @@ id: okf://okf-mcp/specs/producer-api
3
3
  type: OKF Extension Contract
4
4
  title: Producer API
5
5
  description: Versioned Node.js contract for configured metadata producers that return candidate OKF v0.2 documents without publishing them.
6
- tags: [okf, producer, extension, api]
6
+ tags:
7
+ - okf
8
+ - producer
9
+ - extension
10
+ - api
7
11
  relations:
8
12
  - type: depends_on
9
13
  target: okf://okf-mcp/specs/concept-format
@@ -11,13 +15,23 @@ relations:
11
15
  target: okf://okf-mcp/runtime/producer-host
12
16
  - type: configured_by
13
17
  target: repo://src/producers.js
18
+ - type: checked_by
19
+ target: repo://test/producer.test.js
20
+ generated:
21
+ by: anthropic/claude-code
22
+ at: 2026-11-14T17:33:39.682Z
14
23
  ---
15
24
 
16
25
  # Producer API
17
26
 
18
27
  A producer package exports `okfProducer`. The descriptor declares producer API version `1`, target OKF version `0.2`, stable identity, package version, relation vocabulary, configuration validation, and one asynchronous `generate` function.
19
28
 
20
- The host supplies a configured bundle ID, normalized trusted configuration, one generation timestamp, cancellation signal, and a bounded secret resolver. Generation may read source metadata but must not write destination files. It returns sorted bundle-relative Markdown candidates plus a numeric summary. It receives no destination path and has no preview or apply authority.
29
+ The host supplies a configured bundle ID, normalized trusted configuration, one generation timestamp, cancellation signal, and a bounded secret resolver. Generation may read source metadata but must not write destination files. It returns sorted bundle-relative Markdown candidates plus a numeric summary. It receives no destination path and has no preview or apply authority. A producer that cannot generate may throw an error carrying its own `code` (`^[a-z][a-z0-9_]{0,63}
30
+ # Producer API
31
+
32
+ A producer package exports `okfProducer`. The descriptor declares producer API version `1`, target OKF version `0.2`, stable identity, package version, relation vocabulary, configuration validation, and one asynchronous `generate` function.
33
+
34
+ The host supplies a configured bundle ID, normalized trusted configuration, one generation timestamp, cancellation signal, and a bounded secret resolver. Generation may read source metadata but must not write destination files. It returns sorted bundle-relative Markdown candidates plus a numeric summary. , for example `access_denied`) and a `details` object of scalar values; the host reports both as one diagnostic of an invalid receipt, keeping identifier keys with finite numbers, booleans, null, or single-line strings of at most 200 characters that hold no secret the producer read. The error's message is never forwarded, and an error without such a code is reported as `producer_execution_failed`.
21
35
 
22
36
  Producer configuration comes only from `okf.project.yaml`. MCP callers select one configured instance and cannot replace its package, bundle, configuration, credentials, queries, or output location. Packages are already installed and are resolved from the trusted project root; okf-mcp never installs or fetches producer code.
23
37
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mfdaves/okf-mcp",
3
- "version": "0.9.1",
3
+ "version": "0.13.0-rc.1",
4
4
  "description": "Local-first Open Knowledge Format validator, graph index, CLI, and MCP stdio server.",
5
5
  "homepage": "https://github.com/mfdaves/okf-mcp#readme",
6
6
  "repository": {
@@ -18,14 +18,22 @@
18
18
  "okf-mcp": "bin/okf-mcp.js"
19
19
  },
20
20
  "scripts": {
21
- "test": "node --test",
22
- "check": "node --test",
21
+ "test": "node --test \"test/*.test.js\"",
22
+ "check": "node --test \"test/*.test.js\"",
23
+ "lint": "biome lint",
24
+ "format": "biome format --write",
25
+ "format:check": "biome format",
23
26
  "self:validate": "node bin/okf-mcp.js --root okf/okf-mcp validate",
24
27
  "pack:check": "npm pack --dry-run",
25
28
  "package:smoke": "node scripts/package-smoke.js",
26
29
  "prepublishOnly": "npm run check && npm run self:validate",
27
30
  "inspect": "node bin/okf-mcp.js --help",
28
- "start": "node bin/okf-mcp.js"
31
+ "start": "node bin/okf-mcp.js",
32
+ "eval:search": "node scripts/eval-search.js --fixture alpinaria --fixture atlas --split all",
33
+ "bench:search": "node --expose-gc scripts/search-benchmark.js --root test/fixtures/retrieval/alpinaria/bundles/alpinaria --qrels test/fixtures/retrieval/alpinaria/queries.json --rounds 20",
34
+ "bench:index": "node --expose-gc scripts/index-benchmark.js --rounds 10",
35
+ "bench:write": "node scripts/write-benchmark.js",
36
+ "eval:context": "node scripts/eval-context.js --fixture alpinaria --fixture atlas"
29
37
  },
30
38
  "keywords": [
31
39
  "mcp",
@@ -44,6 +52,7 @@
44
52
  "okf.project.yaml",
45
53
  "server.json",
46
54
  "README.md",
55
+ "CHANGELOG.md",
47
56
  "LICENSE"
48
57
  ],
49
58
  "engines": {
@@ -59,6 +68,9 @@
59
68
  "minisearch": "7.2.0"
60
69
  },
61
70
  "devDependencies": {
62
- "@modelcontextprotocol/client": "2.0.0"
71
+ "@biomejs/biome": "2.5.15",
72
+ "@modelcontextprotocol/client": "2.0.0",
73
+ "@nlpjs/lang-en-min": "4.26.1",
74
+ "@nlpjs/lang-it": "4.26.1"
63
75
  }
64
76
  }
package/server.json CHANGED
@@ -8,12 +8,12 @@
8
8
  "source": "github"
9
9
  },
10
10
  "websiteUrl": "https://github.com/mfdaves/okf-mcp#readme",
11
- "version": "0.9.1",
11
+ "version": "0.13.0-rc.1",
12
12
  "packages": [
13
13
  {
14
14
  "registryType": "npm",
15
15
  "identifier": "@mfdaves/okf-mcp",
16
- "version": "0.9.1",
16
+ "version": "0.13.0-rc.1",
17
17
  "transport": {
18
18
  "type": "stdio"
19
19
  },
@@ -39,6 +39,42 @@
39
39
  "value": "mcp"
40
40
  }
41
41
  ]
42
+ },
43
+ {
44
+ "registryType": "npm",
45
+ "identifier": "@mfdaves/okf-mcp",
46
+ "version": "0.13.0-rc.1",
47
+ "transport": {
48
+ "type": "streamable-http",
49
+ "url": "http://127.0.0.1:8766/mcp"
50
+ },
51
+ "packageArguments": [
52
+ {
53
+ "type": "named",
54
+ "name": "--root",
55
+ "description": "Absolute path to one OKF bundle root.",
56
+ "isRequired": false,
57
+ "format": "filepath",
58
+ "placeholder": "/absolute/path/to/okf-root"
59
+ },
60
+ {
61
+ "type": "named",
62
+ "name": "--project",
63
+ "description": "Absolute path to an optional federated OKF project, including configured producers.",
64
+ "isRequired": false,
65
+ "format": "filepath",
66
+ "placeholder": "/absolute/path/to/okf.project.yaml"
67
+ },
68
+ {
69
+ "type": "positional",
70
+ "value": "mcp"
71
+ },
72
+ {
73
+ "type": "positional",
74
+ "value": "--http",
75
+ "description": "Serve MCP over Streamable HTTP on 127.0.0.1:8766 instead of stdio."
76
+ }
77
+ ]
42
78
  }
43
79
  ]
44
80
  }