loopctl-mcp-server 3.47.0 → 3.48.0

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
@@ -572,6 +572,7 @@ Two modes, pinned at creation:
572
572
  | Tool | Description |
573
573
  |---|---|
574
574
  | `list_routes` | List all available API routes on the loopctl server. |
575
+ | `api_index` | The server's welcome document (`GET /api/v1`): its name, the app `version` the running release was built as, and the paths of its other entry points (OpenAPI docs, Swagger UI, health, `/.well-known/loopctl`, the route list, the wiki). Public, sent with no key, so it answers when a key is missing or no longer authenticates. No arguments, refuses nothing. |
575
576
  | `mcp_version` | **Which version of this MCP server you are running, and which one loopctl ships.** Returns `running`, `expected`, a `status` of `current` / `behind` / `ahead` / `unknown`, and the remedy. Takes no API key: it reads loopctl's unauthenticated discovery document (`GET /.well-known/loopctl`), so it answers in a session where nothing else does. MCP binds its tool list at session start, so from inside a session "this tool does not exist" and "this tool exists and my process is older than it" look identical — this is the discriminator. At `current`, a tool you cannot see genuinely is not in this version. At `behind`, the remedy is `/mcp` or a session restart, **never a retry**: the tool list is fixed for the life of the process. `expected` is the version in the tree the deployment you are pointed at was built from, not a registry lookup — so `behind` can briefly precede the npm publish, and `ahead` is normal when running this package from a checkout. If this tool is itself missing from your surface, that is the answer: your process predates 2.99.0. |
576
577
  | `get_system_articles` | List or fetch system-scoped (global, cross-tenant) wiki articles. Public — no auth required. Optional: `slug` (fetch one), `category`. |
577
578
 
package/index.js CHANGED
@@ -161,6 +161,7 @@ import {
161
161
  } from "./lib/ui-tests.js";
162
162
  import { projectExport } from "./lib/project-export.js";
163
163
  import { corpusGet } from "./lib/corpus-get.js";
164
+ import { apiIndex } from "./lib/api-index.js";
164
165
  import {
165
166
  knowledgeExport as downloadKnowledgeExport,
166
167
  knowledgePipeline,
@@ -3543,6 +3544,11 @@ async function listRoutes() {
3543
3544
  return toContent(result);
3544
3545
  }
3545
3546
 
3547
+ // #872: the public welcome document, read with no key (lib/api-index.js).
3548
+ async function apiIndexTool(args) {
3549
+ return toContent(await apiIndex(args, { publicApiCall }));
3550
+ }
3551
+
3546
3552
  // US-26.2.3: Dispatch lineage tool. LCP-1 §9.2: optionally enroll an agent key
3547
3553
  // (agent_pubkey + alg) with an owner/parent attestation over it.
3548
3554
  async function createDispatch({
@@ -9441,6 +9447,18 @@ const TOOLS = [
9441
9447
  required: [],
9442
9448
  },
9443
9449
  },
9450
+ {
9451
+ name: "api_index",
9452
+ description:
9453
+ "READ THE SERVER'S WELCOME DOCUMENT (GET /api/v1, loopctl #872): its name, the app " +
9454
+ "version the running release was built as, and the paths of its other entry points " +
9455
+ "(OpenAPI docs, Swagger UI, health, the /.well-known/loopctl discovery document, the " +
9456
+ "route list, the wiki) plus this MCP server's npm package. Public: sent with NO key, so " +
9457
+ "it answers when a key is missing or no longer authenticates. Takes no arguments and " +
9458
+ "refuses nothing; an error is the network's or the server's. For the full route table " +
9459
+ "use list_routes; for whether this MCP package is older than the deployment, mcp_version.",
9460
+ inputSchema: { type: "object", properties: {}, required: [] },
9461
+ },
9444
9462
  {
9445
9463
  name: "mcp_version",
9446
9464
  description:
@@ -14853,6 +14871,9 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
14853
14871
  case "list_routes":
14854
14872
  return await listRoutes();
14855
14873
 
14874
+ case "api_index":
14875
+ return await apiIndexTool(args);
14876
+
14856
14877
  case "mcp_version":
14857
14878
  return await mcpVersion(args);
14858
14879
 
@@ -0,0 +1,16 @@
1
+ /**
2
+ * `api_index` — `GET /api/v1` (`WelcomeController.index`), loopctl #872.
3
+ *
4
+ * KEY: none. The route is public, so the request goes out through `publicApiCall`, which sends no
5
+ * Authorization header; a session with no key, or a key that no longer authenticates, still reads
6
+ * it. That is the point of reaching it: it answers "is this the loopctl I think it is, and which
7
+ * release is it running" when nothing else will.
8
+ *
9
+ * The answer is the server's `name`, its running app `version`, and the paths of its other entry
10
+ * points (`docs`, `swagger_ui`, `health`, `discovery`, `routes`, `wiki`) plus the npm package of this
11
+ * MCP server. It takes no arguments and refuses nothing; a failure is the transport's.
12
+ */
13
+
14
+ export async function apiIndex(_args = {}, { publicApiCall } = {}) {
15
+ return publicApiCall("GET", "/api/v1");
16
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "loopctl-mcp-server",
3
- "version": "3.47.0",
3
+ "version": "3.48.0",
4
4
  "description": "MCP server for loopctl — structural trust for AI development loops",
5
5
  "type": "module",
6
6
  "main": "index.js",