inistate-mcp 1.1.2 → 1.1.4

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.
@@ -0,0 +1,46 @@
1
+ /**
2
+ * SS05806 - durable OAuth Dynamic Client Registration store.
3
+ *
4
+ * DCR client_ids used to live only in a process-local Map, so every restart (deploy, crash,
5
+ * container reschedule, `pm2 restart`) wiped them. A connector that had registered days earlier
6
+ * then hit /authorize and got `invalid_client`, and the only way back was to delete and re-add
7
+ * the connector so it registered afresh. Every restart re-broke every cached client.
8
+ *
9
+ * Registrations are now written to a JSON file and reloaded on startup.
10
+ *
11
+ * Deliberately NOT persisted here: issued access tokens, authorization codes and pending auths.
12
+ * Codes and pending auths expire in minutes, so losing them on restart is harmless. Tokens are
13
+ * bearer secrets - writing them to disk is a security tradeoff that deserves its own decision,
14
+ * not a side effect of fixing client registration. Losing them on restart degrades attribution
15
+ * (see verifyAccessToken), it does not lock anyone out the way a lost client_id does.
16
+ *
17
+ * Every disk operation fails soft: if the file cannot be read or written the store keeps working
18
+ * in memory and logs. An unwritable disk must never take authentication down with it.
19
+ *
20
+ * Scope: this is per-process state on local disk, so it fixes restarts, not replicas. If the
21
+ * server is ever scaled out, point OAUTH_CLIENTS_FILE at shared storage or move the map to a DB
22
+ * - otherwise a client registered on one replica is unknown to the others (same caveat
23
+ * mode-store.ts carries).
24
+ */
25
+ import type { OAuthRegisteredClientsStore } from "@modelcontextprotocol/sdk/server/auth/clients.js";
26
+ import type { OAuthClientInformationFull } from "@modelcontextprotocol/sdk/shared/auth.js";
27
+ /** Where registrations are kept. Override for containers that mount a volume elsewhere. */
28
+ export declare function defaultClientsFile(): string;
29
+ export declare class FileClientsStore implements OAuthRegisteredClientsStore {
30
+ private clients;
31
+ private readonly file;
32
+ /** Set when the file is unusable, so we warn once rather than on every registration. */
33
+ private writeDisabled;
34
+ constructor(file?: string);
35
+ getClient(clientId: string): OAuthClientInformationFull | undefined;
36
+ registerClient(client: Omit<OAuthClientInformationFull, "client_id" | "client_id_issued_at">): OAuthClientInformationFull;
37
+ dump(): OAuthClientInformationFull[];
38
+ private load;
39
+ /**
40
+ * OAUTH_KNOWN_CLIENTS keeps working exactly as before. Seeded entries are applied AFTER the
41
+ * file load so an operator-pinned client always wins, and are not written back - the env var
42
+ * stays the source of truth for them.
43
+ */
44
+ private seedFromEnv;
45
+ private persist;
46
+ }
@@ -0,0 +1,120 @@
1
+ /**
2
+ * SS05806 - durable OAuth Dynamic Client Registration store.
3
+ *
4
+ * DCR client_ids used to live only in a process-local Map, so every restart (deploy, crash,
5
+ * container reschedule, `pm2 restart`) wiped them. A connector that had registered days earlier
6
+ * then hit /authorize and got `invalid_client`, and the only way back was to delete and re-add
7
+ * the connector so it registered afresh. Every restart re-broke every cached client.
8
+ *
9
+ * Registrations are now written to a JSON file and reloaded on startup.
10
+ *
11
+ * Deliberately NOT persisted here: issued access tokens, authorization codes and pending auths.
12
+ * Codes and pending auths expire in minutes, so losing them on restart is harmless. Tokens are
13
+ * bearer secrets - writing them to disk is a security tradeoff that deserves its own decision,
14
+ * not a side effect of fixing client registration. Losing them on restart degrades attribution
15
+ * (see verifyAccessToken), it does not lock anyone out the way a lost client_id does.
16
+ *
17
+ * Every disk operation fails soft: if the file cannot be read or written the store keeps working
18
+ * in memory and logs. An unwritable disk must never take authentication down with it.
19
+ *
20
+ * Scope: this is per-process state on local disk, so it fixes restarts, not replicas. If the
21
+ * server is ever scaled out, point OAUTH_CLIENTS_FILE at shared storage or move the map to a DB
22
+ * - otherwise a client registered on one replica is unknown to the others (same caveat
23
+ * mode-store.ts carries).
24
+ */
25
+ import { randomUUID } from "node:crypto";
26
+ import { existsSync, mkdirSync, readFileSync, renameSync, writeFileSync } from "node:fs";
27
+ import { dirname, join } from "node:path";
28
+ /** Where registrations are kept. Override for containers that mount a volume elsewhere. */
29
+ export function defaultClientsFile() {
30
+ return (process.env.OAUTH_CLIENTS_FILE ||
31
+ join(process.env.INISTATE_DATA_DIR || ".inistate", "oauth-clients.json"));
32
+ }
33
+ export class FileClientsStore {
34
+ clients = new Map();
35
+ file;
36
+ /** Set when the file is unusable, so we warn once rather than on every registration. */
37
+ writeDisabled = false;
38
+ constructor(file = defaultClientsFile()) {
39
+ this.file = file;
40
+ this.load();
41
+ this.seedFromEnv();
42
+ }
43
+ getClient(clientId) {
44
+ return this.clients.get(clientId);
45
+ }
46
+ registerClient(client) {
47
+ const full = {
48
+ ...client,
49
+ client_id: randomUUID(),
50
+ client_id_issued_at: Math.floor(Date.now() / 1000),
51
+ };
52
+ this.clients.set(full.client_id, full);
53
+ this.persist();
54
+ return full;
55
+ }
56
+ dump() {
57
+ return [...this.clients.values()];
58
+ }
59
+ /* ---------------------------------------------------------------- */
60
+ load() {
61
+ try {
62
+ if (!existsSync(this.file))
63
+ return;
64
+ const parsed = JSON.parse(readFileSync(this.file, "utf8"));
65
+ if (!Array.isArray(parsed)) {
66
+ console.error(`OAuth client store at ${this.file} is not a JSON array — ignoring it`);
67
+ return;
68
+ }
69
+ for (const entry of parsed) {
70
+ const client = entry;
71
+ // A row without a client_id cannot be looked up; skip rather than poison the map.
72
+ if (client && typeof client.client_id === "string" && client.client_id) {
73
+ this.clients.set(client.client_id, client);
74
+ }
75
+ }
76
+ console.log(`OAuth client store loaded ${this.clients.size} client(s) from ${this.file}`);
77
+ }
78
+ catch (err) {
79
+ // A corrupt or unreadable file must not stop the server booting. Keep the file for
80
+ // inspection - overwriting it would destroy the only copy of the registrations.
81
+ console.error(`Failed to read OAuth client store at ${this.file}:`, err);
82
+ this.writeDisabled = true;
83
+ }
84
+ }
85
+ /**
86
+ * OAUTH_KNOWN_CLIENTS keeps working exactly as before. Seeded entries are applied AFTER the
87
+ * file load so an operator-pinned client always wins, and are not written back - the env var
88
+ * stays the source of truth for them.
89
+ */
90
+ seedFromEnv() {
91
+ const seed = process.env.OAUTH_KNOWN_CLIENTS;
92
+ if (!seed)
93
+ return;
94
+ try {
95
+ for (const client of JSON.parse(seed)) {
96
+ this.clients.set(client.client_id, client);
97
+ }
98
+ console.log(`OAuth client store seeded with ${this.clients.size} client(s)`);
99
+ }
100
+ catch {
101
+ console.error("Failed to parse OAUTH_KNOWN_CLIENTS — must be a JSON array");
102
+ }
103
+ }
104
+ persist() {
105
+ if (this.writeDisabled)
106
+ return;
107
+ try {
108
+ mkdirSync(dirname(this.file), { recursive: true });
109
+ // Write-then-rename so a crash mid-write cannot leave a truncated file that would
110
+ // silently drop every registration on the next boot.
111
+ const tmp = `${this.file}.${process.pid}.tmp`;
112
+ writeFileSync(tmp, JSON.stringify(this.dump(), null, 2), "utf8");
113
+ renameSync(tmp, this.file);
114
+ }
115
+ catch (err) {
116
+ this.writeDisabled = true;
117
+ console.error(`Failed to persist OAuth client store to ${this.file} — registrations will be lost on restart:`, err);
118
+ }
119
+ }
120
+ }
@@ -1,6 +1,6 @@
1
1
  import type { Response } from "express";
