vendure-mcp-graphql 1.3.0 → 1.3.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.
- package/dist/index.js +5 -7
- package/dist/src/client.js +1 -8
- package/package.json +2 -2
- package/dist/src/types.d.ts +0 -45
- package/dist/src/types.js +0 -4
package/dist/index.js
CHANGED
|
@@ -7,15 +7,13 @@ import { Server } from "@modelcontextprotocol/sdk/server/index.js";
|
|
|
7
7
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
8
8
|
import { CallToolRequestSchema, ListToolsRequestSchema, ErrorCode, McpError, } from "@modelcontextprotocol/sdk/types.js";
|
|
9
9
|
import { config } from "dotenv";
|
|
10
|
-
import { resolve
|
|
11
|
-
import { fileURLToPath } from "url";
|
|
10
|
+
import { resolve } from "path";
|
|
12
11
|
import { existsSync } from "fs";
|
|
13
|
-
// Load environment variables
|
|
14
|
-
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
12
|
+
// Load environment variables from the project root (CWD)
|
|
15
13
|
// 1. Try to load from project root .env.local
|
|
16
|
-
config({ path: resolve(
|
|
14
|
+
config({ path: resolve(process.cwd(), ".env.local") });
|
|
17
15
|
// 2. Also try to load from specific vendure-api-key.env if it exists
|
|
18
|
-
const apiKeyPath = resolve(
|
|
16
|
+
const apiKeyPath = resolve(process.cwd(), "vendure-api-key.env");
|
|
19
17
|
if (existsSync(apiKeyPath)) {
|
|
20
18
|
const envConfig = config({ path: apiKeyPath });
|
|
21
19
|
if (envConfig.parsed?.VENDURE_API_KEY) {
|
|
@@ -49,7 +47,7 @@ class SharedResources {
|
|
|
49
47
|
}
|
|
50
48
|
const server = new Server({
|
|
51
49
|
name: "vendure-mcp-graphql",
|
|
52
|
-
version: "1.
|
|
50
|
+
version: "1.3.1",
|
|
53
51
|
}, {
|
|
54
52
|
capabilities: {
|
|
55
53
|
tools: {},
|
package/dist/src/client.js
CHANGED
|
@@ -33,15 +33,8 @@ export class GraphQLClient {
|
|
|
33
33
|
return result.data;
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
|
-
// Singleton instance
|
|
37
|
-
let clientInstance = null;
|
|
38
36
|
export function getClient() {
|
|
39
|
-
|
|
40
|
-
return clientInstance;
|
|
41
|
-
}
|
|
42
|
-
const apiKey = process.env.VENDURE_API_KEY || null;
|
|
43
|
-
clientInstance = new GraphQLClient(apiKey);
|
|
44
|
-
return clientInstance;
|
|
37
|
+
return new GraphQLClient(process.env.VENDURE_API_KEY || null);
|
|
45
38
|
}
|
|
46
39
|
export function getAdminUrl() {
|
|
47
40
|
return process.env.ADMIN_API_URL || "http://localhost:3000/admin-api";
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vendure-mcp-graphql",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.1",
|
|
4
4
|
"description": "MCP server for Vendure Admin and Shop GraphQL APIs",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
7
|
-
"vendure-mcp-graphql": "
|
|
7
|
+
"vendure-mcp-graphql": "dist/index.js"
|
|
8
8
|
},
|
|
9
9
|
"main": "dist/index.js",
|
|
10
10
|
"files": [
|
package/dist/src/types.d.ts
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Type definitions for GraphQL entities
|
|
3
|
-
*/
|
|
4
|
-
export interface Archetype {
|
|
5
|
-
id: string;
|
|
6
|
-
code: string;
|
|
7
|
-
name: string;
|
|
8
|
-
coreDrive: string;
|
|
9
|
-
primaryFear: string;
|
|
10
|
-
languageSignature: string;
|
|
11
|
-
psychologicalTriggers: string[];
|
|
12
|
-
}
|
|
13
|
-
export type PulseScriptType = 'OPENING' | 'RESPONSE' | 'RESOLUTION' | 'CUSTOM';
|
|
14
|
-
export interface PulseScript {
|
|
15
|
-
id: string;
|
|
16
|
-
code: string;
|
|
17
|
-
name: string;
|
|
18
|
-
type: PulseScriptType;
|
|
19
|
-
description?: string;
|
|
20
|
-
archetypeId: string;
|
|
21
|
-
archetype?: Archetype;
|
|
22
|
-
}
|
|
23
|
-
export interface CreatePulseScriptInput {
|
|
24
|
-
code: string;
|
|
25
|
-
name: string;
|
|
26
|
-
type: PulseScriptType;
|
|
27
|
-
description?: string;
|
|
28
|
-
archetypeId: string;
|
|
29
|
-
}
|
|
30
|
-
export interface UpdatePulseScriptInput {
|
|
31
|
-
id: string;
|
|
32
|
-
code?: string;
|
|
33
|
-
name?: string;
|
|
34
|
-
type?: PulseScriptType;
|
|
35
|
-
description?: string;
|
|
36
|
-
archetypeId?: string;
|
|
37
|
-
}
|
|
38
|
-
export interface Pulse {
|
|
39
|
-
id: string;
|
|
40
|
-
code: string;
|
|
41
|
-
status: string;
|
|
42
|
-
currentState: string;
|
|
43
|
-
initiatorArchetype?: Archetype;
|
|
44
|
-
targetArchetype?: Archetype;
|
|
45
|
-
}
|
package/dist/src/types.js
DELETED