awslabs.stepfunctions-tool-mcp-server 0.1.4__py3-none-any.whl → 0.1.6__py3-none-any.whl
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.
- awslabs/stepfunctions_tool_mcp_server/aws_helper.py +57 -0
- awslabs/stepfunctions_tool_mcp_server/server.py +8 -9
- {awslabs_stepfunctions_tool_mcp_server-0.1.4.dist-info → awslabs_stepfunctions_tool_mcp_server-0.1.6.dist-info}/METADATA +1 -1
- awslabs_stepfunctions_tool_mcp_server-0.1.6.dist-info/RECORD +10 -0
- awslabs_stepfunctions_tool_mcp_server-0.1.4.dist-info/RECORD +0 -9
- {awslabs_stepfunctions_tool_mcp_server-0.1.4.dist-info → awslabs_stepfunctions_tool_mcp_server-0.1.6.dist-info}/WHEEL +0 -0
- {awslabs_stepfunctions_tool_mcp_server-0.1.4.dist-info → awslabs_stepfunctions_tool_mcp_server-0.1.6.dist-info}/entry_points.txt +0 -0
- {awslabs_stepfunctions_tool_mcp_server-0.1.4.dist-info → awslabs_stepfunctions_tool_mcp_server-0.1.6.dist-info}/licenses/LICENSE +0 -0
- {awslabs_stepfunctions_tool_mcp_server-0.1.4.dist-info → awslabs_stepfunctions_tool_mcp_server-0.1.6.dist-info}/licenses/NOTICE +0 -0
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"""AWS Helper for Step Functions Tool MCP Server."""
|
|
2
|
+
|
|
3
|
+
import boto3
|
|
4
|
+
import botocore.config
|
|
5
|
+
import os
|
|
6
|
+
from typing import Any, Optional
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class AwsHelper:
|
|
10
|
+
"""Helper class for AWS operations."""
|
|
11
|
+
|
|
12
|
+
@staticmethod
|
|
13
|
+
def get_aws_region() -> Optional[str]:
|
|
14
|
+
"""Get AWS region from environment variable.
|
|
15
|
+
|
|
16
|
+
Returns:
|
|
17
|
+
str: AWS region if set in environment, None otherwise
|
|
18
|
+
"""
|
|
19
|
+
return os.environ.get('AWS_REGION', 'us-east-1')
|
|
20
|
+
|
|
21
|
+
@staticmethod
|
|
22
|
+
def get_aws_profile() -> Optional[str]:
|
|
23
|
+
"""Get AWS profile from environment variable.
|
|
24
|
+
|
|
25
|
+
Returns:
|
|
26
|
+
str: AWS profile if set in environment, None otherwise
|
|
27
|
+
"""
|
|
28
|
+
return os.environ.get('AWS_PROFILE')
|
|
29
|
+
|
|
30
|
+
@staticmethod
|
|
31
|
+
def create_boto3_client(service_name: str, region_name: Optional[str] = None) -> Any:
|
|
32
|
+
"""Create a boto3 client with the appropriate configuration.
|
|
33
|
+
|
|
34
|
+
Args:
|
|
35
|
+
service_name: AWS service name (e.g., 'stepfunctions', 'schemas')
|
|
36
|
+
region_name: Optional region override
|
|
37
|
+
|
|
38
|
+
Returns:
|
|
39
|
+
boto3.client: Configured boto3 client
|
|
40
|
+
"""
|
|
41
|
+
from awslabs.stepfunctions_tool_mcp_server.server import __version__
|
|
42
|
+
|
|
43
|
+
# Create config with user agent
|
|
44
|
+
config = botocore.config.Config(
|
|
45
|
+
user_agent_extra=f'awslabs/mcp/aws-stepfunctions-tool-mcp-server/{__version__}'
|
|
46
|
+
)
|
|
47
|
+
|
|
48
|
+
# Get profile and region
|
|
49
|
+
profile = AwsHelper.get_aws_profile()
|
|
50
|
+
region = region_name or AwsHelper.get_aws_region()
|
|
51
|
+
|
|
52
|
+
# Create client with or without profile
|
|
53
|
+
if profile:
|
|
54
|
+
session = boto3.Session(profile_name=profile)
|
|
55
|
+
return session.client(service_name, region_name=region, config=config)
|
|
56
|
+
else:
|
|
57
|
+
return boto3.client(service_name, region_name=region, config=config)
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
"""awslabs Step Functions Tool MCP Server implementation."""
|
|
2
2
|
|
|
3
|
+
# This version should match the version in pyproject.toml
|
|
4
|
+
__version__ = '0.1.5'
|
|
5
|
+
|
|
3
6
|
import asyncio
|
|
4
|
-
import boto3
|
|
5
7
|
import json
|
|
6
8
|
import logging
|
|
7
9
|
import os
|
|
8
10
|
import re
|
|
11
|
+
from awslabs.stepfunctions_tool_mcp_server.aws_helper import AwsHelper
|
|
9
12
|
from mcp.server.fastmcp import Context, FastMCP
|
|
10
13
|
from typing import Optional
|
|
11
14
|
|
|
@@ -14,11 +17,8 @@ from typing import Optional
|
|
|
14
17
|
logging.basicConfig(level=logging.INFO)
|
|
15
18
|
logger = logging.getLogger(__name__)
|
|
16
19
|
|
|
17
|
-
|
|
18
|
-
logger.info(f'
|
|
19
|
-
|
|
20
|
-
AWS_REGION = os.environ.get('AWS_REGION', 'us-east-1')
|
|
21
|
-
logger.info(f'AWS_REGION: {AWS_REGION}')
|
|
20
|
+
logger.info(f'AWS_PROFILE: {AwsHelper.get_aws_profile()}')
|
|
21
|
+
logger.info(f'AWS_REGION: {AwsHelper.get_aws_region()}')
|
|
22
22
|
|
|
23
23
|
STATE_MACHINE_PREFIX = os.environ.get('STATE_MACHINE_PREFIX', '')
|
|
24
24
|
logger.info(f'STATE_MACHINE_PREFIX: {STATE_MACHINE_PREFIX}')
|
|
@@ -40,9 +40,8 @@ STATE_MACHINE_INPUT_SCHEMA_ARN_TAG_KEY = os.environ.get('STATE_MACHINE_INPUT_SCH
|
|
|
40
40
|
logger.info(f'STATE_MACHINE_INPUT_SCHEMA_ARN_TAG_KEY: {STATE_MACHINE_INPUT_SCHEMA_ARN_TAG_KEY}')
|
|
41
41
|
|
|
42
42
|
# Initialize AWS clients
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
schemas_client = session.client('schemas')
|
|
43
|
+
sfn_client = AwsHelper.create_boto3_client('stepfunctions')
|
|
44
|
+
schemas_client = AwsHelper.create_boto3_client('schemas')
|
|
46
45
|
|
|
47
46
|
mcp = FastMCP(
|
|
48
47
|
'awslabs.stepfunctions-tool-mcp-server',
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: awslabs.stepfunctions-tool-mcp-server
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.6
|
|
4
4
|
Summary: An AWS Labs Model Context Protocol (MCP) server for AWS Step Functions
|
|
5
5
|
Project-URL: Homepage, https://awslabs.github.io/mcp/
|
|
6
6
|
Project-URL: Documentation, https://awslabs.github.io/mcp/servers/stepfunctions-tool-mcp-server/
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
awslabs/__init__.py,sha256=4zfFn3N0BkvQmMTAIvV_QAbKp6GWzrwaUN17YeRoChM,115
|
|
2
|
+
awslabs/stepfunctions_tool_mcp_server/__init__.py,sha256=n0IrKZR35oICjSeI7vz7nq78OleFf8Rvo09My7d7SJY,67
|
|
3
|
+
awslabs/stepfunctions_tool_mcp_server/aws_helper.py,sha256=hVRCBeF49LMCpcO-RSfiIh5-AR9vBa8t1TuY5g6pz7I,1828
|
|
4
|
+
awslabs/stepfunctions_tool_mcp_server/server.py,sha256=Dn6fH80ChAY7AKFO9lJPAlHLGVdnnH7flogTtjdiRuU,15490
|
|
5
|
+
awslabs_stepfunctions_tool_mcp_server-0.1.6.dist-info/METADATA,sha256=ijHCCGyVbbseWvziFDyNTtQa6cL_KiUu19WJobm8veQ,9698
|
|
6
|
+
awslabs_stepfunctions_tool_mcp_server-0.1.6.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
7
|
+
awslabs_stepfunctions_tool_mcp_server-0.1.6.dist-info/entry_points.txt,sha256=PVQOhNJ_2mgqvdXcqv2KS8Wa2-vZkjatVw0upZga7RU,108
|
|
8
|
+
awslabs_stepfunctions_tool_mcp_server-0.1.6.dist-info/licenses/LICENSE,sha256=CeipvOyAZxBGUsFoaFqwkx54aPnIKEtm9a5u2uXxEws,10142
|
|
9
|
+
awslabs_stepfunctions_tool_mcp_server-0.1.6.dist-info/licenses/NOTICE,sha256=9GfleTZWBLGtrNSl42TlT_fT7wPBajAx1OQdlIaXUkY,105
|
|
10
|
+
awslabs_stepfunctions_tool_mcp_server-0.1.6.dist-info/RECORD,,
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
awslabs/__init__.py,sha256=4zfFn3N0BkvQmMTAIvV_QAbKp6GWzrwaUN17YeRoChM,115
|
|
2
|
-
awslabs/stepfunctions_tool_mcp_server/__init__.py,sha256=n0IrKZR35oICjSeI7vz7nq78OleFf8Rvo09My7d7SJY,67
|
|
3
|
-
awslabs/stepfunctions_tool_mcp_server/server.py,sha256=B0yqqtbRS-sKEFaGEUKtTLQ_c2zrCvVDfC5Ry1wc_f8,15474
|
|
4
|
-
awslabs_stepfunctions_tool_mcp_server-0.1.4.dist-info/METADATA,sha256=tvSFFB0f8U23p7W9tbNlt4kq553TOozKuHkIOiaCMOA,9698
|
|
5
|
-
awslabs_stepfunctions_tool_mcp_server-0.1.4.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
6
|
-
awslabs_stepfunctions_tool_mcp_server-0.1.4.dist-info/entry_points.txt,sha256=PVQOhNJ_2mgqvdXcqv2KS8Wa2-vZkjatVw0upZga7RU,108
|
|
7
|
-
awslabs_stepfunctions_tool_mcp_server-0.1.4.dist-info/licenses/LICENSE,sha256=CeipvOyAZxBGUsFoaFqwkx54aPnIKEtm9a5u2uXxEws,10142
|
|
8
|
-
awslabs_stepfunctions_tool_mcp_server-0.1.4.dist-info/licenses/NOTICE,sha256=9GfleTZWBLGtrNSl42TlT_fT7wPBajAx1OQdlIaXUkY,105
|
|
9
|
-
awslabs_stepfunctions_tool_mcp_server-0.1.4.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|