generated from amazon-archives/__template_Apache-2.0
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
feat: Adding AWS Location MCP server #161
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
Merged
theagenticguy
merged 92 commits into
awslabs:main
from
scouturier:AWS-Location-MCP-server
May 7, 2025
Merged
Changes from 57 commits
Commits
Show all changes
92 commits
Select commit
Hold shift + click to select a range
71ef264
Adding AWS Location MCP server
95f5f96
Merge branch 'main' into AWS-Location-MCP-server
MichaelWalker-git 2878abd
Adding AWS Location MCP server - adding valid uv.lock file and copyri…
98ff61e
Update src/aws-location-mcp-server/pyproject.toml
scouturier f9625b7
Merge branch 'main' into AWS-Location-MCP-server
scottschreckengaust ea71f8a
Update src/aws-location-mcp-server/awslabs/__init__.py
scouturier c28397e
Merge branch 'main' into AWS-Location-MCP-server
scouturier 4a06a71
Merge branch 'main' into AWS-Location-MCP-server
krokoko d457546
Merge branch 'main' into AWS-Location-MCP-server
scouturier 0db6709
Update src/aws-location-mcp-server/awslabs/aws_location_server/__init…
scouturier 0a0a0eb
Merge branch 'main' into AWS-Location-MCP-server
scouturier 4d2e29a
Merge branch 'main' into AWS-Location-MCP-server
theagenticguy c430c02
Merge branch 'main' into AWS-Location-MCP-server
scottschreckengaust f61ad55
removing unneeded files and replacing configuration to support uvx
7701d0a
Update src/aws-location-mcp-server/tests/test_server.py
scouturier 2b591ee
Fixing code to succeed pre-commit checks
6d1f278
Fixing tests
371ff27
Updating code so the pre-commit checks works
52d0528
Commit .secrets.baseline
3711585
Update secrets baseline to include test credentials
12a1d0b
Add is_secret: false flag to test secrets in .secrets.baseline
4f92b73
Adding dockerfile + healthcheck
bf5934f
Merge branch 'main' into AWS-Location-MCP-server
theagenticguy df5abba
Merge branch 'main' into AWS-Location-MCP-server
theagenticguy bfa0e2d
Enhance AWS Location MCP Server with geo-places functionality
aniloncloud 6cce925
latest
760d333
added execute permissions and updated README
3dc45fa
fix: use encoding=utf-8 for static files (#248)
alexa-perlov 78463c8
fix(dockerfiles): fix podman build (#246)
krokoko 4f988bd
feat(new MCP server): Add Git Repository Research MCP Server (#180)
MichaelWalker-git 302f603
feat(cost-analysis): implement Terraform project service analyzer (#247)
pranjbh 312d86b
Add note regarding the performance hit of using the latest suffix in …
mortizbey 8fc4216
Automatic update of packages
awslabs-mcp e969cc3
fear: almost zero change in code coverage (#258)
scottschreckengaust 0260df3
feat: merge prevention by label (#255)
scottschreckengaust dd3cc43
chore: update .secrets.baseline for aws-location-mcp-server
aniloncloud 5e12231
chore: update based on pre-commit hooks
aniloncloud 571fcb4
fix: repair .secrets.baseline JSON structure
aniloncloud 9cea0d4
fix: repair .secrets.baseline JSON structure and add location service…
aniloncloud d111ec7
chore: updates to .secrets.baseline
aniloncloud 75dc7e6
chore: make docker-healthcheck.sh executable
aniloncloud f13c65c
Merge pull request #1 from aniloncloud/aws-location-mcp-server-new-tools
scouturier 8d2bc05
Improve code coverage from 19% to 80% with comprehensive tests
4433c9f
Add AWS Location MCP Server to README.md
566a59b
refactor:
aniloncloud 10b9b31
Merge main into AWS-Location-MCP-server and resolve conflicts
a024284
Fix type errors and method override issues in AWS Location MCP Server
3dda229
Fix Context.error method override signature in test_server_integratio…
c1e6b7a
Fix linting issues in AWS Location MCP Server
d50f555
Resolve merge conflict in server.py
8873e6c
Merge branch 'aniloncloud-aws-location-mcp-server-new-tools' into AWS…
c05ddf4
Fix tests to match updated function signatures
62171ce
Remove duplicate AWS Location Service MCP Server entry in README
7bfc765
Update secrets baseline to include test mock credentials
ebd16cb
Update secrets baseline to exclude test file
e2f9469
Revert "Updating code so the pre-commit checks works"
260e780
Format test_server.py with consistent style and trailing commas
392bfec
Add additional test cases to improve code coverage
2fb8ded
Update jsonschema check to 0.33.0 in pre-commit config
9bb1fa9
Fix CodeQL clear-text logging issues in test_server_integration.py
af3331f
Fix import sorting in test_server_integration.py
7c9b4d2
Fix import sorting with ruff --fix
29d70e6
Apply pre-commit fixes: trailing whitespace and code formatting
545fba2
Exclude mkdocs.yml from YAML check in pre-commit
630cbe6
Fix remaining CodeQL clear-text logging issues in test_server_integra…
df3c4a4
Apply pre-commit formatting fixes to test_server_integration.py
6bf3562
Simplify README
1cc6bd8
Fix line wrapping in README code examples
41331cf
Add GeoRoutesClient and route calculation features
aniloncloud a226f53
Fix import sorting with ruff --fix
a48b6a1
Apply pre-commit fixes: trailing whitespace and code formatting
0f62030
Exclude mkdocs.yml from YAML check in pre-commit
5264e25
Fix remaining CodeQL clear-text logging issues in test_server_integra…
6d2aea5
Apply pre-commit formatting fixes to test_server_integration.py
13ec274
Simplify README
def8f6a
Fix line wrapping in README code examples
847962d
Add GeoRoutesClient and route calculation features
aniloncloud b24f32f
- Added new tools for AWS Location Service: `GeoPlacesClient`, `GeoRo…
aniloncloud 1d3b16f
Update README.md
scouturier fa5cebb
Merge PR #5: Add route calculation and waypoint optimization features…
8876f81
Fix integration tests by adding ctx fixture and proper test skipping
90f0810
Fix pyright type checking errors for null references
7f1654a
Update README files with new route calculation and waypoint optimizat…
e1e6565
Update src/aws-location-mcp-server/.pre-commit-config.yaml
scouturier ce4956f
Update src/aws-location-mcp-server/Dockerfile
scouturier 455bbec
Remove hardcoded AWS_REGION and AWS_LOCATION_PLACE_INDEX from aws-loc…
492c735
Update secrets baseline to acknowledge test credentials
8cf4fad
Update secrets baseline
bebbafb
Fix code formatting with ruff-format
70a0a68
Update secrets baseline with new line numbers after code formatting
7df8d0e
Merge branch 'main' into AWS-Location-MCP-server
scouturier 0b34aa3
Merge branch 'main' into AWS-Location-MCP-server
theagenticguy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,88 @@ | ||
| # Python | ||
| __pycache__/ | ||
| *.py[cod] | ||
| *$py.class | ||
| *.so | ||
| .Python | ||
| build/ | ||
| develop-eggs/ | ||
| dist/ | ||
| downloads/ | ||
| eggs/ | ||
| .eggs/ | ||
| lib/ | ||
| lib64/ | ||
| parts/ | ||
| sdist/ | ||
| var/ | ||
| wheels/ | ||
| *.egg-info/ | ||
| .installed.cfg | ||
| *.egg | ||
| MANIFEST | ||
|
|
||
| # Virtual environments | ||
| venv/ | ||
| env/ | ||
| ENV/ | ||
| .venv/ | ||
| .env/ | ||
|
|
||
| # IDE | ||
| .idea/ | ||
| .vscode/ | ||
| *.swp | ||
| *.swo | ||
| *~ | ||
|
|
||
| # Testing | ||
| .coverage | ||
| htmlcov/ | ||
| .pytest_cache/ | ||
| .tox/ | ||
| .nox/ | ||
| coverage.xml | ||
| *.cover | ||
| .hypothesis/ | ||
|
|
||
| # Jupyter Notebook | ||
| .ipynb_checkpoints | ||
|
|
||
| # Distribution / packaging | ||
| .Python | ||
| env/ | ||
| build/ | ||
| develop-eggs/ | ||
| dist/ | ||
| downloads/ | ||
| eggs/ | ||
| .eggs/ | ||
| lib/ | ||
| lib64/ | ||
| parts/ | ||
| sdist/ | ||
| var/ | ||
| wheels/ | ||
| *.egg-info/ | ||
| .installed.cfg | ||
| *.egg | ||
|
|
||
| # Logs | ||
| logs/ | ||
| *.log | ||
| npm-debug.log* | ||
| yarn-debug.log* | ||
| yarn-error.log* | ||
|
|
||
| # Local development | ||
| .env | ||
| .env.local | ||
| .env.development.local | ||
| .env.test.local | ||
| .env.production.local | ||
|
|
||
| # Cache | ||
| .ruff_cache/ | ||
| __pycache__/ | ||
| .mypy_cache/ | ||
| .pytest_cache/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| repos: | ||
| - repo: https://github.com/astral-sh/ruff-pre-commit | ||
| rev: v0.9.7 | ||
| hooks: | ||
| - id: ruff | ||
| args: [--fix] | ||
| - id: ruff-format | ||
|
|
||
| - repo: https://github.com/pre-commit/pre-commit-hooks | ||
| rev: v4.5.0 | ||
| hooks: | ||
| - id: trailing-whitespace | ||
| - id: end-of-file-fixer | ||
| - id: check-yaml | ||
| - id: check-added-large-files | ||
| - id: check-case-conflict | ||
| - id: check-merge-conflict | ||
| - id: debug-statements | ||
| - id: check-toml | ||
|
|
||
| - repo: https://github.com/python-jsonschema/check-jsonschema | ||
| rev: 0.28.0 | ||
| hooks: | ||
| - id: check-github-workflows | ||
| - id: check-dependabot | ||
|
|
||
| - repo: https://github.com/commitizen-tools/commitizen | ||
| rev: v3.20.0 | ||
| hooks: | ||
| - id: commitizen | ||
| stages: [commit-msg] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| 3.10 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| # Changelog | ||
|
|
||
| All notable changes to this project will be documented in this file. | ||
|
|
||
| The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), | ||
| and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). | ||
|
|
||
| ## [1.0.0] - 2025-04-17 | ||
|
|
||
| ### Added | ||
| - Initial release of the AWS Location Service MCP Server | ||
| - Added `search_places` tool for geocoding and place search | ||
| - Added `get_coordinates` tool for retrieving location coordinates | ||
| - Support for AWS credentials via environment variables or AWS CLI profiles | ||
| - Support for custom place index configuration | ||
|
|
||
| ### Changed | ||
| - Implemented using FastMCP framework for MCP protocol handling | ||
| - Structured project to match other MCP servers |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,78 @@ | ||
| # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance | ||
| # with the License. A copy of the License is located at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES | ||
| # OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions | ||
| # and limitations under the License. | ||
|
|
||
| FROM public.ecr.aws/sam/build-python3.10@sha256:04cdbe84bec08d17d621192bc3f0a9e4a85a83f2ac99aa9241659dfac0d845ea AS uv | ||
|
|
||
| # Install the project into `/app` | ||
| WORKDIR /app | ||
|
|
||
| # Enable bytecode compilation | ||
| ENV UV_COMPILE_BYTECODE=1 | ||
|
|
||
| # Copy from the cache instead of linking since it's a mounted volume | ||
| ENV UV_LINK_MODE=copy | ||
|
|
||
| # Prefer the system python | ||
| ENV UV_PYTHON_PREFERENCE=only-system | ||
|
|
||
| # Run without updating the uv.lock file like running with `--frozen` | ||
| ENV UV_FROZEN=true | ||
|
|
||
| # Install the project's dependencies using the lockfile and settings | ||
| RUN --mount=type=cache,target=/root/.cache/uv \ | ||
| --mount=type=bind,source=uv.lock,target=uv.lock \ | ||
| --mount=type=bind,source=pyproject.toml,target=pyproject.toml \ | ||
scouturier marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| pip install uv && \ | ||
| uv sync --frozen --no-install-project --no-dev --no-editable | ||
|
|
||
| # Then, add the rest of the project source code and install it | ||
| # Installing separately from its dependencies allows optimal layer caching | ||
| COPY . /app | ||
| RUN --mount=type=cache,target=/root/.cache/uv \ | ||
| uv sync --frozen --no-dev --no-editable | ||
|
|
||
| # Make the directory just in case it doesn't exist | ||
| RUN mkdir -p /root/.local | ||
|
|
||
| FROM public.ecr.aws/sam/build-python3.10@sha256:04cdbe84bec08d17d621192bc3f0a9e4a85a83f2ac99aa9241659dfac0d845ea | ||
|
|
||
| # Place executables in the environment at the front of the path and include other binaries | ||
| ENV PATH="/app/.venv/bin:$PATH:/usr/sbin" | ||
|
|
||
| # Install lsof for the healthcheck | ||
| # Install AWS CLI for AWS credentials management | ||
| # Add non-root user and ability to change directory into /root | ||
| RUN yum update -y && \ | ||
| yum install -y lsof && \ | ||
| yum clean all -y && \ | ||
| rm -rf /var/cache/yum && \ | ||
| groupadd --force --system app && \ | ||
| useradd app -g app -d /app && \ | ||
| chmod o+x /root | ||
|
|
||
| # Get the project from the uv layer | ||
| COPY --from=uv --chown=app:app /root/.local /root/.local | ||
| COPY --from=uv --chown=app:app /app/.venv /app/.venv | ||
|
|
||
| # Get healthcheck script | ||
| COPY ./docker-healthcheck.sh /usr/local/bin/docker-healthcheck.sh | ||
| RUN chmod +x /usr/local/bin/docker-healthcheck.sh | ||
|
|
||
| # Run as non-root | ||
| USER app | ||
|
|
||
| # Set environment variables for AWS Location Service | ||
| ENV AWS_REGION=us-east-1 | ||
scouturier marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| ENV AWS_LOCATION_PLACE_INDEX=MCPDemo | ||
|
|
||
| # Health check and entrypoint | ||
| HEALTHCHECK --interval=30s --timeout=30s --start-period=5s --retries=3 CMD [ "docker-healthcheck.sh" ] | ||
| ENTRYPOINT ["awslabs.aws-location-mcp-server"] | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.