2
2
  import type { OAuthServerProvider, AuthorizationParams } from "@modelcontextprotocol/sdk/server/auth/provider.js";
3
- import type { OAuthRegisteredClientsStore } from "@modelcontextprotocol/sdk/server/auth/clients.js";
3
+ import { FileClientsStore } from "./client-store.js";
4
4
  import type { OAuthClientInformationFull, OAuthTokens, OAuthTokenRevocationRequest } from "@modelcontextprotocol/sdk/shared/auth.js";
5
5
  import type { AuthInfo } from "@modelcontextprotocol/sdk/server/auth/types.js";
6
6
  /**
@@ -28,15 +28,8 @@ export declare class ConnectionMintDeniedError extends Error {
28
28
  export declare function connectionModeKey(token: string): string;
29
29
  /** Decode the `sub` claim from a JWT payload without verifying the signature. */
30
30
  export declare function decodeJwtSub(jwt: string): string | undefined;
31
- declare class InMemoryClientsStore implements OAuthRegisteredClientsStore {
32
- private clients;
33
- constructor();
34
- getClient(clientId: string): OAuthClientInformationFull | undefined;
35
- registerClient(client: Omit<OAuthClientInformationFull, "client_id" | "client_id_issued_at">): OAuthClientInformationFull;
36
- dump(): OAuthClientInformationFull[];
37
- }
38
31
  export declare class InistateOAuthProvider implements OAuthServerProvider {
39
- readonly clientsStore: InMemoryClientsStore;
32
+ readonly clientsStore: FileClientsStore;
40
33
  private codes;
41
34
  private pendingAuth;
42
35
  private tokens;
@@ -77,4 +70,3 @@ export declare class InistateOAuthProvider implements OAuthServerProvider {
77
70
  revokeToken(_client: OAuthClientInformationFull, request: OAuthTokenRevocationRequest): Promise<void>;
78
71
  private cleanup;
79
72
  }
80
- export {};
@@ -1,4 +1,5 @@
1
1
  import { createHash, randomUUID } from "node:crypto";
2
+ import { FileClientsStore } from "./client-store.js";
2
3
  import { InvalidGrantError } from "@modelcontextprotocol/sdk/server/auth/errors.js";
3
4
  const CODE_TTL_MS = 5 * 60 * 1000; // 5 minutes
4
5
  const PAT_VERIFY_TTL_MS = 5 * 60 * 1000; // whoami re-check cadence for connection tokens
@@ -98,38 +99,12 @@ function expiresInFromExp(exp) {
98
99
  const remaining = exp - Math.floor(Date.now() / 1000);
99
100
  return remaining > 0 ? remaining : 0;
100
101
  }
101
- class InMemoryClientsStore {
102
- clients = new Map();
103
- constructor() {
104
- const seed = process.env.OAUTH_KNOWN_CLIENTS;
105
- if (seed) {
106
- try {
107
- for (const client of JSON.parse(seed)) {
108
- this.clients.set(client.client_id, client);
109
- }
110
- console.log(`OAuth client store seeded with ${this.clients.size} client(s)`);
111
- }
112
- catch {
113
- console.error("Failed to parse OAUTH_KNOWN_CLIENTS — must be a JSON array");
114
- }
115
- }
116
- }
117
- getClient(clientId) {
118
- return this.clients.get(clientId);
119
- }
120
- registerClient(client) {
121
- const full = {
122
- ...client,
123
- client_id: randomUUID(),
124
- client_id_issued_at: Math.floor(Date.now() / 1000),
125
- };
126
- this.clients.set(full.client_id, full);
127
- return full;
128
- }
129
- dump() {
130
- return [...this.clients.values()];
131
- }
132
- }
102
+ /*
103
+ * SS05806: the clients store used to be a process-local Map, so every restart wiped every
104
+ * DCR-registered client_id and previously-registered connectors got `invalid_client` at
105
+ * /authorize. FileClientsStore keeps the same shape but survives a restart. See client-store.ts
106
+ * for what is deliberately NOT persisted (tokens, codes, pending auths).
107
+ */
133
108
  /* ------------------------------------------------------------------ */
134
109
  /* Provider */
135
110
  /* ------------------------------------------------------------------ */
@@ -144,7 +119,7 @@ export class InistateOAuthProvider {
144
119
  mcpUrl;
145
120
  loginPath;
146
121
  constructor(inistateBaseUrl, appUrl, mcpUrl, loginPath = "/#/login") {
147
- this.clientsStore = new InMemoryClientsStore();
122
+ this.clientsStore = new FileClientsStore();
148
123
  this.baseUrl = inistateBaseUrl.replace(/\/+$/, "");
149
124
  this.appUrl = appUrl.replace(/\/$/, "");
150
125
  this.mcpUrl = mcpUrl;
package/build/tools.js CHANGED
@@ -787,7 +787,7 @@ Load resource inistate://schema before modifying to know valid field types, colo
787
787
  ...reliabilityParams,
788
788
  workspaceId: wsParam,
789
789
  },
790
- annotations: { readOnlyHint: false, destructiveHint: true, openWorldHint: false },
790
+ annotations: { readOnlyHint: false, destructiveHint: true, openWorldHint: false, idempotentHint: false },
791
791
  }, async ({ module: moduleName, activity, entryId, entryIds, input, state, comment, assignees, due, ai, confirmed, workspaceId, ...extra }) => {
792
792
  // Local-runtime-only reliability controls (absent from the cloud schema).
793
793
  const idempotencyKey = extra.idempotencyKey;
@@ -986,7 +986,7 @@ Load resource inistate://schema before modifying to know valid field types, colo
986
986
  .describe("REQUIRED when the activity is 'changeStatus', any per-item or top-level `state` override is supplied, or the activity's actor is 'hybrid'. Set true ONLY after surfacing the planned bulk action to the user."),
987
987
  workspaceId: wsParam,
988
988
  },
989
- annotations: { readOnlyHint: false, destructiveHint: true, openWorldHint: false },
989
+ annotations: { readOnlyHint: false, destructiveHint: true, openWorldHint: false, idempotentHint: false },
990
990
  }, async ({ module: moduleName, activity, ai, items, confirmed, workspaceId }) => {
991
991
  try {
992
992
  applyWorkspace(workspaceId);
@@ -1254,7 +1254,7 @@ Load resource inistate://schema before modifying to know valid field types, colo
1254
1254
  .describe("MIME type of the file"),
1255
1255
  workspaceId: wsParam,
1256
1256
  },
1257
- annotations: { readOnlyHint: false, destructiveHint: false, openWorldHint: false },
1257
+ annotations: { readOnlyHint: false, destructiveHint: false, openWorldHint: false, idempotentHint: false },
1258
1258
  }, async ({ module: moduleName, name: fileName, file: fileContent, mimeType, workspaceId }) => {
1259
1259
  if (!caps.files)
1260
1260
  return ok(capabilityMessage("files", backend.kind));
@@ -1325,7 +1325,7 @@ Load resource inistate://schema before modifying to know valid field types, colo
1325
1325
  .describe("File size in bytes. Must be > 0 and ≤ 500MB (524288000)."),
1326
1326
  workspaceId: wsParam,
1327
1327
  },
