@ebitex/mcp 0.0.0-stage → 1.1.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.
Files changed (79) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +144 -3
  3. package/dist/app.d.ts +57 -0
  4. package/dist/app.d.ts.map +1 -0
  5. package/dist/app.js +8 -0
  6. package/dist/app.js.map +1 -0
  7. package/dist/apps/content/app.d.ts +23 -0
  8. package/dist/apps/content/app.d.ts.map +1 -0
  9. package/dist/apps/content/app.js +95 -0
  10. package/dist/apps/content/app.js.map +1 -0
  11. package/dist/apps/content/client.d.ts +34 -0
  12. package/dist/apps/content/client.d.ts.map +1 -0
  13. package/dist/apps/content/client.js +68 -0
  14. package/dist/apps/content/client.js.map +1 -0
  15. package/dist/apps/content/config.d.ts +29 -0
  16. package/dist/apps/content/config.d.ts.map +1 -0
  17. package/dist/apps/content/config.js +30 -0
  18. package/dist/apps/content/config.js.map +1 -0
  19. package/dist/apps/content/errors.d.ts +59 -0
  20. package/dist/apps/content/errors.d.ts.map +1 -0
  21. package/dist/apps/content/errors.js +122 -0
  22. package/dist/apps/content/errors.js.map +1 -0
  23. package/dist/apps/content/resources/helpCorpus.generated.d.ts +7 -0
  24. package/dist/apps/content/resources/helpCorpus.generated.d.ts.map +1 -0
  25. package/dist/apps/content/resources/helpCorpus.generated.js +162 -0
  26. package/dist/apps/content/resources/helpCorpus.generated.js.map +1 -0
  27. package/dist/apps/content/resources/register.d.ts +8 -0
  28. package/dist/apps/content/resources/register.d.ts.map +1 -0
  29. package/dist/apps/content/resources/register.js +81 -0
  30. package/dist/apps/content/resources/register.js.map +1 -0
  31. package/dist/apps/content/routes.d.ts +67 -0
  32. package/dist/apps/content/routes.d.ts.map +1 -0
  33. package/dist/apps/content/routes.js +163 -0
  34. package/dist/apps/content/routes.js.map +1 -0
  35. package/dist/apps/content/session.d.ts +60 -0
  36. package/dist/apps/content/session.d.ts.map +1 -0
  37. package/dist/apps/content/session.js +81 -0
  38. package/dist/apps/content/session.js.map +1 -0
  39. package/dist/apps/content/tools/catalog.d.ts +58 -0
  40. package/dist/apps/content/tools/catalog.d.ts.map +1 -0
  41. package/dist/apps/content/tools/catalog.js +81 -0
  42. package/dist/apps/content/tools/catalog.js.map +1 -0
  43. package/dist/apps/content/tools/cursor.d.ts +62 -0
  44. package/dist/apps/content/tools/cursor.d.ts.map +1 -0
  45. package/dist/apps/content/tools/cursor.js +94 -0
  46. package/dist/apps/content/tools/cursor.js.map +1 -0
  47. package/dist/apps/content/tools/register.d.ts +36 -0
  48. package/dist/apps/content/tools/register.d.ts.map +1 -0
  49. package/dist/apps/content/tools/register.js +470 -0
  50. package/dist/apps/content/tools/register.js.map +1 -0
  51. package/dist/apps/content/tools/result.d.ts +28 -0
  52. package/dist/apps/content/tools/result.d.ts.map +1 -0
  53. package/dist/apps/content/tools/result.js +26 -0
  54. package/dist/apps/content/tools/result.js.map +1 -0
  55. package/dist/apps/content/tools/whoami.d.ts +36 -0
  56. package/dist/apps/content/tools/whoami.d.ts.map +1 -0
  57. package/dist/apps/content/tools/whoami.js +39 -0
  58. package/dist/apps/content/tools/whoami.js.map +1 -0
  59. package/dist/apps/index.d.ts +8 -0
  60. package/dist/apps/index.d.ts.map +1 -0
  61. package/dist/apps/index.js +8 -0
  62. package/dist/apps/index.js.map +1 -0
  63. package/dist/config.d.ts +46 -0
  64. package/dist/config.d.ts.map +1 -0
  65. package/dist/config.js +69 -0
  66. package/dist/config.js.map +1 -0
  67. package/dist/index.d.ts +19 -0
  68. package/dist/index.d.ts.map +1 -0
  69. package/dist/index.js +20 -0
  70. package/dist/index.js.map +1 -0
  71. package/dist/main.d.ts +3 -0
  72. package/dist/main.d.ts.map +1 -0
  73. package/dist/main.js +51 -0
  74. package/dist/main.js.map +1 -0
  75. package/dist/server.d.ts +51 -0
  76. package/dist/server.d.ts.map +1 -0
  77. package/dist/server.js +104 -0
  78. package/dist/server.js.map +1 -0
  79. package/package.json +44 -4
