@vinkius-core/mcp-fusion-aws 1.0.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.
@@ -0,0 +1,157 @@
1
+ import type { LambdaAdapter, SfnAdapter } from './AwsClient.js';
2
+ /** Discovered Lambda function configuration */
3
+ export interface AwsLambdaConfig {
4
+ /** Lambda function name */
5
+ readonly functionName: string;
6
+ /** Full ARN */
7
+ readonly functionArn: string;
8
+ /** Lambda description (≤256 chars — used for LLM semantics only) */
9
+ readonly description: string;
10
+ /** Runtime (e.g. 'nodejs20.x') */
11
+ readonly runtime: string;
12
+ /** MCP group name (from `mcp:group` tag). Undefined = standalone tool */
13
+ readonly group?: string | undefined;
14
+ /** MCP action name (from `mcp:action` tag). Default: 'execute' */
15
+ readonly actionName: string;
16
+ /** Read-only hint (from `mcp:readOnly` tag) */
17
+ readonly readOnly: boolean;
18
+ /** Destructive hint (from `mcp:destructive` tag) */
19
+ readonly destructive: boolean;
20
+ /** All AWS tags on the function */
21
+ readonly tags: Readonly<Record<string, string>>;
22
+ }
23
+ /** Discovered Step Functions state machine configuration */
24
+ export interface AwsStepFunctionConfig {
25
+ /** State machine name */
26
+ readonly name: string;
27
+ /** Full ARN */
28
+ readonly stateMachineArn: string;
29
+ /** State machine description */
30
+ readonly description: string;
31
+ /** Execution type: EXPRESS → sync, STANDARD → fire-and-forget with LRO pattern */
32
+ readonly executionType: 'express' | 'standard';
33
+ /** MCP group name (from `mcp:group` tag). Undefined = standalone tool */
34
+ readonly group?: string | undefined;
35
+ /** MCP action name (from `mcp:action` tag). Default: 'execute' */
36
+ readonly actionName: string;
37
+ /** Read-only hint */
38
+ readonly readOnly: boolean;
39
+ /** Destructive hint */
40
+ readonly destructive: boolean;
41
+ /** All AWS tags */
42
+ readonly tags: Readonly<Record<string, string>>;
43
+ }
44
+ /** Lambda invocation result from AwsClient */
45
+ export interface LambdaInvokeResult {
46
+ /** HTTP status code */
47
+ readonly statusCode: number;
48
+ /** Decoded response payload (parsed JSON) */
49
+ readonly payload: unknown;
50
+ /** Function error type (if function failed) */
51
+ readonly functionError?: string | undefined;
52
+ /** Execution log tail (if requested) */
53
+ readonly logResult?: string | undefined;
54
+ }
55
+ /** Step Functions execution result (Express — synchronous) */
56
+ export interface SfnSyncResult {
57
+ /** Execution status */
58
+ readonly status: 'SUCCEEDED' | 'FAILED' | 'TIMED_OUT';
59
+ /** Parsed output */
60
+ readonly output: unknown;
61
+ /** Error info (if failed) */
62
+ readonly error?: string | undefined;
63
+ /** Cause (if failed) */
64
+ readonly cause?: string | undefined;
65
+ /** Execution ARN */
66
+ readonly executionArn: string;
67
+ }
68
+ /** Step Functions execution result (Standard — async fire-and-forget) */
69
+ export interface SfnAsyncResult {
70
+ /** Execution ARN (use to poll for completion) */
71
+ readonly executionArn: string;
72
+ /** Start timestamp (ISO 8601) */
73
+ readonly startDate: string;
74
+ }
75
+ /**
76
+ * Configuration for the AWS connector.
77
+ *
78
+ * Auth uses IoC: inject pre-configured `LambdaAdapter` / `SfnAdapter`
79
+ * created via `createLambdaAdapter()` / `createSfnAdapter()`.
80
+ *
81
+ * ```typescript
82
+ * import { LambdaClient } from '@aws-sdk/client-lambda';
83
+ * import { createLambdaAdapter, createAwsConnector } from '@vinkius-core/mcp-fusion-aws';
84
+ *
85
+ * const aws = await createAwsConnector({
86
+ * lambdaClient: await createLambdaAdapter(new LambdaClient({ region: 'us-east-1' })),
87
+ * });
88
+ * ```
89
+ */
90
+ export interface AwsConnectorConfig {
91
+ /**
92
+ * Lambda adapter created via `createLambdaAdapter()`.
93
+ * Required when `enableLambda` is true (default).
94
+ */
95
+ readonly lambdaClient?: LambdaAdapter | undefined;
96
+ /**
97
+ * Step Functions adapter created via `createSfnAdapter()`.
98
+ * Required when `enableStepFunctions` is true.
99
+ */
100
+ readonly sfnClient?: SfnAdapter | undefined;
101
+ /**
102
+ * Tag filter for discovery. Only resources matching ALL tags are included.
103
+ * Default: `{ 'mcp:expose': 'true' }`
104
+ */
105
+ readonly tagFilter?: Readonly<Record<string, string>> | undefined;
106
+ /** Enable Lambda function discovery (default: true) */
107
+ readonly enableLambda?: boolean | undefined;
108
+ /** Enable Step Functions discovery (default: false) */
109
+ readonly enableStepFunctions?: boolean | undefined;
110
+ /**
111
+ * Polling interval in ms for live state sync (default: off).
112
+ * Set to enable auto-refresh of the tool list.
113
+ */
114
+ readonly pollInterval?: number | undefined;
115
+ /**
116
+ * Called when the tool list changes after a poll cycle.
117
+ * Use this to emit `notifications/tools/list_changed` on your MCP server.
118
+ */
119
+ readonly onChange?: (() => void) | undefined;
120
+ /**
121
+ * Called when a polling cycle encounters an error.
122
+ * Default: errors are silently ignored (next cycle retries).
123
+ */
124
+ readonly onError?: ((error: unknown) => void) | undefined;
125
+ }
126
+ /** Configuration for manually defining an AWS Lambda/SFN as a tool */
127
+ export interface AwsToolConfig {
128
+ /** Lambda function ARN or Step Function ARN */
129
+ readonly arn: string;
130
+ /** Tool description for the LLM */
131
+ readonly description?: string | undefined;
132
+ /** MCP annotations */
133
+ readonly annotations?: {
134
+ readonly readOnlyHint?: boolean | undefined;
135
+ readonly destructiveHint?: boolean | undefined;
136
+ } | undefined;
137
+ }
138
+ /** AWS tag keys used by the connector */
139
+ export declare const MCP_TAGS: {
140
+ /** Opt-in tag — must be 'true' for a resource to be discovered */
141
+ readonly EXPOSE: "mcp:expose";
142
+ /** Groups multiple Lambdas/SFNs into a single MCP tool */
143
+ readonly GROUP: "mcp:group";
144
+ /** Action name within a group (default: 'execute') */
145
+ readonly ACTION: "mcp:action";
146
+ /** Marks the action as read-only */
147
+ readonly READ_ONLY: "mcp:readOnly";
148
+ /** Marks the action as destructive */
149
+ readonly DESTRUCTIVE: "mcp:destructive";
150
+ /** Step Function execution type: 'express' or 'standard' */
151
+ readonly SFN_TYPE: "mcp:sfn-type";
152
+ };
153
+ /** Default tag filter for discovery */
154
+ export declare const DEFAULT_TAG_FILTER: Readonly<Record<string, string>>;
155
+ /** Default action name for standalone (ungrouped) resources */
156
+ export declare const DEFAULT_ACTION_NAME = "execute";
157
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAIhE,+CAA+C;AAC/C,MAAM,WAAW,eAAe;IAC5B,2BAA2B;IAC3B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,eAAe;IACf,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,oEAAoE;IACpE,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,kCAAkC;IAClC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,yEAAyE;IACzE,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACpC,kEAAkE;IAClE,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,+CAA+C;IAC/C,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC3B,oDAAoD;IACpD,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC;IAC9B,mCAAmC;IACnC,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;CACnD;AAED,4DAA4D;AAC5D,MAAM,WAAW,qBAAqB;IAClC,yBAAyB;IACzB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,eAAe;IACf,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IACjC,gCAAgC;IAChC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,kFAAkF;IAClF,QAAQ,CAAC,aAAa,EAAE,SAAS,GAAG,UAAU,CAAC;IAC/C,yEAAyE;IACzE,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC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;;CAEtD,CAAC;AAEX,uCAAuC;AACvC,eAAO,MAAM,kBAAkB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAE/D,CAAC;AAEF,+DAA+D;AAC/D,eAAO,MAAM,mBAAmB,YAAY,CAAC"}
package/dist/types.js ADDED
@@ -0,0 +1,26 @@
1
+ // ============================================================================
2
+ // AWS Connector Types — Internal type definitions for the AWS connector
3
+ // ============================================================================
4
+ // ── Tag Constants ────────────────────────────────────────
5
+ /** AWS tag keys used by the connector */
6
+ export const MCP_TAGS = {
7
+ /** Opt-in tag — must be 'true' for a resource to be discovered */
8
+ EXPOSE: 'mcp:expose',
9
+ /** Groups multiple Lambdas/SFNs into a single MCP tool */
10
+ GROUP: 'mcp:group',
11
+ /** Action name within a group (default: 'execute') */
12
+ ACTION: 'mcp:action',
13
+ /** Marks the action as read-only */
14
+ READ_ONLY: 'mcp:readOnly',
15
+ /** Marks the action as destructive */
16
+ DESTRUCTIVE: 'mcp:destructive',
17
+ /** Step Function execution type: 'express' or 'standard' */
18
+ SFN_TYPE: 'mcp:sfn-type',
19
+ };
20
+ /** Default tag filter for discovery */
21
+ export const DEFAULT_TAG_FILTER = {
22
+ [MCP_TAGS.EXPOSE]: 'true',
23
+ };
24
+ /** Default action name for standalone (ungrouped) resources */
25
+ export const DEFAULT_ACTION_NAME = 'execute';
26
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,wEAAwE;AACxE,+EAA+E;AAkK/E,4DAA4D;AAE5D,yCAAyC;AACzC,MAAM,CAAC,MAAM,QAAQ,GAAG;IACpB,kEAAkE;IAClE,MAAM,EAAE,YAAY;IACpB,0DAA0D;IAC1D,KAAK,EAAE,WAAW;IAClB,sDAAsD;IACtD,MAAM,EAAE,YAAY;IACpB,oCAAoC;IACpC,SAAS,EAAE,cAAc;IACzB,sCAAsC;IACtC,WAAW,EAAE,iBAAiB;IAC9B,4DAA4D;IAC5D,QAAQ,EAAE,cAAc;CAClB,CAAC;AAEX,uCAAuC;AACvC,MAAM,CAAC,MAAM,kBAAkB,GAAqC;IAChE,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM;CAC5B,CAAC;AAEF,+DAA+D;AAC/D,MAAM,CAAC,MAAM,mBAAmB,GAAG,SAAS,CAAC"}
package/package.json ADDED
@@ -0,0 +1,69 @@
1
+ {
2
+ "name": "@vinkius-core/mcp-fusion-aws",
3
+ "version": "1.0.0",
4
+ "description": "AWS Lambda & Step Functions connector for MCP Fusion. Auto-discovers tagged resources and produces GroupedToolBuilders — so AI agents can invoke your cloud functions natively.",
5
+ "type": "module",
6
+ "main": "dist/index.js",
7
+ "types": "dist/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "import": "./dist/index.js",
11
+ "types": "./dist/index.d.ts"
12
+ }
13
+ },
14
+ "scripts": {
15
+ "build": "tsc",
16
+ "test": "vitest run",
17
+ "prepublishOnly": "npm run build"
18
+ },
19
+ "keywords": [
20
+ "mcp",
21
+ "aws",
22
+ "lambda",
23
+ "step-functions",
24
+ "mcp-fusion",
25
+ "serverless",
26
+ "ai",
27
+ "llm",
28
+ "connector"
29
+ ],
30
+ "author": "Vinkius Labs",
31
+ "repository": {
32
+ "type": "git",
33
+ "url": "git+https://github.com/vinkius-labs/mcp-fusion.git",
34
+ "directory": "packages/aws"
35
+ },
36
+ "bugs": {
37
+ "url": "https://github.com/vinkius-labs/mcp-fusion/issues"
38
+ },
39
+ "homepage": "https://mcp-fusion.vinkius.com/",
40
+ "files": [
41
+ "dist",
42
+ "README.md"
43
+ ],
44
+ "engines": {
45
+ "node": ">=18.0.0"
46
+ },
47
+ "publishConfig": {
48
+ "access": "public"
49
+ },
50
+ "peerDependencies": {
51
+ "@aws-sdk/client-lambda": "^3.0.0",
52
+ "@aws-sdk/client-sfn": "^3.0.0",
53
+ "@vinkius-core/mcp-fusion": "^2.0.0"
54
+ },
55
+ "peerDependenciesMeta": {
56
+ "@aws-sdk/client-lambda": {
57
+ "optional": true
58
+ },
59
+ "@aws-sdk/client-sfn": {
60
+ "optional": true
61
+ }
62
+ },
63
+ "devDependencies": {
64
+ "@aws-sdk/client-lambda": "^3.0.0",
65
+ "@aws-sdk/client-sfn": "^3.0.0",
66
+ "@types/node": "^25.3.0"
67
+ },
68
+ "license": "Apache-2.0"
69
+ }