mcpgraph 0.1.2 → 0.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.
- package/README.md +46 -6
- package/dist/api.d.ts +71 -0
- package/dist/api.d.ts.map +1 -0
- package/dist/api.js +111 -0
- package/dist/api.js.map +1 -0
- package/dist/config/schema.d.ts +106 -23
- package/dist/config/schema.d.ts.map +1 -1
- package/dist/config/schema.js +34 -5
- package/dist/config/schema.js.map +1 -1
- package/dist/execution/executor.d.ts +1 -0
- package/dist/execution/executor.d.ts.map +1 -1
- package/dist/execution/executor.js +25 -8
- package/dist/execution/executor.js.map +1 -1
- package/dist/execution/nodes/mcp-tool-executor.d.ts +2 -2
- package/dist/execution/nodes/mcp-tool-executor.d.ts.map +1 -1
- package/dist/execution/nodes/mcp-tool-executor.js +3 -13
- package/dist/execution/nodes/mcp-tool-executor.js.map +1 -1
- package/dist/graph/validator.d.ts.map +1 -1
- package/dist/graph/validator.js +57 -20
- package/dist/graph/validator.js.map +1 -1
- package/dist/main.js +10 -28
- package/dist/main.js.map +1 -1
- package/dist/mcp/client-manager.d.ts +3 -1
- package/dist/mcp/client-manager.d.ts.map +1 -1
- package/dist/mcp/client-manager.js +77 -6
- package/dist/mcp/client-manager.js.map +1 -1
- package/dist/types/config.d.ts +26 -5
- package/dist/types/config.d.ts.map +1 -1
- package/examples/api-usage.ts +69 -0
- package/examples/count_files.yaml +23 -5
- package/package.json +5 -1
package/README.md
CHANGED
|
@@ -20,11 +20,13 @@ Here's a simple example that counts files in a directory:
|
|
|
20
20
|
```yaml
|
|
21
21
|
version: "1.0"
|
|
22
22
|
|
|
23
|
+
# MCP Server Metadata
|
|
23
24
|
server:
|
|
24
|
-
name: "
|
|
25
|
+
name: "fileUtils"
|
|
25
26
|
version: "1.0.0"
|
|
26
|
-
description: "
|
|
27
|
+
description: "File utilities"
|
|
27
28
|
|
|
29
|
+
# Tool Definitions
|
|
28
30
|
tools:
|
|
29
31
|
- name: "count_files"
|
|
30
32
|
description: "Counts the number of files in a directory"
|
|
@@ -42,22 +44,34 @@ tools:
|
|
|
42
44
|
count:
|
|
43
45
|
type: "number"
|
|
44
46
|
description: "The number of files in the directory"
|
|
45
|
-
entryNode: "entry_count_files"
|
|
46
|
-
exitNode: "exit_count_files"
|
|
47
47
|
|
|
48
|
+
# MCP Servers used by the graph
|
|
49
|
+
servers:
|
|
50
|
+
filesystem:
|
|
51
|
+
command: "npx"
|
|
52
|
+
args:
|
|
53
|
+
- "-y"
|
|
54
|
+
- "@modelcontextprotocol/server-filesystem"
|
|
55
|
+
- "./tests/files"
|
|
56
|
+
|
|
57
|
+
# Graph Nodes
|
|
48
58
|
nodes:
|
|
59
|
+
# Entry node: Receives tool arguments
|
|
49
60
|
- id: "entry_count_files"
|
|
50
61
|
type: "entry"
|
|
62
|
+
tool: "count_files"
|
|
51
63
|
next: "list_directory_node"
|
|
52
64
|
|
|
65
|
+
# List directory contents
|
|
53
66
|
- id: "list_directory_node"
|
|
54
|
-
type: "
|
|
67
|
+
type: "mcp"
|
|
55
68
|
server: "filesystem"
|
|
56
69
|
tool: "list_directory"
|
|
57
70
|
args:
|
|
58
71
|
path: "$.input.directory"
|
|
59
72
|
next: "count_files_node"
|
|
60
73
|
|
|
74
|
+
# Transform and count files
|
|
61
75
|
- id: "count_files_node"
|
|
62
76
|
type: "transform"
|
|
63
77
|
transform:
|
|
@@ -65,8 +79,10 @@ nodes:
|
|
|
65
79
|
{ "count": $count($split(list_directory_node, "\n")) }
|
|
66
80
|
next: "exit_count_files"
|
|
67
81
|
|
|
82
|
+
# Exit node: Returns the count
|
|
68
83
|
- id: "exit_count_files"
|
|
69
84
|
type: "exit"
|
|
85
|
+
tool: "count_files"
|
|
70
86
|
```
|
|
71
87
|
|
|
72
88
|
This graph:
|
|
@@ -78,7 +94,7 @@ This graph:
|
|
|
78
94
|
## Node Types
|
|
79
95
|
|
|
80
96
|
- **`entry`**: Entry point for a tool's graph execution. Receives tool arguments.
|
|
81
|
-
- **`
|
|
97
|
+
- **`mcp`**: Calls an MCP tool on an internal or external MCP server.
|
|
82
98
|
- **`transform`**: Applies [JSONata](https://jsonata.org/) expressions to transform data between nodes.
|
|
83
99
|
- **`switch`**: Uses [JSON Logic](https://jsonlogic.com/) to conditionally route to different nodes.
|
|
84
100
|
- **`exit`**: Exit point that returns the final result to the MCP tool caller.
|
|
@@ -145,6 +161,30 @@ Or if not installed (run from npm):
|
|
|
145
161
|
|
|
146
162
|
**Note:** Replace `/path/to/your/config.yaml` with the actual path to your YAML configuration file. The `-c` flag specifies the configuration file to use.
|
|
147
163
|
|
|
164
|
+
### Programmatic API
|
|
165
|
+
|
|
166
|
+
The `mcpgraph` package exports a programmatic API that can be used in your own applications (e.g., for building a UX server or other interfaces):
|
|
167
|
+
|
|
168
|
+
```typescript
|
|
169
|
+
import { McpGraphApi } from 'mcpgraph';
|
|
170
|
+
|
|
171
|
+
// Create an API instance (loads and validates config)
|
|
172
|
+
const api = new McpGraphApi('path/to/config.yaml');
|
|
173
|
+
|
|
174
|
+
// List all available tools
|
|
175
|
+
const tools = api.listTools();
|
|
176
|
+
|
|
177
|
+
// Execute a tool
|
|
178
|
+
const result = await api.executeTool('count_files', {
|
|
179
|
+
directory: './tests/files',
|
|
180
|
+
});
|
|
181
|
+
|
|
182
|
+
// Clean up resources
|
|
183
|
+
await api.close();
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
See [`examples/api-usage.ts`](examples/api-usage.ts) for a complete example.
|
|
187
|
+
|
|
148
188
|
## Documentation
|
|
149
189
|
|
|
150
190
|
- [Contributing Guide](CONTRIBUTING.md) - Setup, development, and contribution guidelines
|
package/dist/api.d.ts
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Programmatic API for mcpGraph
|
|
3
|
+
*
|
|
4
|
+
* This API can be used by:
|
|
5
|
+
* - MCP server (main.ts) - for stdio transport
|
|
6
|
+
* - UX applications - for HTTP/WebSocket servers
|
|
7
|
+
* - Other applications - for programmatic graph execution
|
|
8
|
+
*/
|
|
9
|
+
import type { McpGraphConfig } from './types/config.js';
|
|
10
|
+
import { type ValidationError } from './graph/validator.js';
|
|
11
|
+
export interface ToolInfo {
|
|
12
|
+
name: string;
|
|
13
|
+
description: string;
|
|
14
|
+
inputSchema: Record<string, unknown>;
|
|
15
|
+
outputSchema?: Record<string, unknown>;
|
|
16
|
+
}
|
|
17
|
+
export interface ExecutionResult {
|
|
18
|
+
result: unknown;
|
|
19
|
+
structuredContent?: Record<string, unknown>;
|
|
20
|
+
}
|
|
21
|
+
export declare class McpGraphApi {
|
|
22
|
+
private config;
|
|
23
|
+
private executor;
|
|
24
|
+
private clientManager;
|
|
25
|
+
/**
|
|
26
|
+
* Create a new McpGraphApi instance
|
|
27
|
+
* @param configPath - Path to the YAML configuration file
|
|
28
|
+
* @throws Error if config cannot be loaded or validated
|
|
29
|
+
*/
|
|
30
|
+
constructor(configPath: string);
|
|
31
|
+
/**
|
|
32
|
+
* Get the server metadata
|
|
33
|
+
*/
|
|
34
|
+
getServerInfo(): {
|
|
35
|
+
name: string;
|
|
36
|
+
version: string;
|
|
37
|
+
description: string;
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* List all available tools
|
|
41
|
+
*/
|
|
42
|
+
listTools(): ToolInfo[];
|
|
43
|
+
/**
|
|
44
|
+
* Get information about a specific tool
|
|
45
|
+
*/
|
|
46
|
+
getTool(toolName: string): ToolInfo | undefined;
|
|
47
|
+
/**
|
|
48
|
+
* Execute a tool with the given arguments
|
|
49
|
+
*/
|
|
50
|
+
executeTool(toolName: string, toolArguments?: Record<string, unknown>): Promise<ExecutionResult>;
|
|
51
|
+
/**
|
|
52
|
+
* Get the full configuration
|
|
53
|
+
*/
|
|
54
|
+
getConfig(): McpGraphConfig;
|
|
55
|
+
/**
|
|
56
|
+
* Validate a configuration without creating an API instance
|
|
57
|
+
*/
|
|
58
|
+
static validateConfig(configPath: string): ValidationError[];
|
|
59
|
+
/**
|
|
60
|
+
* Load and validate a configuration without creating an API instance
|
|
61
|
+
*/
|
|
62
|
+
static loadAndValidateConfig(configPath: string): {
|
|
63
|
+
config: McpGraphConfig;
|
|
64
|
+
errors: ValidationError[];
|
|
65
|
+
};
|
|
66
|
+
/**
|
|
67
|
+
* Clean up resources (close MCP clients, etc.)
|
|
68
|
+
*/
|
|
69
|
+
close(): Promise<void>;
|
|
70
|
+
}
|
|
71
|
+
//# sourceMappingURL=api.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAiB,KAAK,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAI3E,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACrC,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACxC;AAED,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,OAAO,CAAC;IAChB,iBAAiB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAC7C;AAED,qBAAa,WAAW;IACtB,OAAO,CAAC,MAAM,CAAiB;IAC/B,OAAO,CAAC,QAAQ,CAAgB;IAChC,OAAO,CAAC,aAAa,CAAmB;IAExC;;;;OAIG;gBACS,UAAU,EAAE,MAAM;IAmB9B;;OAEG;IACH,aAAa,IAAI;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAA;KAAE;IAQvE;;OAEG;IACH,SAAS,IAAI,QAAQ,EAAE;IASvB;;OAEG;IACH,OAAO,CAAC,QAAQ,EAAE,MAAM,GAAG,QAAQ,GAAG,SAAS;IAc/C;;OAEG;IACG,WAAW,CACf,QAAQ,EAAE,MAAM,EAChB,aAAa,GAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAM,GAC1C,OAAO,CAAC,eAAe,CAAC;IAS3B;;OAEG;IACH,SAAS,IAAI,cAAc;IAI3B;;OAEG;IACH,MAAM,CAAC,cAAc,CAAC,UAAU,EAAE,MAAM,GAAG,eAAe,EAAE;IAK5D;;OAEG;IACH,MAAM,CAAC,qBAAqB,CAAC,UAAU,EAAE,MAAM,GAAG;QAChD,MAAM,EAAE,cAAc,CAAC;QACvB,MAAM,EAAE,eAAe,EAAE,CAAC;KAC3B;IAMD;;OAEG;IACG,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;CAG7B"}
|
package/dist/api.js
ADDED
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Programmatic API for mcpGraph
|
|
3
|
+
*
|
|
4
|
+
* This API can be used by:
|
|
5
|
+
* - MCP server (main.ts) - for stdio transport
|
|
6
|
+
* - UX applications - for HTTP/WebSocket servers
|
|
7
|
+
* - Other applications - for programmatic graph execution
|
|
8
|
+
*/
|
|
9
|
+
import { logger } from './logger.js';
|
|
10
|
+
import { loadConfig } from './config/loader.js';
|
|
11
|
+
import { validateGraph } from './graph/validator.js';
|
|
12
|
+
import { GraphExecutor } from './execution/executor.js';
|
|
13
|
+
import { McpClientManager } from './mcp/client-manager.js';
|
|
14
|
+
export class McpGraphApi {
|
|
15
|
+
config;
|
|
16
|
+
executor;
|
|
17
|
+
clientManager;
|
|
18
|
+
/**
|
|
19
|
+
* Create a new McpGraphApi instance
|
|
20
|
+
* @param configPath - Path to the YAML configuration file
|
|
21
|
+
* @throws Error if config cannot be loaded or validated
|
|
22
|
+
*/
|
|
23
|
+
constructor(configPath) {
|
|
24
|
+
logger.info(`Loading configuration from: ${configPath}`);
|
|
25
|
+
const config = loadConfig(configPath);
|
|
26
|
+
const errors = validateGraph(config);
|
|
27
|
+
if (errors.length > 0) {
|
|
28
|
+
const errorMessages = errors.map((e) => e.message).join(', ');
|
|
29
|
+
throw new Error(`Graph validation failed: ${errorMessages}`);
|
|
30
|
+
}
|
|
31
|
+
this.config = config;
|
|
32
|
+
this.clientManager = new McpClientManager();
|
|
33
|
+
this.executor = new GraphExecutor(config, this.clientManager);
|
|
34
|
+
logger.info(`Loaded configuration: ${config.server.name} v${config.server.version}`);
|
|
35
|
+
logger.info(`Tools defined: ${config.tools.map(t => t.name).join(', ')}`);
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Get the server metadata
|
|
39
|
+
*/
|
|
40
|
+
getServerInfo() {
|
|
41
|
+
return {
|
|
42
|
+
name: this.config.server.name,
|
|
43
|
+
version: this.config.server.version,
|
|
44
|
+
description: this.config.server.description,
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* List all available tools
|
|
49
|
+
*/
|
|
50
|
+
listTools() {
|
|
51
|
+
return this.config.tools.map(tool => ({
|
|
52
|
+
name: tool.name,
|
|
53
|
+
description: tool.description,
|
|
54
|
+
inputSchema: tool.inputSchema,
|
|
55
|
+
outputSchema: tool.outputSchema,
|
|
56
|
+
}));
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Get information about a specific tool
|
|
60
|
+
*/
|
|
61
|
+
getTool(toolName) {
|
|
62
|
+
const tool = this.config.tools.find(t => t.name === toolName);
|
|
63
|
+
if (!tool) {
|
|
64
|
+
return undefined;
|
|
65
|
+
}
|
|
66
|
+
return {
|
|
67
|
+
name: tool.name,
|
|
68
|
+
description: tool.description,
|
|
69
|
+
inputSchema: tool.inputSchema,
|
|
70
|
+
outputSchema: tool.outputSchema,
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Execute a tool with the given arguments
|
|
75
|
+
*/
|
|
76
|
+
async executeTool(toolName, toolArguments = {}) {
|
|
77
|
+
const result = await this.executor.executeTool(toolName, toolArguments);
|
|
78
|
+
return {
|
|
79
|
+
result,
|
|
80
|
+
structuredContent: result,
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Get the full configuration
|
|
85
|
+
*/
|
|
86
|
+
getConfig() {
|
|
87
|
+
return this.config;
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Validate a configuration without creating an API instance
|
|
91
|
+
*/
|
|
92
|
+
static validateConfig(configPath) {
|
|
93
|
+
const config = loadConfig(configPath);
|
|
94
|
+
return validateGraph(config);
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Load and validate a configuration without creating an API instance
|
|
98
|
+
*/
|
|
99
|
+
static loadAndValidateConfig(configPath) {
|
|
100
|
+
const config = loadConfig(configPath);
|
|
101
|
+
const errors = validateGraph(config);
|
|
102
|
+
return { config, errors };
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Clean up resources (close MCP clients, etc.)
|
|
106
|
+
*/
|
|
107
|
+
async close() {
|
|
108
|
+
await this.clientManager.closeAll();
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
//# sourceMappingURL=api.js.map
|
package/dist/api.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api.js","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEhD,OAAO,EAAE,aAAa,EAAwB,MAAM,sBAAsB,CAAC;AAC3E,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAc3D,MAAM,OAAO,WAAW;IACd,MAAM,CAAiB;IACvB,QAAQ,CAAgB;IACxB,aAAa,CAAmB;IAExC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MAAM,GAAG,UAAU,CAAC,UAAU,CAAC,CAAC;QACtC,MAAM,MAAM,GAAG,aAAa,CAAC,MAAM,CAAC,CAAC;QACrC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;IAC5B,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,KAAK;QACT,MAAM,IAAI,CAAC,aAAa,CAAC,QAAQ,EAAE,CAAC;IACtC,CAAC;CACF"}
|
package/dist/config/schema.d.ts
CHANGED
|
@@ -17,6 +17,55 @@ export declare const mcpGraphConfigSchema: z.ZodObject<{
|
|
|
17
17
|
name: string;
|
|
18
18
|
version: string;
|
|
19
19
|
}>;
|
|
20
|
+
servers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodObject<{
|
|
21
|
+
type: z.ZodOptional<z.ZodLiteral<"stdio">>;
|
|
22
|
+
command: z.ZodString;
|
|
23
|
+
args: z.ZodArray<z.ZodString, "many">;
|
|
24
|
+
cwd: z.ZodOptional<z.ZodString>;
|
|
25
|
+
}, "strip", z.ZodTypeAny, {
|
|
26
|
+
command: string;
|
|
27
|
+
args: string[];
|
|
28
|
+
type?: "stdio" | undefined;
|
|
29
|
+
cwd?: string | undefined;
|
|
30
|
+
}, {
|
|
31
|
+
command: string;
|
|
32
|
+
args: string[];
|
|
33
|
+
type?: "stdio" | undefined;
|
|
34
|
+
cwd?: string | undefined;
|
|
35
|
+
}>, z.ZodObject<{
|
|
36
|
+
type: z.ZodLiteral<"sse">;
|
|
37
|
+
url: z.ZodString;
|
|
38
|
+
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
39
|
+
eventSourceInit: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
40
|
+
requestInit: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
41
|
+
}, "strip", z.ZodTypeAny, {
|
|
42
|
+
type: "sse";
|
|
43
|
+
url: string;
|
|
44
|
+
headers?: Record<string, string> | undefined;
|
|
45
|
+
eventSourceInit?: Record<string, unknown> | undefined;
|
|
46
|
+
requestInit?: Record<string, unknown> | undefined;
|
|
47
|
+
}, {
|
|
48
|
+
type: "sse";
|
|
49
|
+
url: string;
|
|
50
|
+
headers?: Record<string, string> | undefined;
|
|
51
|
+
eventSourceInit?: Record<string, unknown> | undefined;
|
|
52
|
+
requestInit?: Record<string, unknown> | undefined;
|
|
53
|
+
}>, z.ZodObject<{
|
|
54
|
+
type: z.ZodLiteral<"streamableHttp">;
|
|
55
|
+
url: z.ZodString;
|
|
56
|
+
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
57
|
+
requestInit: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
58
|
+
}, "strip", z.ZodTypeAny, {
|
|
59
|
+
type: "streamableHttp";
|
|
60
|
+
url: string;
|
|
61
|
+
headers?: Record<string, string> | undefined;
|
|
62
|
+
requestInit?: Record<string, unknown> | undefined;
|
|
63
|
+
}, {
|
|
64
|
+
type: "streamableHttp";
|
|
65
|
+
url: string;
|
|
66
|
+
headers?: Record<string, string> | undefined;
|
|
67
|
+
requestInit?: Record<string, unknown> | undefined;
|
|
68
|
+
}>]>>>;
|
|
20
69
|
tools: z.ZodArray<z.ZodObject<{
|
|
21
70
|
name: z.ZodString;
|
|
22
71
|
description: z.ZodString;
|
|
@@ -82,8 +131,6 @@ export declare const mcpGraphConfigSchema: z.ZodObject<{
|
|
|
82
131
|
}> | undefined;
|
|
83
132
|
required?: string[] | undefined;
|
|
84
133
|
}>;
|
|
85
|
-
entryNode: z.ZodString;
|
|
86
|
-
exitNode: z.ZodString;
|
|
87
134
|
}, "strip", z.ZodTypeAny, {
|
|
88
135
|
description: string;
|
|
89
136
|
name: string;
|
|
@@ -105,8 +152,6 @@ export declare const mcpGraphConfigSchema: z.ZodObject<{
|
|
|
105
152
|
}> | undefined;
|
|
106
153
|
required?: string[] | undefined;
|
|
107
154
|
};
|
|
108
|
-
entryNode: string;
|
|
109
|
-
exitNode: string;
|
|
110
155
|
}, {
|
|
111
156
|
description: string;
|
|
112
157
|
name: string;
|
|
@@ -128,57 +173,61 @@ export declare const mcpGraphConfigSchema: z.ZodObject<{
|
|
|
128
173
|
}> | undefined;
|
|
129
174
|
required?: string[] | undefined;
|
|
130
175
|
};
|
|
131
|
-
entryNode: string;
|
|
132
|
-
exitNode: string;
|
|
133
176
|
}>, "many">;
|
|
134
177
|
nodes: z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
135
178
|
id: z.ZodString;
|
|
136
179
|
} & {
|
|
137
180
|
type: z.ZodLiteral<"entry">;
|
|
181
|
+
tool: z.ZodString;
|
|
138
182
|
next: z.ZodString;
|
|
139
183
|
}, "strip", z.ZodTypeAny, {
|
|
140
184
|
type: "entry";
|
|
141
185
|
id: string;
|
|
142
186
|
next: string;
|
|
187
|
+
tool: string;
|
|
143
188
|
}, {
|
|
144
189
|
type: "entry";
|
|
145
190
|
id: string;
|
|
146
191
|
next: string;
|
|
192
|
+
tool: string;
|
|
147
193
|
}>, z.ZodObject<{
|
|
148
194
|
id: z.ZodString;
|
|
149
195
|
next: z.ZodOptional<z.ZodString>;
|
|
150
196
|
} & {
|
|
151
197
|
type: z.ZodLiteral<"exit">;
|
|
198
|
+
tool: z.ZodString;
|
|
152
199
|
}, "strip", z.ZodTypeAny, {
|
|
153
200
|
type: "exit";
|
|
154
201
|
id: string;
|
|
202
|
+
tool: string;
|
|
155
203
|
next?: string | undefined;
|
|
156
204
|
}, {
|
|
157
205
|
type: "exit";
|
|
158
206
|
id: string;
|
|
207
|
+
tool: string;
|
|
159
208
|
next?: string | undefined;
|
|
160
209
|
}>, z.ZodObject<{
|
|
161
210
|
id: z.ZodString;
|
|
162
211
|
} & {
|
|
163
|
-
type: z.ZodLiteral<"
|
|
212
|
+
type: z.ZodLiteral<"mcp">;
|
|
164
213
|
server: z.ZodString;
|
|
165
214
|
tool: z.ZodString;
|
|
166
215
|
args: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
167
216
|
next: z.ZodString;
|
|
168
217
|
}, "strip", z.ZodTypeAny, {
|
|
169
|
-
type: "
|
|
218
|
+
type: "mcp";
|
|
219
|
+
args: Record<string, unknown>;
|
|
170
220
|
id: string;
|
|
171
221
|
next: string;
|
|
172
|
-
server: string;
|
|
173
222
|
tool: string;
|
|
174
|
-
|
|
223
|
+
server: string;
|
|
175
224
|
}, {
|
|
176
|
-
type: "
|
|
225
|
+
type: "mcp";
|
|
226
|
+
args: Record<string, unknown>;
|
|
177
227
|
id: string;
|
|
178
228
|
next: string;
|
|
179
|
-
server: string;
|
|
180
229
|
tool: string;
|
|
181
|
-
|
|
230
|
+
server: string;
|
|
182
231
|
}>, z.ZodObject<{
|
|
183
232
|
id: z.ZodString;
|
|
184
233
|
} & {
|
|
@@ -265,24 +314,24 @@ export declare const mcpGraphConfigSchema: z.ZodObject<{
|
|
|
265
314
|
}> | undefined;
|
|
266
315
|
required?: string[] | undefined;
|
|
267
316
|
};
|
|
268
|
-
entryNode: string;
|
|
269
|
-
exitNode: string;
|
|
270
317
|
}[];
|
|
271
318
|
nodes: ({
|
|
272
319
|
type: "entry";
|
|
273
320
|
id: string;
|
|
274
321
|
next: string;
|
|
322
|
+
tool: string;
|
|
275
323
|
} | {
|
|
276
324
|
type: "exit";
|
|
277
325
|
id: string;
|
|
326
|
+
tool: string;
|
|
278
327
|
next?: string | undefined;
|
|
279
328
|
} | {
|
|
280
|
-
type: "
|
|
329
|
+
type: "mcp";
|
|
330
|
+
args: Record<string, unknown>;
|
|
281
331
|
id: string;
|
|
282
332
|
next: string;
|
|
283
|
-
server: string;
|
|
284
333
|
tool: string;
|
|
285
|
-
|
|
334
|
+
server: string;
|
|
286
335
|
} | {
|
|
287
336
|
type: "transform";
|
|
288
337
|
id: string;
|
|
@@ -299,6 +348,23 @@ export declare const mcpGraphConfigSchema: z.ZodObject<{
|
|
|
299
348
|
}[];
|
|
300
349
|
next?: string | undefined;
|
|
301
350
|
})[];
|
|
351
|
+
servers?: Record<string, {
|
|
352
|
+
command: string;
|
|
353
|
+
args: string[];
|
|
354
|
+
type?: "stdio" | undefined;
|
|
355
|
+
cwd?: string | undefined;
|
|
356
|
+
} | {
|
|
357
|
+
type: "sse";
|
|
358
|
+
url: string;
|
|
359
|
+
headers?: Record<string, string> | undefined;
|
|
360
|
+
eventSourceInit?: Record<string, unknown> | undefined;
|
|
361
|
+
requestInit?: Record<string, unknown> | undefined;
|
|
362
|
+
} | {
|
|
363
|
+
type: "streamableHttp";
|
|
364
|
+
url: string;
|
|
365
|
+
headers?: Record<string, string> | undefined;
|
|
366
|
+
requestInit?: Record<string, unknown> | undefined;
|
|
367
|
+
}> | undefined;
|
|
302
368
|
}, {
|
|
303
369
|
version: string;
|
|
304
370
|
server: {
|
|
@@ -327,24 +393,24 @@ export declare const mcpGraphConfigSchema: z.ZodObject<{
|
|
|
327
393
|
}> | undefined;
|
|
328
394
|
required?: string[] | undefined;
|
|
329
395
|
};
|
|
330
|
-
entryNode: string;
|
|
331
|
-
exitNode: string;
|
|
332
396
|
}[];
|
|
333
397
|
nodes: ({
|
|
334
398
|
type: "entry";
|
|
335
399
|
id: string;
|
|
336
400
|
next: string;
|
|
401
|
+
tool: string;
|
|
337
402
|
} | {
|
|
338
403
|
type: "exit";
|
|
339
404
|
id: string;
|
|
405
|
+
tool: string;
|
|
340
406
|
next?: string | undefined;
|
|
341
407
|
} | {
|
|
342
|
-
type: "
|
|
408
|
+
type: "mcp";
|
|
409
|
+
args: Record<string, unknown>;
|
|
343
410
|
id: string;
|
|
344
411
|
next: string;
|
|
345
|
-
server: string;
|
|
346
412
|
tool: string;
|
|
347
|
-
|
|
413
|
+
server: string;
|
|
348
414
|
} | {
|
|
349
415
|
type: "transform";
|
|
350
416
|
id: string;
|
|
@@ -361,6 +427,23 @@ export declare const mcpGraphConfigSchema: z.ZodObject<{
|
|
|
361
427
|
}[];
|
|
362
428
|
next?: string | undefined;
|
|
363
429
|
})[];
|
|
430
|
+
servers?: Record<string, {
|
|
431
|
+
command: string;
|
|
432
|
+
args: string[];
|
|
433
|
+
type?: "stdio" | undefined;
|
|
434
|
+
cwd?: string | undefined;
|
|
435
|
+
} | {
|
|
436
|
+
type: "sse";
|
|
437
|
+
url: string;
|
|
438
|
+
headers?: Record<string, string> | undefined;
|
|
439
|
+
eventSourceInit?: Record<string, unknown> | undefined;
|
|
440
|
+
requestInit?: Record<string, unknown> | undefined;
|
|
441
|
+
} | {
|
|
442
|
+
type: "streamableHttp";
|
|
443
|
+
url: string;
|
|
444
|
+
headers?: Record<string, string> | undefined;
|
|
445
|
+
requestInit?: Record<string, unknown> | undefined;
|
|
446
|
+
}> | undefined;
|
|
364
447
|
}>;
|
|
365
448
|
export type McpGraphConfigSchema = z.infer<typeof mcpGraphConfigSchema>;
|
|
366
449
|
//# sourceMappingURL=schema.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/config/schema.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/config/schema.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AA8GxB,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAM/B,CAAC;AAEH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC"}
|
package/dist/config/schema.js
CHANGED
|
@@ -17,6 +17,34 @@ const serverMetadataSchema = z.object({
|
|
|
17
17
|
version: z.string(),
|
|
18
18
|
description: z.string(),
|
|
19
19
|
});
|
|
20
|
+
const stdioServerConfigSchema = z.object({
|
|
21
|
+
type: z.literal("stdio").optional(),
|
|
22
|
+
command: z.string(),
|
|
23
|
+
args: z.array(z.string()),
|
|
24
|
+
cwd: z.string().optional(),
|
|
25
|
+
});
|
|
26
|
+
const sseServerConfigSchema = z.object({
|
|
27
|
+
type: z.literal("sse"),
|
|
28
|
+
url: z.string(),
|
|
29
|
+
headers: z.record(z.string()).optional(),
|
|
30
|
+
eventSourceInit: z.record(z.unknown()).optional(),
|
|
31
|
+
requestInit: z.record(z.unknown()).optional(),
|
|
32
|
+
});
|
|
33
|
+
const streamableHttpServerConfigSchema = z.object({
|
|
34
|
+
type: z.literal("streamableHttp"),
|
|
35
|
+
url: z.string(),
|
|
36
|
+
headers: z.record(z.string()).optional(),
|
|
37
|
+
requestInit: z.record(z.unknown()).optional(),
|
|
38
|
+
});
|
|
39
|
+
// Server config can be stdio (with or without type), sse, or streamableHttp
|
|
40
|
+
const serverConfigSchema = z.union([
|
|
41
|
+
// Stdio config (type optional, defaults to stdio)
|
|
42
|
+
stdioServerConfigSchema,
|
|
43
|
+
// SSE config (type required)
|
|
44
|
+
sseServerConfigSchema,
|
|
45
|
+
// Streamable HTTP config (type required)
|
|
46
|
+
streamableHttpServerConfigSchema,
|
|
47
|
+
]);
|
|
20
48
|
const baseNodeSchema = z.object({
|
|
21
49
|
id: z.string(),
|
|
22
50
|
type: z.string(),
|
|
@@ -24,13 +52,15 @@ const baseNodeSchema = z.object({
|
|
|
24
52
|
});
|
|
25
53
|
const entryNodeSchema = baseNodeSchema.extend({
|
|
26
54
|
type: z.literal("entry"),
|
|
55
|
+
tool: z.string(),
|
|
27
56
|
next: z.string(),
|
|
28
57
|
});
|
|
29
58
|
const exitNodeSchema = baseNodeSchema.extend({
|
|
30
59
|
type: z.literal("exit"),
|
|
60
|
+
tool: z.string(),
|
|
31
61
|
});
|
|
32
|
-
const
|
|
33
|
-
type: z.literal("
|
|
62
|
+
const mcpNodeSchema = baseNodeSchema.extend({
|
|
63
|
+
type: z.literal("mcp"),
|
|
34
64
|
server: z.string(),
|
|
35
65
|
tool: z.string(),
|
|
36
66
|
args: z.record(z.unknown()),
|
|
@@ -54,7 +84,7 @@ const switchNodeSchema = baseNodeSchema.extend({
|
|
|
54
84
|
const nodeSchema = z.discriminatedUnion("type", [
|
|
55
85
|
entryNodeSchema,
|
|
56
86
|
exitNodeSchema,
|
|
57
|
-
|
|
87
|
+
mcpNodeSchema,
|
|
58
88
|
transformNodeSchema,
|
|
59
89
|
switchNodeSchema,
|
|
60
90
|
]);
|
|
@@ -63,12 +93,11 @@ const toolDefinitionSchema = z.object({
|
|
|
63
93
|
description: z.string(),
|
|
64
94
|
inputSchema: jsonSchemaSchema,
|
|
65
95
|
outputSchema: jsonSchemaSchema,
|
|
66
|
-
entryNode: z.string(),
|
|
67
|
-
exitNode: z.string(),
|
|
68
96
|
});
|
|
69
97
|
export const mcpGraphConfigSchema = z.object({
|
|
70
98
|
version: z.string(),
|
|
71
99
|
server: serverMetadataSchema,
|
|
100
|
+
servers: z.record(serverConfigSchema).optional(),
|
|
72
101
|
tools: z.array(toolDefinitionSchema),
|
|
73
102
|
nodes: z.array(nodeSchema),
|
|
74
103
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.js","sourceRoot":"","sources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EH,MAAM,UAAU,GAAG,CAAC,CAAC,kBAAkB,CAAC,MAAM,EAAE;IAC9C,eAAe;IACf,cAAc;IACd,aAAa;IACb,mBAAmB;IACnB,gBAAgB;CACjB,CAAC,CAAC;AAEH,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC;IACpC,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE;IACvB,WAAW,EAAE,gBAAgB;IAC7B,YAAY,EAAE,gBAAgB;CAC/B,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3C,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;IACnB,MAAM,EAAE,oBAAoB;IAC5B,OAAO,EAAE,CAAC,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAAC,QAAQ,EAAE;IAChD,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,oBAAoB,CAAC;IACpC,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC;CAC3B,CAAC,CAAC"}
|
|
@@ -8,6 +8,7 @@ export declare class GraphExecutor {
|
|
|
8
8
|
private graph;
|
|
9
9
|
private clientManager;
|
|
10
10
|
constructor(config: McpGraphConfig, clientManager: McpClientManager);
|
|
11
|
+
private getServerConfig;
|
|
11
12
|
executeTool(toolName: string, toolInput: Record<string, unknown>): Promise<unknown>;
|
|
12
13
|
}
|
|
13
14
|
//# sourceMappingURL=executor.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"executor.d.ts","sourceRoot":"","sources":["../../src/execution/executor.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,cAAc,
|
|
1
|
+
{"version":3,"file":"executor.d.ts","sourceRoot":"","sources":["../../src/execution/executor.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAgC,MAAM,oBAAoB,CAAC;AAQvF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAGjE,qBAAa,aAAa;IACxB,OAAO,CAAC,MAAM,CAAiB;IAC/B,OAAO,CAAC,KAAK,CAAQ;IACrB,OAAO,CAAC,aAAa,CAAmB;gBAE5B,MAAM,EAAE,cAAc,EAAE,aAAa,EAAE,gBAAgB;IAMnE,OAAO,CAAC,eAAe;IAOjB,WAAW,CACf,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GACjC,OAAO,CAAC,OAAO,CAAC;CA2EpB"}
|