1328
- annotations: { readOnlyHint: false, destructiveHint: false, openWorldHint: false },
1328
+ annotations: { readOnlyHint: false, destructiveHint: false, openWorldHint: false, idempotentHint: false },
1329
1329
  }, async ({ module: moduleName, fileName, contentType, fileSize, workspaceId }) => {
1330
1330
  if (!caps.files)
1331
1331
  return ok(capabilityMessage("files", backend.kind));
@@ -1358,7 +1358,7 @@ Load resource inistate://schema before modifying to know valid field types, colo
1358
1358
  .describe("The s3Key returned from request_upload_url."),
1359
1359
  workspaceId: wsParam,
1360
1360
  },
1361
- annotations: { readOnlyHint: false, destructiveHint: false, openWorldHint: false },
1361
+ annotations: { readOnlyHint: false, destructiveHint: false, openWorldHint: false, idempotentHint: false },
1362
1362
  }, async ({ s3Key, workspaceId }) => {
1363
1363
  if (!caps.files)
1364
1364
  return ok(capabilityMessage("files", backend.kind));
@@ -1452,7 +1452,7 @@ Load resources inistate://schema and inistate://design-guide before designing fo
1452
1452
  ...moduleSectionsShape,
1453
1453
  workspaceId: wsParam,
1454
1454
  },
