awslabs.frontend-mcp-server 0.0.1__tar.gz → 1.0.1__tar.gz

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.
Files changed (24) hide show
  1. {awslabs_frontend_mcp_server-0.0.1 → awslabs_frontend_mcp_server-1.0.1}/PKG-INFO +1 -1
  2. awslabs_frontend_mcp_server-1.0.1/awslabs/__init__.py +16 -0
  3. awslabs_frontend_mcp_server-1.0.1/awslabs/frontend_mcp_server/__init__.py +17 -0
  4. {awslabs_frontend_mcp_server-0.0.1 → awslabs_frontend_mcp_server-1.0.1}/awslabs/frontend_mcp_server/server.py +10 -21
  5. awslabs_frontend_mcp_server-1.0.1/awslabs/frontend_mcp_server/utils/__init__.py +15 -0
  6. {awslabs_frontend_mcp_server-0.0.1 → awslabs_frontend_mcp_server-1.0.1}/awslabs/frontend_mcp_server/utils/file_utils.py +14 -0
  7. {awslabs_frontend_mcp_server-0.0.1 → awslabs_frontend_mcp_server-1.0.1}/pyproject.toml +1 -1
  8. {awslabs_frontend_mcp_server-0.0.1 → awslabs_frontend_mcp_server-1.0.1}/tests/test_file_utils.py +9 -6
  9. {awslabs_frontend_mcp_server-0.0.1 → awslabs_frontend_mcp_server-1.0.1}/tests/test_init.py +9 -6
  10. {awslabs_frontend_mcp_server-0.0.1 → awslabs_frontend_mcp_server-1.0.1}/tests/test_main.py +9 -23
  11. {awslabs_frontend_mcp_server-0.0.1 → awslabs_frontend_mcp_server-1.0.1}/tests/test_server.py +9 -6
  12. awslabs_frontend_mcp_server-0.0.1/awslabs/__init__.py +0 -13
  13. awslabs_frontend_mcp_server-0.0.1/awslabs/frontend_mcp_server/__init__.py +0 -14
  14. awslabs_frontend_mcp_server-0.0.1/awslabs/frontend_mcp_server/utils/__init__.py +0 -1
  15. {awslabs_frontend_mcp_server-0.0.1 → awslabs_frontend_mcp_server-1.0.1}/.gitignore +0 -0
  16. {awslabs_frontend_mcp_server-0.0.1 → awslabs_frontend_mcp_server-1.0.1}/.pre-commit-config.yaml +0 -0
  17. {awslabs_frontend_mcp_server-0.0.1 → awslabs_frontend_mcp_server-1.0.1}/.python-version +0 -0
  18. {awslabs_frontend_mcp_server-0.0.1 → awslabs_frontend_mcp_server-1.0.1}/CHANGELOG.md +0 -0
  19. {awslabs_frontend_mcp_server-0.0.1 → awslabs_frontend_mcp_server-1.0.1}/LICENSE +0 -0
  20. {awslabs_frontend_mcp_server-0.0.1 → awslabs_frontend_mcp_server-1.0.1}/NOTICE +0 -0
  21. {awslabs_frontend_mcp_server-0.0.1 → awslabs_frontend_mcp_server-1.0.1}/README.md +0 -0
  22. {awslabs_frontend_mcp_server-0.0.1 → awslabs_frontend_mcp_server-1.0.1}/awslabs/frontend_mcp_server/static/react/essential-knowledge.md +0 -0
  23. {awslabs_frontend_mcp_server-0.0.1 → awslabs_frontend_mcp_server-1.0.1}/awslabs/frontend_mcp_server/static/react/troubleshooting.md +0 -0
  24. {awslabs_frontend_mcp_server-0.0.1 → awslabs_frontend_mcp_server-1.0.1}/uv.lock +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: awslabs.frontend-mcp-server
3
- Version: 0.0.1
3
+ Version: 1.0.1
4
4
  Summary: An AWS Labs Model Context Protocol (MCP) server for frontend
5
5
  Project-URL: homepage, https://awslabs.github.io/mcp/
6
6
  Project-URL: docs, https://awslabs.github.io/mcp/servers/frontend-mcp-server/
@@ -0,0 +1,16 @@
1
+ # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ # This file is part of the awslabs namespace.
16
+ # It is intentionally minimal to support PEP 420 namespace packages.
@@ -0,0 +1,17 @@
1
+ # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ """awslabs.frontend-mcp-server"""
16
+
17
+ __version__ = '0.0.0'
@@ -1,17 +1,19 @@
1
1
  # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
2
  #
3
- # Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance
4
- # with the License. A copy of the License is located at
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
5
6
  #
6
- # http://www.apache.org/licenses/LICENSE-2.0
7
+ # http://www.apache.org/licenses/LICENSE-2.0
7
8
  #
8
- # or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES
9
- # OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions
10
- # and limitations under the License.
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
11
14
 
12
15
  """awslabs frontend MCP Server implementation."""
13
16
 
14
- import argparse
15
17
  from awslabs.frontend_mcp_server.utils.file_utils import load_markdown_file
16
18
  from loguru import logger
17
19
  from mcp.server.fastmcp import FastMCP
