-
Notifications
You must be signed in to change notification settings - Fork 129
[Docs] AWS Documentation MCP with automated team setup #1888
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Add one-command setup for AWS Documentation MCP server integration: - Auto-installs and configures MCP server for Cursor - Preserves existing MCP configurations (GitHub, graphiti-memory) - Includes team documentation and verification scripts - Adds Cursor rules for AWS development best practices Enables @aws-docs queries in Cursor for real-time AWS documentation access with automatic source citation and Ocean integration patterns.
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
|||||||||||
|
This pull request is automatically being deployed by Amplify Hosting (learn more). |
Code Coverage Artifact 📈: https://github.com/port-labs/ocean/actions/runs/16264756383/artifacts/3525781595Code Coverage Total Percentage:
|
Co-authored-by: qodo-merge-pro[bot] <151058649+qodo-merge-pro[bot]@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Python Script Argument Passing Error
The embedded Python script within the configure_cursor_mcp function fails to receive the MCP_CONFIG_PATH argument. The here-document syntax used (python3 << 'EOF' ... EOF "$MCP_CONFIG_PATH") incorrectly attempts to pass the path, resulting in sys.argv[1] being empty. Consequently, the script defaults config_path to an empty string, leading to a FileNotFoundError when it attempts to open the configuration file.
scripts/setup-aws-docs-mcp.sh#L165-L224
ocean/scripts/setup-aws-docs-mcp.sh
Lines 165 to 224 in 85e796f
| # Use Python to merge configurations properly | |
| python3 << 'EOF' | |
| import json | |
| import sys | |
| config_path = sys.argv[1] if len(sys.argv) > 1 else "" | |
| try: | |
| # Read existing config | |
| with open(config_path, 'r') as f: | |
| config = json.load(f) | |
| # Ensure mcpServers exists | |
| if 'mcpServers' not in config: | |
| config['mcpServers'] = {} | |
| # Add/Update AWS documentation server | |
| # Check if tool is installed to determine command format | |
| import subprocess | |
| try: | |
| result = subprocess.run(['uv', 'tool', 'list'], capture_output=True, text=True, check=True) | |
| if 'awslabs.aws-documentation-mcp-server' in result.stdout: | |
| command = "awslabs.aws-documentation-mcp-server" | |
| args = [] | |
| print("✅ Using installed version of AWS MCP server") | |
| else: | |
| command = "uvx" | |
| args = ["awslabs.aws-documentation-mcp-server@latest"] | |
| print("✅ Using uvx (temporary) version of AWS MCP server") | |
| except: | |
| command = "uvx" | |
| args = ["awslabs.aws-documentation-mcp-server@latest"] | |
| print("✅ Using uvx (temporary) version of AWS MCP server") | |
| config['mcpServers']['awslabs.aws-documentation-mcp-server'] = { | |
| "command": command, | |
| "args": args, | |
| "env": { | |
| "FASTMCP_LOG_LEVEL": "ERROR", | |
| "AWS_DOCUMENTATION_PARTITION": "aws" | |
| }, | |
| "disabled": False, | |
| "autoApprove": [ | |
| "read_documentation", | |
| "search_documentation", | |
| "recommend", | |
| "get_available_services" | |
| ] | |
| } | |
| # Write updated config | |
| with open(config_path, 'w') as f: | |
| json.dump(config, f, indent=2) | |
| print("✅ Configuration updated successfully") | |
| except Exception as e: | |
| print(f"❌ Error updating configuration: {e}") | |
| sys.exit(1) | |
| EOF "$MCP_CONFIG_PATH" |
Was this report helpful? Give feedback by reacting with 👍 or 👎
Code Coverage Artifact 📈: https://github.com/port-labs/ocean/actions/runs/16267473733/artifacts/3526693863Code Coverage Total Percentage:
|
Co-authored-by: qodo-merge-pro[bot] <151058649+qodo-merge-pro[bot]@users.noreply.github.com>
Code Coverage Artifact 📈: https://github.com/port-labs/ocean/actions/runs/16337006474/artifacts/3551679525Code Coverage Total Percentage:
|
Code Coverage Artifact 📈: https://github.com/port-labs/ocean/actions/runs/16415332892/artifacts/3576812632Code Coverage Total Percentage:
|
Code Coverage Artifact 📈: https://github.com/port-labs/ocean/actions/runs/18525207852/artifacts/4275352120Code Coverage Total Percentage:
|
User description
feat: add AWS Documentation MCP integration with automated team setup
• Add one-command setup script (scripts/setup-aws-docs-mcp.sh) that:
uv tool install• Add Cursor rules (aws-documentation-mcp.mdc) for AWS development:
• Add comprehensive team documentation (AWS_DOCS_MCP_SETUP.md):
• Add verification script (scripts/test-aws-docs-mcp.sh):
Benefits:
Enables @aws-docs queries in Cursor for real-time AWS documentation access with automatic source citation and Ocean integration patterns.
Description
What - A complete automated setup system that integrates AWS Documentation directly into Cursor IDE through Model Context Protocol (MCP). Developers can query AWS documentation in real-time using @aws-docs without leaving their development environment.
Components:
Why - Why - Solving Development Friction
Problems Solved:
Value Delivered:
How - Implementation & Usage
Team Setup (One-time):
Daily Develpmnt Usage:
In Cursor chat:
Technical Features:
Type of change
Please leave one option from the following and delete the rest:
All tests should be run against the port production environment(using a testing org).
Core testing checklist
Integration testing checklist
examplesfolder in the integration directory.Preflight checklist
Screenshots
Include screenshots from your environment showing how the resources of the integration will look.
2025-07-14.03-28-20.mov
API Documentation
Provide links to the API documentation used for this integration.
PR Type
Enhancement
Description
Add automated AWS Documentation MCP integration for Cursor IDE
Provide one-command setup script with cross-platform support
Include comprehensive team documentation and usage guidelines
Add verification script for testing MCP installation
Changes diagram
Changes walkthrough 📝
setup-aws-docs-mcp.sh
Automated AWS MCP setup scriptscripts/setup-aws-docs-mcp.sh
test-aws-docs-mcp.sh
MCP installation verification scriptscripts/test-aws-docs-mcp.sh
aws-documentation-mcp.mdc
AWS documentation usage guidelines.cursor/rules/aws-documentation-mcp.mdc
AWS_DOCS_MCP_SETUP.md
Team setup and usage documentationAWS_DOCS_MCP_SETUP.md