@kya-os/mcp-i-cloudflare 1.6.14 → 1.6.16

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
+ * Known MCP Clients Registry
3
+ *
4
+ * Maps known MCP client names to their official Know That AI (KTA) DIDs.
5
+ * When a known client connects, we use its pre-registered DID instead of generating one.
6
+ */
7
+ export interface KnownClientConfig {
8
+ /** Possible client name variations (case-insensitive matching) */
9
+ names: string[];
10
+ /** Know That AI registered DID for this client (null if not yet registered) */
11
+ ktaDid: string | null;
12
+ /** Display name for logging */
13
+ displayName: string;
14
+ /** Optional vendor/organization */
15
+ vendor?: string;
16
+ }
17
+ /**
18
+ * Registry of known MCP clients
19
+ *
20
+ * Each entry maps a canonical client ID to its configuration.
21
+ * The `names` array contains possible variations of the client name
22
+ * that might appear in the MCP initialize message's clientInfo.name field.
23
+ */
24
+ export declare const KNOWN_MCP_CLIENTS: Record<string, KnownClientConfig>;
25
+ /**
26
+ * Find a known client by name (case-insensitive)
27
+ *
28
+ * @param clientName - The client name from MCP initialize message
29
+ * @returns The known client config if found, undefined otherwise
30
+ */
31
+ export declare function findKnownClient(clientName: string | undefined): (KnownClientConfig & {
32
+ id: string;
33
+ }) | undefined;
34
+ /**
35
+ * Check if a client name corresponds to a known client
36
+ */
37
+ export declare function isKnownClient(clientName: string | undefined): boolean;
38
+ /**
39
+ * Get the DID for a known client, if registered
40
+ */
41
+ export declare function getKnownClientDid(clientName: string | undefined): string | null;
42
+ /**
43
+ * Get all known client IDs
44
+ */
45
+ export declare function getKnownClientIds(): string[];
46
+ //# sourceMappingURL=known-clients.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"known-clients.d.ts","sourceRoot":"","sources":["../../src/utils/known-clients.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,WAAW,iBAAiB;IAChC,kEAAkE;IAClE,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,+EAA+E;IAC/E,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,+BAA+B;IAC/B,WAAW,EAAE,MAAM,CAAC;IACpB,mCAAmC;IACnC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAgE/D,CAAC;AAEF;;;;;GAKG;AACH,wBAAgB,eAAe,CAC7B,UAAU,EAAE,MAAM,GAAG,SAAS,GAC7B,CAAC,iBAAiB,GAAG;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,CAAC,GAAG,SAAS,CAclD;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,UAAU,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAErE;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAC/B,UAAU,EAAE,MAAM,GAAG,SAAS,GAC7B,MAAM,GAAG,IAAI,CAGf;AAED;;GAEG;AACH,wBAAgB,iBAAiB,IAAI,MAAM,EAAE,CAE5C"}
@@ -0,0 +1,117 @@
1
+ /**
2
+ * Known MCP Clients Registry
3
+ *
4
+ * Maps known MCP client names to their official Know That AI (KTA) DIDs.
5
+ * When a known client connects, we use its pre-registered DID instead of generating one.
6
+ */
7
+ /**
8
+ * Registry of known MCP clients
9
+ *
10
+ * Each entry maps a canonical client ID to its configuration.
11
+ * The `names` array contains possible variations of the client name
12
+ * that might appear in the MCP initialize message's clientInfo.name field.
13
+ */
14
+ export const KNOWN_MCP_CLIENTS = {
15
+ "claude-desktop": {
16
+ names: [
17
+ "Claude Desktop",
18
+ "claude-desktop",
19
+ "Claude",
20
+ "claude",
21
+ "Anthropic Claude",
22
+ "Anthropic/ClaudeAI", // Web/mobile client name
23
+ "ClaudeAI",
24
+ ],
25
+ ktaDid: null, // To be registered with Know That AI
26
+ displayName: "Claude Desktop",
27
+ vendor: "Anthropic",
28
+ },
29
+ "chatgpt": {
30
+ names: [
31
+ "ChatGPT",
32
+ "chatgpt",
33
+ "chatgpt-app",
34
+ "ChatGPT App",
35
+ "OpenAI ChatGPT",
36
+ ],
37
+ ktaDid: null, // To be registered with Know That AI
38
+ displayName: "ChatGPT",
39
+ vendor: "OpenAI",
40
+ },
41
+ "mcp-inspector": {
42
+ names: [
43
+ "MCP Inspector",
44
+ "mcp-inspector",
45
+ "@anthropic/mcp-inspector",
46
+ "@modelcontextprotocol/inspector",
47
+ "Inspector",
48
+ "inspector-client", // Name sent by inspector CLI
49
+ ],
50
+ ktaDid: null, // To be registered with Know That AI
51
+ displayName: "MCP Inspector",
52
+ vendor: "Anthropic",
53
+ },
54
+ cursor: {
55
+ names: ["Cursor", "cursor", "cursor-ai", "Cursor AI", "Cursor IDE"],
56
+ ktaDid: null, // To be registered with Know That AI
57
+ displayName: "Cursor",
58
+ vendor: "Cursor Inc",
59
+ },
60
+ windsurf: {
61
+ names: ["Windsurf", "windsurf", "Codeium Windsurf"],
62
+ ktaDid: null, // To be registered with Know That AI
63
+ displayName: "Windsurf",
64
+ vendor: "Codeium",
65
+ },
66
+ cline: {
67
+ names: ["Cline", "cline", "VS Code Cline", "vscode-cline"],
68
+ ktaDid: null, // To be registered with Know That AI
69
+ displayName: "Cline",
70
+ vendor: "Cline",
71
+ },
72
+ zed: {
73
+ names: ["Zed", "zed", "Zed Editor", "zed-editor"],
74
+ ktaDid: null, // To be registered with Know That AI
75
+ displayName: "Zed",
76
+ vendor: "Zed Industries",
77
+ },
78
+ };
79
+ /**
80
+ * Find a known client by name (case-insensitive)
81
+ *
82
+ * @param clientName - The client name from MCP initialize message
83
+ * @returns The known client config if found, undefined otherwise
84
+ */
85
+ export function findKnownClient(clientName) {
86
+ if (!clientName)
87
+ return undefined;
88
+ const normalizedName = clientName.toLowerCase().trim();
89
+ for (const [id, config] of Object.entries(KNOWN_MCP_CLIENTS)) {
90
+ for (const name of config.names) {
91
+ if (name.toLowerCase() === normalizedName) {
92
+ return { ...config, id };
93
+ }
94
+ }
95
+ }
96
+ return undefined;
97
+ }
98
+ /**
99
+ * Check if a client name corresponds to a known client
100
+ */
101
+ export function isKnownClient(clientName) {
102
+ return findKnownClient(clientName) !== undefined;
103
+ }
104
+ /**
105
+ * Get the DID for a known client, if registered
106
+ */
107
+ export function getKnownClientDid(clientName) {
108
+ const known = findKnownClient(clientName);
109
+ return known?.ktaDid ?? null;
110
+ }
111
+ /**
112
+ * Get all known client IDs
113
+ */
114
+ export function getKnownClientIds() {
115
+ return Object.keys(KNOWN_MCP_CLIENTS);
116
+ }
117
+ //# sourceMappingURL=known-clients.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"known-clients.js","sourceRoot":"","sources":["../../src/utils/known-clients.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAaH;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAsC;IAClE,gBAAgB,EAAE;QAChB,KAAK,EAAE;YACL,gBAAgB;YAChB,gBAAgB;YAChB,QAAQ;YACR,QAAQ;YACR,kBAAkB;YAClB,oBAAoB,EAAG,yBAAyB;YAChD,UAAU;SACX;QACD,MAAM,EAAE,IAAI,EAAE,qCAAqC;QACnD,WAAW,EAAE,gBAAgB;QAC7B,MAAM,EAAE,WAAW;KACpB;IACD,SAAS,EAAE;QACT,KAAK,EAAE;YACL,SAAS;YACT,SAAS;YACT,aAAa;YACb,aAAa;YACb,gBAAgB;SACjB;QACD,MAAM,EAAE,IAAI,EAAE,qCAAqC;QACnD,WAAW,EAAE,SAAS;QACtB,MAAM,EAAE,QAAQ;KACjB;IACD,eAAe,EAAE;QACf,KAAK,EAAE;YACL,eAAe;YACf,eAAe;YACf,0BAA0B;YAC1B,iCAAiC;YACjC,WAAW;YACX,kBAAkB,EAAG,6BAA6B;SACnD;QACD,MAAM,EAAE,IAAI,EAAE,qCAAqC;QACnD,WAAW,EAAE,eAAe;QAC5B,MAAM,EAAE,WAAW;KACpB;IACD,MAAM,EAAE;QACN,KAAK,EAAE,CAAC,QA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AED;;GAEG;AACH,MAAM,UAAU,aAAa,CAAC,UAA8B;IAC1D,OAAO,eAAe,CAAC,UAAU,CAAC,KAAK,SAAS,CAAC;AACnD,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,iBAAiB,CAC/B,UAA8B;IAE9B,MAAM,KAAK,GAAG,eAAe,CAAC,UAAU,CAAC,CAAC;IAC1C,OAAO,KAAK,EAAE,MAAM,IAAI,IAAI,CAAC;AAC/B,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,iBAAiB;IAC/B,OAAO,MAAM,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC;AACxC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kya-os/mcp-i-cloudflare",
3
- "version": "1.6.14",
3
+ "version": "1.6.16",
4
4
  "description": "Cloudflare Workers adapter for MCP-I framework",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -19,7 +19,7 @@
19
19
  "dependencies": {
20
20
  "@kya-os/contracts": "^1.6.1",
21
21
  "@kya-os/mcp-i-core": "^1.3.6",
22
- "@modelcontextprotocol/sdk": "^1.22.0",
22
+ "@modelcontextprotocol/sdk": "^1.19.1",
23
23
  "agents": "^0.2.21",
24
24
  "base-x": "^5.0.0",
25
25
  "hono": "^4.6.3",