@@ -62,13 +64,7 @@ async def get_react_docs_by_topic(
62
64
 
63
65
  def main():
64
66
  """Run the MCP server with CLI argument support."""
65
- parser = argparse.ArgumentParser(
66
- description='An AWS Labs Model Context Protocol (MCP) server for frontend'
67
- )
68
- parser.add_argument('--sse', action='store_true', help='Use SSE transport')
69
- parser.add_argument('--port', type=int, default=8888, help='Port to run the server on')
70
-
71
- args = parser.parse_args()
67
+ mcp.run()
72
68
 
73
69
  logger.trace('A trace message.')
74
70
  logger.debug('A debug message.')
@@ -78,13 +74,6 @@ def main():
78
74
  logger.error('An error message.')
79
75
  logger.critical('A critical message.')
80
76
 
81
- # Run server with appropriate transport
82
- if args.sse:
83
- mcp.settings.port = args.port
84
- mcp.run(transport='sse')
85
- else:
86
- mcp.run()
87
-
88
77
 
89
78
  if __name__ == '__main__':
90
79
  main()
@@ -0,0 +1,15 @@
1
+ # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ """Utility functions for the frontend MCP server."""
@@ -1,3 +1,17 @@
1
+ # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
1
15
  """File utility functions for the frontend MCP server."""
2
16
 
3
17
  from pathlib import Path
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "awslabs.frontend-mcp-server"
3
- version = "0.0.1"
3
+ version = "1.0.1"
4
4
  description = "An AWS Labs Model Context Protocol (MCP) server for frontend"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.10"
@@ -1,13 +1,16 @@
1
1
  # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
2
  #
3
- # Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance
4
- # with the License. A copy of the License is located at
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
5
6
  #
6
- # http://www.apache.org/licenses/LICENSE-2.0
7
+ # http://www.apache.org/licenses/LICENSE-2.0
7
8
  #
8
- # or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES
9
- # OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions
10
- # and limitations under the License.
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
11
14
  """Tests for file_utils module."""
12
15
 
13
16
  from awslabs.frontend_mcp_server.utils.file_utils import load_markdown_file
@@ -1,13 +1,16 @@
1
1
  # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
2
  #
3
- # Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance
4
- # with the License. A copy of the License is located at
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
5
6
  #
6
- # http://www.apache.org/licenses/LICENSE-2.0
7
+ # http://www.apache.org/licenses/LICENSE-2.0
7
8
  #
8
- # or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES
9
- # OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions
10
- # and limitations under the License.
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
11
14
  """Tests for the awslabs.frontend-mcp-server package."""
12
15
 
13
16
  import importlib
@@ -1,13 +1,16 @@
1
1
  # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
2
  #
3
- # Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance
4
- # with the License. A copy of the License is located at
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
5
6
  #
6
- # http://www.apache.org/licenses/LICENSE-2.0
7
+ # http://www.apache.org/licenses/LICENSE-2.0
7
8
  #
8
- # or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES
9
- # OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions
10
- # and limitations under the License.
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
11
14
  """Tests for the main function in server.py."""
12
15
 
13
16
  from awslabs.frontend_mcp_server.server import main
@@ -26,23 +29,6 @@ class TestMain:
26
29
 
27
30
  # Check that mcp.run was called with the correct arguments
28
31
  mock_run.assert_called_once()
29
- assert mock_run.call_args[1].get('transport') is None
30
-
31
- @patch('awslabs.frontend_mcp_server.server.mcp.run')
32
- @patch('sys.argv', ['awslabs.frontend-mcp-server', '--sse', '--port', '9999'])
33
- def test_main_sse(self, mock_run):
34
- """Test main function with SSE transport."""
35
- # Call the main function
36
- main()
37
-
38
- # Check that mcp.run was called with the correct arguments
39
- mock_run.assert_called_once()
40
- assert mock_run.call_args[1].get('transport') == 'sse'
41
-
42
- # Check that the port was set correctly
43
- from awslabs.frontend_mcp_server.server import mcp
44
-
45
- assert mcp.settings.port == 9999
46
32
 
47
33
  def test_module_execution(self):
48
34
  """Test the module execution when run as __main__."""
@@ -1,13 +1,16 @@
1
1
  # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
2
  #
3
- # Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance
4
- # with the License. A copy of the License is located at
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
5
6
  #
6
- # http://www.apache.org/licenses/LICENSE-2.0
7
+ # http://www.apache.org/licenses/LICENSE-2.0
7
8
  #
8
- # or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES
9
- # OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions
10
- # and limitations under the License.
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
11
14
  """Tests for the frontend MCP Server."""
12
15
 
13
16
  import pytest
@@ -1,13 +0,0 @@
1
- # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
- #
3
- # Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance
4
- # with the License. A copy of the License is located at
5
- #
6
- # http://www.apache.org/licenses/LICENSE-2.0
7
- #
8
- # or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES
9
- # OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions
10
- # and limitations under the License.
11
-
12
- # This file is part of the awslabs namespace.
13
- # It is intentionally minimal to support PEP 420 namespace packages.
@@ -1,14 +0,0 @@
1
- # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
- #
3
- # Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance
4
- # with the License. A copy of the License is located at
5
- #
6
- # http://www.apache.org/licenses/LICENSE-2.0
7
- #
8
- # or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES
9
- # OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions
10
- # and limitations under the License.
11
-
12
- """awslabs.frontend-mcp-server"""
13
-
14
- __version__ = '0.0.0'
@@ -1 +0,0 @@
1
- """Utility functions for the frontend MCP server."""