1455
- annotations: { readOnlyHint: false, destructiveHint: false, openWorldHint: false },
1455
+ annotations: { readOnlyHint: false, destructiveHint: false, openWorldHint: false, idempotentHint: false },
1456
1456
  }, async ({ name, icon, description: desc, information, states, activities, flows, workspaceId, }) => {
1457
1457
  try {
1458
1458
  applyWorkspace(workspaceId);
@@ -1524,7 +1524,7 @@ Load resources inistate://schema and inistate://design-guide before designing fo
1524
1524
  ...moduleSectionsShape,
1525
1525
  workspaceId: wsParam,
1526
1526
  },
1527
- annotations: { readOnlyHint: false, destructiveHint: true, openWorldHint: false },
1527
+ annotations: { readOnlyHint: false, destructiveHint: true, openWorldHint: false, idempotentHint: true },
1528
1528
  }, async ({ id, name, icon, description: desc, information, states, activities, flows, workspaceId, }) => {
1529
1529
  try {
1530
1530
  applyWorkspace(workspaceId);
@@ -1659,7 +1659,7 @@ Load resources inistate://schema and inistate://design-guide before designing fo
1659
1659
  title: "Scaffold Module from Existing Data",
1660
1660
  description: gatedDesc(caps.scaffold, "Design a module schema together with the user from data they ALREADY have — a Notion database, an Airtable table, or a local SQLite table. This is the inverse on-ramp: instead of designing from scratch, read the existing shape and refine it with the user. One container (a SQLite database, an Airtable base, a Notion workspace) can yield several modules — discover the tables, then model the chosen ones.\n\nFlow (use it conversationally):\n1. DISCOVER — call with just `source` pointed at the container: a SQLite database path, an `airtable://<baseId>` (no table), or a bare `notion://`. Returns { discovery: true, tables: [{ name, id?, columns, rows?, hasState, scaffold_source }] }. Show these to the user and ask which one(s) to model; each becomes its own module.\n2. DRAFT — call again with a chosen table's `scaffold_source` as `source` (or a SQLite `table`). Returns { schema, validation, suggestions } — columns become typed fields, a detected status/state/stage/phase column becomes states.\n3. REFINE together — confirm the inferred field types with the user, then define activities + flows (the governed transitions; design_workflow can scaffold a pattern).\n4. CREATE — validate_design → create_module, then point the runtime at the same data.\n\nTargets: notion://<databaseId> or bare notion:// (needs INISTATE_NOTION_TOKEN), airtable://<baseId>/<tableIdOrName> or airtable://<baseId> (needs INISTATE_AIRTABLE_TOKEN; listing a base's tables needs schema.bases:read), or a local SQLite path. Credentials are read from the environment — never pass tokens as arguments.", "Local-runtime only; use design_workflow to draft a module here."),
1661
1661
  inputSchema: scaffoldInput,
1662
- annotations: { readOnlyHint: true, destructiveHint: false, openWorldHint: true, idempotentHint: true },
1662
+ annotations: { readOnlyHint: true, destructiveHint: false, openWorldHint: false, idempotentHint: true },
1663
1663
  }, async ({ source, table, name, state }) => {
1664
1664
  if (!caps.scaffold)
1665
1665
  return ok(capabilityMessage("scaffold", backend.kind));
package/package.json CHANGED
@@ -1,87 +1,87 @@
1
- {
2
- "name": "inistate-mcp",
3
- "mcpName": "io.github.Inistate/inistate-mcp",
4
- "version": "1.1.2",
5
- "description": "MCP server for the Inistate platform — no-code apps creation powered by AI",
6
- "type": "module",
7
- "author": "Inistate",
8
- "homepage": "https://github.com/Inistate/inistate-mcp#readme",
9
- "repository": {
10
- "type": "git",
11
- "url": "git+https://github.com/Inistate/inistate-mcp.git"
12
- },
13
- "bugs": {
14
- "url": "https://github.com/Inistate/inistate-mcp/issues"
15
- },
16
- "keywords": [
17
- "mcp",
18
- "model-context-protocol",
19
- "inistate",
20
- "workflow",
21
- "low-code",
22
- "ai-agent",
23
- "claude"
24
- ],
25
- "bin": {
26
- "inistate-mcp": "build/index.js",
27
- "inistate-mcp-http": "build/http.js"
28
- },
29
- "main": "./build/lib.js",
30
- "types": "./build/lib.d.ts",
31
- "exports": {
32
- ".": {
33
- "types": "./build/lib.d.ts",
34
- "import": "./build/lib.js"
35
- },
36
- "./package.json": "./package.json"
37
- },
38
- "files": [
39
- "build/**/*.js",
40
- "build/**/*.d.ts",
41
- "README.md",
42
- "LICENSE",
43
- "server.json",
44
- "inistate-schema.json",
45
- "facts-module-design-guide.md",
46
- "facts-frontend-guide.md"
47
- ],
48
- "scripts": {
49
- "clean": "rimraf build",
50
- "build": "npm run clean && tsc",
51
- "prepare": "npm run build",
52
- "watch": "tsc --watch",
53
- "test": "vitest run",
54
- "test:watch": "vitest",
55
- "changeset": "changeset",
56
- "version": "npx changeset version && node scripts/sync-server-json.js",
57
- "release:mcp": "npm run test && npm run version && mcp-publisher login && mcp-publisher publish",
58
- "release:npm": "npm run build && npm run test && npm run version && npm publish",
59
- "release": "npm i && npm run test && npm run version && mcp-publisher validate && npm publish && mcp-publisher login github && mcp-publisher publish",
60
- "sync:server": "node scripts/sync-server-json.js",
61
- "start:http": "node build/http.js",
62
- "inspector": "npx @modelcontextprotocol/inspector build/index.js",
63
- "pm2:start": "pm2 start ecosystem.config.cjs --env production",
64
- "pm2:restart": "pm2 restart inistate-mcp",
65
- "pm2:stop": "pm2 stop inistate-mcp",
66
- "pm2:logs": "pm2 logs inistate-mcp"
67
- },
68
- "dependencies": {
69
- "@iarna/toml": "^2.2.5",
70
- "@modelcontextprotocol/sdk": "^1.27.1",
71
- "dotenv": "^17.3.1",
72
- "express": "^5.2.1",
73
- "zod": "^3.25.0"
74
- },
75
- "devDependencies": {
76
- "@changesets/cli": "^2.31.0",
77
- "@types/express": "^5.0.6",
78
- "@types/iarna__toml": "^2.0.5",
79
- "@types/node": "^22.0.0",
80
- "eslint": "^9.0.0",
81
- "rimraf": "^6.0.0",
82
- "pm2": "^7.0.1",
83
- "typescript": "^5.8.0",
84
- "vitest": "^3.2.4"
85
- },
86
- "license": "Apache-2.0"
87
- }
1
+ {
2
+ "name": "inistate-mcp",
3
+ "mcpName": "io.github.Inistate/inistate-mcp",
4
+ "version": "1.1.4",
5
+ "description": "MCP server for the Inistate platform — no-code apps creation powered by AI",
6
+ "type": "module",
7
+ "author": "Inistate",
8
+ "homepage": "https://github.com/Inistate/inistate-mcp#readme",
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "git+https://github.com/Inistate/inistate-mcp.git"
12
+ },
13
+ "bugs": {
14
+ "url": "https://github.com/Inistate/inistate-mcp/issues"
15
+ },
16
+ "keywords": [
17
+ "mcp",
18
+ "model-context-protocol",
19
+ "inistate",
20
+ "workflow",
21
+ "low-code",
22
+ "ai-agent",
23
+ "claude"
24
+ ],
25
+ "bin": {
26
+ "inistate-mcp": "build/index.js",
27
+ "inistate-mcp-http": "build/http.js"
28
+ },
29
+ "main": "./build/lib.js",
30
+ "types": "./build/lib.d.ts",
31
+ "exports": {
32
+ ".": {
33
+ "types": "./build/lib.d.ts",
34
+ "import": "./build/lib.js"
35
+ },
36
+ "./package.json": "./package.json"
37
+ },
38
+ "files": [
39
+ "build/**/*.js",
40
+ "build/**/*.d.ts",
41
+ "README.md",
42
+ "LICENSE",
43
+ "server.json",
44
+ "inistate-schema.json",
45
+ "facts-module-design-guide.md",
46
+ "facts-frontend-guide.md"
47
+ ],
48
+ "scripts": {
49
+ "clean": "rimraf build",
50
+ "build": "npm run clean && tsc",
51
+ "prepare": "npm run build",
52
+ "watch": "tsc --watch",
53
+ "test": "vitest run",
54
+ "test:watch": "vitest",
55
+ "changeset": "changeset",
56
+ "version": "npx changeset version && node scripts/sync-server-json.js",
57
+ "release:mcp": "npm run test && npm run version && mcp-publisher login github && mcp-publisher publish",
58
+ "release:npm": "npm run build && npm run test && npm run version && npm publish",
59
+ "release": "npm i && npm run test && npm run version && mcp-publisher validate && npm publish && mcp-publisher login github && mcp-publisher publish",
60
+ "sync:server": "node scripts/sync-server-json.js",
61
+ "start:http": "node build/http.js",
62
+ "inspector": "npx @modelcontextprotocol/inspector build/index.js",
63
+ "pm2:start": "pm2 start ecosystem.config.cjs --env production",
64
+ "pm2:restart": "pm2 restart inistate-mcp",
65
+ "pm2:stop": "pm2 stop inistate-mcp",
66
+ "pm2:logs": "pm2 logs inistate-mcp"
67
+ },
68
+ "dependencies": {
69
+ "@iarna/toml": "^2.2.5",
70
+ "@modelcontextprotocol/sdk": "^1.27.1",
71
+ "dotenv": "^17.3.1",
72
+ "express": "^5.2.1",
73
+ "zod": "^3.25.0"
74
+ },
75
+ "devDependencies": {
76
+ "@changesets/cli": "^2.31.0",
77
+ "@types/express": "^5.0.6",
78
+ "@types/iarna__toml": "^2.0.5",
79
+ "@types/node": "^22.0.0",
80
+ "eslint": "^9.0.0",
81
+ "rimraf": "^6.0.0",
82
+ "pm2": "^7.0.1",
83
+ "typescript": "^5.8.0",
84
+ "vitest": "^3.2.4"
85
+ },
86
+ "license": "Apache-2.0"
87
+ }
package/server.json CHANGED
@@ -1,42 +1,42 @@
1
- {
2
- "$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
3
- "name": "io.github.Inistate/inistate-mcp",
4
- "description": "MCP server for the Inistate platform: module discovery, entry management, and activity submission.",
5
- "title": "Inistate MCP",
6
- "websiteUrl": "https://inistate.com",
7
- "repository": {
8
- "url": "https://github.com/inistate/inistate-mcp",
9
- "source": "github"
10
- },
11
- "version": "1.1.2",
12
- "packages": [
13
- {
14
- "registryType": "npm",
15
- "registryBaseUrl": "https://registry.npmjs.org",
16
- "identifier": "inistate-mcp",
17
- "version": "1.1.2",
18
- "transport": {
19
- "type": "stdio"
20
- },
21
- "environmentVariables": [
22
- {
23
- "name": "INISTATE_API_TOKEN",
24
- "description": "Bearer token for Inistate API authentication.",
25
- "isRequired": true,
26
- "isSecret": true
27
- },
28
- {
29
- "name": "INISTATE_API_BASE",
30
- "description": "Inistate API base URL.",
31
- "default": "https://api.inistate.com"
32
- }
33
- ]
34
- }
35
- ],
36
- "remotes": [
37
- {
38
- "type": "streamable-http",
39
- "url": "https://mcp.inistate.com/mcp"
40
- }
41
- ]
1
+ {
2
+ "$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
3
+ "name": "io.github.Inistate/inistate-mcp",
4
+ "description": "MCP server for the Inistate platform: module discovery, entry management, and activity submission.",
5
+ "title": "Inistate MCP",
6
+ "websiteUrl": "https://inistate.com",
7
+ "repository": {
8
+ "url": "https://github.com/inistate/inistate-mcp",
9
+ "source": "github"
10
+ },
11
+ "version": "1.1.4",
12
+ "packages": [
13
+ {
14
+ "registryType": "npm",
15
+ "registryBaseUrl": "https://registry.npmjs.org",
16
+ "identifier": "inistate-mcp",
17
+ "version": "1.1.4",
18
+ "transport": {
19
+ "type": "stdio"
20
+ },
21
+ "environmentVariables": [
22
+ {
23
+ "name": "INISTATE_API_TOKEN",
24
+ "description": "Bearer token for Inistate API authentication.",
25
+ "isRequired": true,
26
+ "isSecret": true
27
+ },
28
+ {
29
+ "name": "INISTATE_API_BASE",
30
+ "description": "Inistate API base URL.",
31
+ "default": "https://api.inistate.com"
32
+ }
33
+ ]
34
+ }
35
+ ],
36
+ "remotes": [
37
+ {
38
+ "type": "streamable-http",
39
+ "url": "https://mcp.inistate.com/mcp"
40
+ }
41
+ ]
42
42
  }