@@ -0,0 +1,39 @@
1
+ /**
2
+ * The one genuinely new fact this tool reports.
3
+ *
4
+ * Tool *absence* is otherwise indistinguishable from "this server has no such capability" — an agent
5
+ * offered no `content_write` cannot tell a read-scoped key from a server that simply cannot write.
6
+ *
7
+ * The list is **derived** by the caller from the same booleans that gate registration, never
8
+ * enumerated in a table here. A second list of tool→scope is a copy of a fact the `if` blocks already
9
+ * state, and it goes stale the first time a tool moves scope — a failure this codebase has had twice
10
+ * elsewhere, both times in the *reader* rather than the writer.
11
+ */
12
+ export function describeSession(session, withheld, serverVersion, withheldKinds = []) {
13
+ const { who } = session;
14
+ return {
15
+ organization: { id: who.organizationId, name: who.organizationName, slug: who.organizationSlug },
16
+ environment: { id: who.environmentId, name: who.environmentName },
17
+ // the realm the key is bound to. Absent from an API that predates realms, where the key acts in the root.
18
+ realm: who.realmKey ? { id: who.realmId ?? null, key: who.realmKey, name: who.realmName ?? null } : null,
19
+ actingAs: { roleName: who.roleName, keyName: who.keyName },
20
+ scopes: who.scopes,
21
+ // Reported even though it is not a property of the credential, because a key whose scopes list
22
+ // `authoring` while its write tools are absent is otherwise inexplicable from inside the
23
+ // session — the scope list and the tool list would flatly contradict each other with no visible
24
+ // cause. Hiding the write scopes instead would lie about the credential, which is the one thing
25
+ // this tool exists to tell the truth about.
26
+ readOnlyForced: session.readOnlyRequested,
27
+ serverVersion,
28
+ withheld,
29
+ // Kinds `content_write`/`content_delete` will refuse for this role, with the permission each
30
+ // needs. Separate from `withheld`: those tools stay available, since the key's other kinds work.
31
+ withheldKinds,
32
+ // The sentence an agent needs *before* it misreads its first empty result. An empty list from
33
+ // this server is always scoped, and saying so is cheaper than the duplicates an agent creates
34
+ // after concluding that nothing exists.
35
+ note: 'This key reads and writes exactly one authoring environment (and, where the organization has realms, ' +
36
+ 'one realm in it), as one role. An empty result means nothing matched here — not that nothing exists.',
37
+ };
38
+ }
39
+ //# sourceMappingURL=whoami.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"whoami.js","sourceRoot":"","sources":["../../../../src/apps/content/tools/whoami.ts"],"names":[],"mappings":"AA2BA;;;;;;;;;;GAUG;AACH,MAAM,UAAU,eAAe,CAC7B,OAAgB,EAChB,QAAiC,EACjC,aAAqB,EACrB,gBAAyC,EAAE;IAE3C,MAAM,EAAE,GAAG,EAAE,GAAG,OAAO,CAAA;IAEvB,OAAO;QACL,YAAY,EAAE,EAAE,EAAE,EAAE,GAAG,CAAC,cAAc,EAAE,IAAI,EAAE,GAAG,CAAC,gBAAgB,EAAE,IAAI,EAAE,GAAG,CAAC,gBAAgB,EAAE;QAChG,WAAW,EAAE,EAAE,EAAE,EAAE,GAAG,CAAC,aAAa,EAAE,IAAI,EAAE,GAAG,CAAC,eAAe,EAAE;QACjE,0GAA0G;QAC1G,KAAK,EAAE,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,GAAG,CAAC,OAAO,IAAI,IAAI,EAAE,GAAG,EAAE,GAAG,CAAC,QAAQ,EAAE,IAAI,EAAE,GAAG,CAAC,SAAS,IAAI,IAAI,EAAE,CAAC,CAAC,CAAC,IAAI;QACxG,QAAQ,EAAE,EAAE,QAAQ,EAAE,GAAG,CAAC,QAAQ,EAAE,OAAO,EAAE,GAAG,CAAC,OAAO,EAAE;QAC1D,MAAM,EAAE,GAAG,CAAC,MAAM;QAClB,+FAA+F;QAC/F,yFAAyF;QACzF,gGAAgG;QAChG,gGAAgG;QAChG,4CAA4C;QAC5C,cAAc,EAAE,OAAO,CAAC,iBAAiB;QACzC,aAAa;QACb,QAAQ;QACR,6FAA6F;QAC7F,iGAAiG;QACjG,aAAa;QACb,8FAA8F;QAC9F,8FAA8F;QAC9F,wCAAwC;QACxC,IAAI,EACF,uGAAuG;YACvG,sGAAsG;KACzG,CAAA;AACH,CAAC"}
@@ -0,0 +1,8 @@
1
+ import type { McpApp } from '../app.js';
2
+ /**
3
+ * Every app this server can serve, in the order its sections appear in the startup banner and the
4
+ * server's instructions. Which of them actually run is decided by the keys the operator configured,
5
+ * never by this list.
6
+ */
7
+ export declare const APPS: readonly McpApp[];
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/apps/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAA;AAGvC;;;;GAIG;AACH,eAAO,MAAM,IAAI,EAAE,SAAS,MAAM,EAAiB,CAAA"}
@@ -0,0 +1,8 @@
1
+ import { contentApp } from './content/app.js';
2
+ /**
3
+ * Every app this server can serve, in the order its sections appear in the startup banner and the
4
+ * server's instructions. Which of them actually run is decided by the keys the operator configured,
5
+ * never by this list.
6
+ */
7
+ export const APPS = [contentApp];
8
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/apps/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAE7C;;;;GAIG;AACH,MAAM,CAAC,MAAM,IAAI,GAAsB,CAAC,UAAU,CAAC,CAAA"}
@@ -0,0 +1,46 @@
1
+ /**
2
+ * The settings every app shares, in one place. Each app reads its own variables itself (see
3
+ * `apps/<app>/config.ts`); this is only what is true of the whole session.
4
+ *
5
+ * Both shared settings had a Content-prefixed name before this server served more than Content. The
6
+ * old names still work so an existing client config keeps running unchanged. Where both are set the
7
+ * new name wins, except for read-only, where either one being set is enough: the safe reading of two
8
+ * disagreeing statements about whether a session may write is that it may not.
9
+ */
10
+ /** Where the API lives. Only ever changed for a local or self-hosted deployment. */
11
+ export declare const BASE_VAR = "EBITEX_API_BASE";
12
+ export declare const LEGACY_BASE_VAR = "EBITEX_CONTENT_API_BASE";
13
+ /**
14
+ * An operator's declaration that this session must not write, independent of what the keys could do.
15
+ *
16
+ * Set it to `1`, `true` or `yes` to hide every write tool in every app even when a key carries write
17
+ * scopes — for a session that should only read, using a key that can do more.
18
+ */
19
+ export declare const READ_ONLY_VAR = "EBITEX_MCP_READ_ONLY";
20
+ export declare const LEGACY_READ_ONLY_VAR = "EBITEX_CONTENT_MCP_READ_ONLY";
21
+ export declare const DEFAULT_BASE = "https://api.ebitex.io";
22
+ export type ServerConfig = {
23
+ /** Origin only — each app appends its own route prefix, never a caller. */
24
+ baseUrl: string;
25
+ readOnly: boolean;
26
+ /** The environment the server was launched with. Each app reads its own variables from it. */
27
+ env: Record<string, string | undefined>;
28
+ };
29
+ export declare class ConfigError extends Error {
30
+ }
31
+ /**
32
+ * Reads the configuration, or throws {@link ConfigError} with a message written for the person
33
+ * editing an MCP client's JSON — it names the variables and where to get a value, because that is
34
+ * the only thing they can act on.
35
+ *
36
+ * At least one app must be configured: a server with no app has nothing to offer, and starting it
37
+ * anyway would look like a working server to a client that then lists no tools.
38
+ */
39
+ export declare function readConfig(env?: Record<string, string | undefined>): ServerConfig;
40
+ /**
41
+ * Names every app's variable and where its value comes from, as the product names the screen. This
42
+ * was the first sentence the package ever showed, and for a while it named a screen that does not
43
+ * exist.
44
+ */
45
+ export declare function noAppConfiguredMessage(): string;
46
+ //# sourceMappingURL=config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAEA;;;;;;;;GAQG;AAEH,oFAAoF;AACpF,eAAO,MAAM,QAAQ,oBAAoB,CAAA;AACzC,eAAO,MAAM,eAAe,4BAA4B,CAAA;AAExD;;;;;GAKG;AACH,eAAO,MAAM,aAAa,yBAAyB,CAAA;AACnD,eAAO,MAAM,oBAAoB,iCAAiC,CAAA;AAElE,eAAO,MAAM,YAAY,0BAA0B,CAAA;AAEnD,MAAM,MAAM,YAAY,GAAG;IACzB,2EAA2E;IAC3E,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,EAAE,OAAO,CAAA;IACjB,8FAA8F;IAC9F,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAA;CACxC,CAAA;AAED,qBAAa,WAAY,SAAQ,KAAK;CAAG;AAEzC;;;;;;;GAOG;AACH,wBAAgB,UAAU,CAAC,GAAG,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAe,GAAG,YAAY,CAoB9F;AAED;;;;GAIG;AACH,wBAAgB,sBAAsB,IAAI,MAAM,CAM/C"}
package/dist/config.js ADDED
@@ -0,0 +1,69 @@
1
+ import { APPS } from './apps/index.js';
2
+ /**
3
+ * The settings every app shares, in one place. Each app reads its own variables itself (see
4
+ * `apps/<app>/config.ts`); this is only what is true of the whole session.
5
+ *
6
+ * Both shared settings had a Content-prefixed name before this server served more than Content. The
7
+ * old names still work so an existing client config keeps running unchanged. Where both are set the
8
+ * new name wins, except for read-only, where either one being set is enough: the safe reading of two
9
+ * disagreeing statements about whether a session may write is that it may not.
10
+ */
11
+ /** Where the API lives. Only ever changed for a local or self-hosted deployment. */
12
+ export const BASE_VAR = 'EBITEX_API_BASE';
13
+ export const LEGACY_BASE_VAR = 'EBITEX_CONTENT_API_BASE';
14
+ /**
15
+ * An operator's declaration that this session must not write, independent of what the keys could do.
16
+ *
17
+ * Set it to `1`, `true` or `yes` to hide every write tool in every app even when a key carries write
18
+ * scopes — for a session that should only read, using a key that can do more.
19
+ */
20
+ export const READ_ONLY_VAR = 'EBITEX_MCP_READ_ONLY';
21
+ export const LEGACY_READ_ONLY_VAR = 'EBITEX_CONTENT_MCP_READ_ONLY';
22
+ export const DEFAULT_BASE = 'https://api.ebitex.io';
23
+ export class ConfigError extends Error {
24
+ }
25
+ /**
26
+ * Reads the configuration, or throws {@link ConfigError} with a message written for the person
27
+ * editing an MCP client's JSON — it names the variables and where to get a value, because that is
28
+ * the only thing they can act on.
29
+ *
30
+ * At least one app must be configured: a server with no app has nothing to offer, and starting it
31
+ * anyway would look like a working server to a client that then lists no tools.
32
+ */
33
+ export function readConfig(env = process.env) {
34
+ if (!APPS.some((app) => app.isConfigured(env))) {
35
+ throw new ConfigError(noAppConfiguredMessage());
36
+ }
37
+ const base = env[BASE_VAR]?.trim() || env[LEGACY_BASE_VAR]?.trim() || DEFAULT_BASE;
38
+ let baseUrl;
39
+ try {
40
+ // Normalizing here rather than at each call site means a trailing slash, a path, or a typo in
41
+ // the scheme is one error at startup instead of a puzzling 404 per tool.
42
+ baseUrl = new URL(base).origin;
43
+ }
44
+ catch {
45
+ throw new ConfigError(`${BASE_VAR} is not a valid URL: ${base}`);
46
+ }
47
+ return {
48
+ baseUrl,
49
+ readOnly: isTruthy(env[READ_ONLY_VAR]) || isTruthy(env[LEGACY_READ_ONLY_VAR]),
50
+ env,
51
+ };
52
+ }
53
+ /**
54
+ * Names every app's variable and where its value comes from, as the product names the screen. This
55
+ * was the first sentence the package ever showed, and for a while it named a screen that does not
56
+ * exist.
57
+ */
58
+ export function noAppConfiguredMessage() {
59
+ const lines = APPS.map((app) => ` ${app.keyVar} (${app.label}: ${app.keyHelp})`);
60
+ return ('No app is configured. Set the management key of at least one app in this server\'s "env" block:\n' +
61
+ lines.join('\n'));
62
+ }
63
+ function isTruthy(value) {
64
+ if (!value)
65
+ return false;
66
+ const normalized = value.trim().toLowerCase();
67
+ return normalized === '1' || normalized === 'true' || normalized === 'yes';
68
+ }
69
+ //# sourceMappingURL=config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAA;AAEtC;;;;;;;;GAQG;AAEH,oFAAoF;AACpF,MAAM,CAAC,MAAM,QAAQ,GAAG,iBAAiB,CAAA;AACzC,MAAM,CAAC,MAAM,eAAe,GAAG,yBAAyB,CAAA;AAExD;;;;;GAKG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,sBAAsB,CAAA;AACnD,MAAM,CAAC,MAAM,oBAAoB,GAAG,8BAA8B,CAAA;AAElE,MAAM,CAAC,MAAM,YAAY,GAAG,uBAAuB,CAAA;AAUnD,MAAM,OAAO,WAAY,SAAQ,KAAK;CAAG;AAEzC;;;;;;;GAOG;AACH,MAAM,UAAU,UAAU,CAAC,MAA0C,OAAO,CAAC,GAAG;IAC9E,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC;QAC/C,MAAM,IAAI,WAAW,CAAC,sBAAsB,EAAE,CAAC,CAAA;IACjD,CAAC;IAED,MAAM,IAAI,GAAG,GAAG,CAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,IAAI,GAAG,CAAC,eAAe,CAAC,EAAE,IAAI,EAAE,IAAI,YAAY,CAAA;IAClF,IAAI,OAAe,CAAA;IACnB,IAAI,CAAC;QACH,8FAA8F;QAC9F,yEAAyE;QACzE,OAAO,GAAG,IAAI,GAAG,CAAC,IAAI,CAAC,CAAC,MAAM,CAAA;IAChC,CAAC;IAAC,MAAM,CAAC;QACP,MAAM,IAAI,WAAW,CAAC,GAAG,QAAQ,wBAAwB,IAAI,EAAE,CAAC,CAAA;IAClE,CAAC;IAED,OAAO;QACL,OAAO;QACP,QAAQ,EAAE,QAAQ,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC,IAAI,QAAQ,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;QAC7E,GAAG;KACJ,CAAA;AACH,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,sBAAsB;IACpC,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,KAAK,GAAG,CAAC,MAAM,MAAM,GAAG,CAAC,KAAK,KAAK,GAAG,CAAC,OAAO,GAAG,CAAC,CAAA;IAClF,OAAO,CACL,mGAAmG;QACnG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CACjB,CAAA;AACH,CAAC;AAED,SAAS,QAAQ,CAAC,KAAyB;IACzC,IAAI,CAAC,KAAK;QAAE,OAAO,KAAK,CAAA;IACxB,MAAM,UAAU,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAA;IAC7C,OAAO,UAAU,KAAK,GAAG,IAAI,UAAU,KAAK,MAAM,IAAI,UAAU,KAAK,KAAK,CAAA;AAC5E,CAAC"}
@@ -0,0 +1,19 @@
1
+ /**
2
+ * The library entry point, for embedding this server in a host that owns its own transport.
3
+ *
4
+ * The ordinary way to use this package is the `ebitex-mcp` executable, configured in an MCP client.
5
+ * This export exists so a host that already has a transport (an in-process client, an HTTP bridge)
6
+ * can build the same server without going through a child process.
7
+ *
8
+ * What is exported is the suite-level surface plus each app's own types, under the app's name, so a
9
+ * second app's exports cannot collide with Content's.
10
+ */
11
+ export { buildServer, startupBanner, SERVER_NAME, SERVER_VERSION, type BuiltServer } from './server.js';
12
+ export { readConfig, ConfigError, type ServerConfig } from './config.js';
13
+ export { APPS } from './apps/index.js';
14
+ export { StartupError, type McpApp, type AppContext, type StartedApp } from './app.js';
15
+ export { resolveSession, type Session, type WhoAmI } from './apps/content/session.js';
16
+ export { createClient, type ContentClient } from './apps/content/client.js';
17
+ export { ContentApiError } from './apps/content/errors.js';
18
+ export { WRITABLE_KINDS, isEntityKind, routesFor, type EntityKind } from './apps/content/routes.js';
19
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,WAAW,EAAE,cAAc,EAAE,KAAK,WAAW,EAAE,MAAM,aAAa,CAAA;AACvG,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,KAAK,YAAY,EAAE,MAAM,aAAa,CAAA;AACxE,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAA;AACtC,OAAO,EAAE,YAAY,EAAE,KAAK,MAAM,EAAE,KAAK,UAAU,EAAE,KAAK,UAAU,EAAE,MAAM,UAAU,CAAA;AAGtF,OAAO,EAAE,cAAc,EAAE,KAAK,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,2BAA2B,CAAA;AACrF,OAAO,EAAE,YAAY,EAAE,KAAK,aAAa,EAAE,MAAM,0BAA0B,CAAA;AAC3E,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAA;AAC1D,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,SAAS,EAAE,KAAK,UAAU,EAAE,MAAM,0BAA0B,CAAA"}
package/dist/index.js ADDED
@@ -0,0 +1,20 @@
1
+ /**
2
+ * The library entry point, for embedding this server in a host that owns its own transport.
3
+ *
4
+ * The ordinary way to use this package is the `ebitex-mcp` executable, configured in an MCP client.
5
+ * This export exists so a host that already has a transport (an in-process client, an HTTP bridge)
6
+ * can build the same server without going through a child process.
7
+ *
8
+ * What is exported is the suite-level surface plus each app's own types, under the app's name, so a
9
+ * second app's exports cannot collide with Content's.
10
+ */
11
+ export { buildServer, startupBanner, SERVER_NAME, SERVER_VERSION } from './server.js';
12
+ export { readConfig, ConfigError } from './config.js';
13
+ export { APPS } from './apps/index.js';
14
+ export { StartupError } from './app.js';
15
+ // Content
16
+ export { resolveSession } from './apps/content/session.js';
17
+ export { createClient } from './apps/content/client.js';
18
+ export { ContentApiError } from './apps/content/errors.js';
19
+ export { WRITABLE_KINDS, isEntityKind, routesFor } from './apps/content/routes.js';
20
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,WAAW,EAAE,cAAc,EAAoB,MAAM,aAAa,CAAA;AACvG,OAAO,EAAE,UAAU,EAAE,WAAW,EAAqB,MAAM,aAAa,CAAA;AACxE,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAA;AACtC,OAAO,EAAE,YAAY,EAAiD,MAAM,UAAU,CAAA;AAEtF,UAAU;AACV,OAAO,EAAE,cAAc,EAA6B,MAAM,2BAA2B,CAAA;AACrF,OAAO,EAAE,YAAY,EAAsB,MAAM,0BAA0B,CAAA;AAC3E,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAA;AAC1D,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,SAAS,EAAmB,MAAM,0BAA0B,CAAA"}
package/dist/main.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ export {};
3
+ //# sourceMappingURL=main.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":""}
package/dist/main.js ADDED
@@ -0,0 +1,51 @@
1
+ #!/usr/bin/env node
2
+ import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
3
+ import { StartupError } from './app.js';
4
+ import { ConfigError } from './config.js';
5
+ import { buildServer } from './server.js';
6
+ /**
7
+ * The published `ebitex-mcp` executable. `package.json`'s `bin` points at this module's
8
+ * compiled output; TypeScript preserves the leading `#!` verbatim on emit, so there is no separate
9
+ * untyped shim.
10
+ *
11
+ * Kept to process concerns only — starting, failing, exiting — with everything testable living in
12
+ * `server.ts`.
13
+ *
14
+ * **Everything diagnostic goes to stderr.** On a stdio transport, stdout *is* the protocol: a single
15
+ * stray `console.log` corrupts the JSON-RPC stream and the client reports a parse error rather than
16
+ * whatever was printed. That is the one rule to remember when adding anything to this file.
17
+ */
18
+ async function main() {
19
+ const { server, banner } = await buildServer();
20
+ console.error(banner);
21
+ await server.connect(new StdioServerTransport());
22
+ }
23
+ main().catch((error) => {
24
+ // A configuration or startup failure is something a person can fix in a config file, so it is
25
+ // printed as its message alone — a stack trace here would bury the one line that matters.
26
+ // Anything else is a real fault and keeps its stack.
27
+ if (error instanceof ConfigError || error instanceof StartupError) {
28
+ console.error(error.message);
29
+ }
30
+ else {
31
+ console.error(error);
32
+ }
33
+ // `process.exitCode`, never `process.exit()`. Found on Windows against the real published
34
+ // package: `process.exit()` here tears the process down while the `fetch` to `/whoami` still has
35
+ // live libuv handles, which aborts with
36
+ //
37
+ // Assertion failed: !(handle->flags & UV_HANDLE_CLOSING), file src/win/async.c, line 76
38
+ //
39
+ // and an exit code of 127 rather than 1 — conventionally "command not found", which is actively
40
+ // misleading for a launcher. The message does still print first, so the failure looks like a
41
+ // crash *after* correctly reporting itself.
42
+ //
43
+ // Setting the code and letting the loop drain exits cleanly in well under a second: undici's
44
+ // keep-alive socket is unref'd, so it holds nothing open. The startup path that throws BEFORE any
45
+ // request (a missing key) was always fine, which is what localizes this to "a fetch happened".
46
+ //
47
+ // Note no test here can catch a regression: the assertion is Windows-only (`src/win/async.c`) and
48
+ // CI runs Ubuntu, where `process.exit()` would exit 1 quietly. The guard is this comment.
49
+ process.exitCode = 1;
50
+ });
51
+ //# sourceMappingURL=main.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"main.js","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAA;AAChF,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AACvC,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAGzC;;;;;;;;;;;GAWG;AACH,KAAK,UAAU,IAAI;IACjB,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,WAAW,EAAE,CAAA;IAC9C,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,CAAA;IAErB,MAAM,MAAM,CAAC,OAAO,CAAC,IAAI,oBAAoB,EAAE,CAAC,CAAA;AAClD,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,KAAc,EAAE,EAAE;IAC9B,8FAA8F;IAC9F,0FAA0F;IAC1F,qDAAqD;IACrD,IAAI,KAAK,YAAY,WAAW,IAAI,KAAK,YAAY,YAAY,EAAE,CAAC;QAClE,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,CAAA;IAC9B,CAAC;SAAM,CAAC;QACN,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;IACtB,CAAC;IAED,0FAA0F;IAC1F,iGAAiG;IACjG,wCAAwC;IACxC,EAAE;IACF,0FAA0F;IAC1F,EAAE;IACF,gGAAgG;IAChG,6FAA6F;IAC7F,4CAA4C;IAC5C,EAAE;IACF,6FAA6F;IAC7F,kGAAkG;IAClG,+FAA+F;IAC/F,EAAE;IACF,kGAAkG;IAClG,0FAA0F;IAC1F,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAA;AACtB,CAAC,CAAC,CAAA"}
@@ -0,0 +1,51 @@
1
+ import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
+ import { type ServerConfig } from './config.js';
3
+ /**
4
+ * Assembly. Nothing here decides anything: which apps run is decided by the keys the operator
5
+ * configured, which tools an app offers by its key's own scopes, and which routes it reaches by its
6
+ * own route table. This file only wires them.
7
+ */
8
+ export declare const SERVER_NAME = "ebitex";
9
+ /**
10
+ * What this build reports in the MCP handshake, and in the startup banner.
11
+ *
12
+ * **Read from the installed `package.json` at load, never written here** (spec
13
+ * 791-content-mcp-version-reporting). It used to be the literal `'0.1.0'`, under a comment claiming
14
+ * the build kept it in step with `package.json`. The build does no such thing: `publish-packages.yml`
15
+ * stamps the version with `npm version` and never touches source, so *every published build announced
16
+ * `0.1.0`* — and that number is exactly what a reporter needs when two agent processes disagree about
17
+ * which tools exist, which is the situation it was useless in. `content_topology` is the newest Content tool,
18
+ * so a stale build has the others and not it; scopes cannot produce that, since the Content read
19
+ * tools share one registration block.
20
+ *
21
+ * **Why not a generated constant**, following `scripts/bundleHelp.mjs`, which is the obvious shape:
22
+ * the publish workflow runs `npm version` *after* `npm run build`, so a prebuild stamp would bake the
23
+ * committed `0.0.0-dev` placeholder into every release — the same symptom with a different wrong
24
+ * number. Reading at runtime is immune to that ordering, because it reads the file `npm version`
25
+ * actually wrote. Reordering the workflow would work too, and is worse: it is deliberately
26
+ * package-agnostic and shared by four packages, so a change made to suit this one has three other
27
+ * consumers and no test.
28
+ *
29
+ * `../package.json` resolves correctly from both places this module ever runs — `dist/server.js` in a
30
+ * published install, and `src/server.ts` under vitest — which is why the path needs no build
31
+ * configuration and no conditional.
32
+ */
33
+ export declare const SERVER_VERSION: string;
34
+ export type BuiltServer = {
35
+ server: McpServer;
36
+ /** The ids of the apps this server is serving, in banner order. */
37
+ apps: string[];
38
+ /** What to print to stderr before connecting — see {@link startupBanner}. */
39
+ banner: string;
40
+ };
41
+ export declare function buildServer(options?: {
42
+ config?: ServerConfig;
43
+ fetchImpl?: typeof fetch;
44
+ }): Promise<BuiltServer>;
45
+ /**
46
+ * What the operator sees on stderr at startup: the build, where the API is, and then one section per
47
+ * running app naming where that app's writes will land (the app's own lines — see each app's banner
48
+ * for why it names the environment rather than only reporting that the key worked).
49
+ */
50
+ export declare function startupBanner(config: ServerConfig, sections: string[][]): string;
51
+ //# sourceMappingURL=server.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAA;AAGnE,OAAO,EAAc,KAAK,YAAY,EAAE,MAAM,aAAa,CAAA;AAE3D;;;;GAIG;AAEH,eAAO,MAAM,WAAW,WAAW,CAAA;AAEnC;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,eAAO,MAAM,cAAc,EAAE,MAAsB,CAAA;AAiBnD,MAAM,MAAM,WAAW,GAAG;IACxB,MAAM,EAAE,SAAS,CAAA;IACjB,mEAAmE;IACnE,IAAI,EAAE,MAAM,EAAE,CAAA;IACd,6EAA6E;IAC7E,MAAM,EAAE,MAAM,CAAA;CACf,CAAA;AAED,wBAAsB,WAAW,CAAC,OAAO,CAAC,EAAE;IAC1C,MAAM,CAAC,EAAE,YAAY,CAAA;IACrB,SAAS,CAAC,EAAE,OAAO,KAAK,CAAA;CACzB,GAAG,OAAO,CAAC,WAAW,CAAC,CAyCvB;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,GAAG,MAAM,CAchF"}
package/dist/server.js ADDED
@@ -0,0 +1,104 @@
1
+ import { createRequire } from 'node:module';
2
+ import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
3
+ import { APPS } from './apps/index.js';
4
+ import { readConfig } from './config.js';
5
+ /**
6
+ * Assembly. Nothing here decides anything: which apps run is decided by the keys the operator
7
+ * configured, which tools an app offers by its key's own scopes, and which routes it reaches by its
8
+ * own route table. This file only wires them.
9
+ */
10
+ export const SERVER_NAME = 'ebitex';
11
+ /**
12
+ * What this build reports in the MCP handshake, and in the startup banner.
13
+ *
14
+ * **Read from the installed `package.json` at load, never written here** (spec
15
+ * 791-content-mcp-version-reporting). It used to be the literal `'0.1.0'`, under a comment claiming
16
+ * the build kept it in step with `package.json`. The build does no such thing: `publish-packages.yml`
17
+ * stamps the version with `npm version` and never touches source, so *every published build announced
18
+ * `0.1.0`* — and that number is exactly what a reporter needs when two agent processes disagree about
19
+ * which tools exist, which is the situation it was useless in. `content_topology` is the newest Content tool,
20
+ * so a stale build has the others and not it; scopes cannot produce that, since the Content read
21
+ * tools share one registration block.
22
+ *
23
+ * **Why not a generated constant**, following `scripts/bundleHelp.mjs`, which is the obvious shape:
24
+ * the publish workflow runs `npm version` *after* `npm run build`, so a prebuild stamp would bake the
25
+ * committed `0.0.0-dev` placeholder into every release — the same symptom with a different wrong
26
+ * number. Reading at runtime is immune to that ordering, because it reads the file `npm version`
27
+ * actually wrote. Reordering the workflow would work too, and is worse: it is deliberately
28
+ * package-agnostic and shared by four packages, so a change made to suit this one has three other
29
+ * consumers and no test.
30
+ *
31
+ * `../package.json` resolves correctly from both places this module ever runs — `dist/server.js` in a
32
+ * published install, and `src/server.ts` under vitest — which is why the path needs no build
33
+ * configuration and no conditional.
34
+ */
35
+ export const SERVER_VERSION = readVersion();
36
+ /**
37
+ * Deliberately `0.0.0-unknown` rather than `0.0.0` on failure: a plausible-looking version is
38
+ * indistinguishable from a real one, which is the defect this whole mechanism exists to remove. And
39
+ * deliberately not a throw — a version is diagnostic, never load-bearing, so refusing to start
40
+ * because a diagnostic is missing would trade a small confusion for a total outage.
41
+ */
42
+ function readVersion() {
43
+ try {
44
+ const pkg = createRequire(import.meta.url)('../package.json');
45
+ return typeof pkg.version === 'string' && pkg.version.length > 0 ? pkg.version : '0.0.0-unknown';
46
+ }
47
+ catch {
48
+ return '0.0.0-unknown';
49
+ }
50
+ }
51
+ export async function buildServer(options) {
52
+ const config = options?.config ?? readConfig();
53
+ const running = APPS.filter((app) => app.isConfigured(config.env));
54
+ // One at a time rather than in parallel: each start is a `/whoami` round trip whose failure is a
55
+ // message the operator reads, and two failing at once would print them in whichever order the
56
+ // network answered.
57
+ const started = [];
58
+ for (const app of running) {
59
+ started.push({
60
+ id: app.id,
61
+ app: await app.start({
62
+ baseUrl: config.baseUrl,
63
+ readOnly: config.readOnly,
64
+ env: config.env,
65
+ fetchImpl: options?.fetchImpl,
66
+ serverVersion: SERVER_VERSION,
67
+ }),
68
+ });
69
+ }
70
+ const server = new McpServer({ name: SERVER_NAME, version: SERVER_VERSION }, {
71
+ instructions: [
72
+ 'ebitex is a suite of apps and this server exposes the ones whose management keys were configured: ' +
73
+ `${running.map((app) => app.label).join(', ')}. Each app has its own tools, named with the app's id as a prefix, ` +
74
+ 'and its own key bound to one organization, so an app that is not listed here is not reachable from this session.',
75
+ ...started.map(({ app }) => app.instructions),
76
+ ].join('\n\n'),
77
+ });
78
+ for (const { app } of started)
79
+ app.register(server);
80
+ return {
81
+ server,
82
+ apps: started.map(({ id }) => id),
83
+ banner: startupBanner(config, started.map(({ app }) => app.banner)),
84
+ };
85
+ }
86
+ /**
87
+ * What the operator sees on stderr at startup: the build, where the API is, and then one section per
88
+ * running app naming where that app's writes will land (the app's own lines — see each app's banner
89
+ * for why it names the environment rather than only reporting that the key worked).
90
+ */
91
+ export function startupBanner(config, sections) {
92
+ const lines = [
93
+ 'ebitex MCP',
94
+ // First, above the binding: when two agent processes disagree about which tools exist, this is
95
+ // the first thing to compare, and the operator reading stderr is who files that report.
96
+ ` version ${SERVER_VERSION}`,
97
+ ` api ${config.baseUrl}`,
98
+ ];
99
+ for (const section of sections) {
100
+ lines.push('', ...section);
101
+ }
102
+ return lines.join('\n');
103
+ }
104
+ //# sourceMappingURL=server.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"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"}
package/package.json CHANGED
@@ -1,6 +1,46 @@
1
1
  {
2
2
  "name": "@ebitex/mcp",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "1.1.0",
4
+ "description": "An MCP server for the ebitex suite: let an AI agent work in Content (and, as they are added, every other app) with your management keys.",
5
+ "license": "Apache-2.0",
6
+ "homepage": "https://developers.ebitex.io/getting-started/content-as-code/",
7
+ "type": "module",
8
+ "files": [
9
+ "dist"
10
+ ],
11
+ "bin": {
12
+ "ebitex-mcp": "./dist/main.js"
13
+ },
14
+ "exports": {
15
+ ".": {
16
+ "types": "./dist/index.d.ts",
17
+ "import": "./dist/index.js"
18
+ },
19
+ "./main": "./dist/main.js"
20
+ },
21
+ "publishConfig": {
22
+ "access": "public"
23
+ },
24
+ "scripts": {
25
+ "prebuild": "node scripts/bundleHelp.mjs",
26
+ "build": "npm run prebuild && tsc -p tsconfig.build.json",
27
+ "lint": "oxlint",
28
+ "pretest": "node scripts/bundleHelp.mjs",
29
+ "test": "vitest run"
30
+ },
31
+ "dependencies": {
32
+ "@modelcontextprotocol/sdk": "^1.30.0",
33
+ "zod": "^3.25.76"
34
+ },
35
+ "devDependencies": {
36
+ "@types/node": "^24.0.0",
37
+ "oxlint": "^1.71.0",
38
+ "typescript": "~6.0.2",
39
+ "vitest": "^4.1.10"
40
+ },
41
+ "ebitex": {
42
+ "extraInputs": [
43
+ "help/content"
44
+ ]
45
+ }
46
+ }