-
Notifications
You must be signed in to change notification settings - Fork 485
feat: add S3 Tables MCP Server #584
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
src/s3-tables-mcp-server/awslabs/s3_tables_mcp_server/__init__.py
Outdated
Show resolved
Hide resolved
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #584 +/- ##
==========================================
+ Coverage 86.85% 86.95% +0.09%
==========================================
Files 408 43 -365
Lines 27211 1771 -25440
Branches 4302 270 -4032
==========================================
- Hits 23635 1540 -22095
+ Misses 2352 145 -2207
+ Partials 1224 86 -1138 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation. |
src/s3-tables-mcp-server/awslabs/s3_tables_mcp_server/engines/__init__.py
Outdated
Show resolved
Hide resolved
src/s3-tables-mcp-server/awslabs/s3_tables_mcp_server/models.py
Outdated
Show resolved
Hide resolved
src/s3-tables-mcp-server/awslabs/s3_tables_mcp_server/server.py
Outdated
Show resolved
Hide resolved
src/s3-tables-mcp-server/awslabs/s3_tables_mcp_server/server.py
Outdated
Show resolved
Hide resolved
src/s3-tables-mcp-server/awslabs/s3_tables_mcp_server/utils.py
Outdated
Show resolved
H
8000
ide resolved
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.
This commit looks good to me.
src/s3-tables-mcp-server/awslabs/s3_tables_mcp_server/__init__.py
Outdated
Show resolved
Hide resolved
src/s3-tables-mcp-server/awslabs/s3_tables_mcp_server/constants.py
Outdated
Show resolved
Hide resolved
Please add entries at |
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.
Review comments.
Run |
# Initialize Athena client | ||
self._client = session.client('athena', region_name=self.config.region, config=config) | ||
# Initialize Athena client using the utility function | ||
self._client = get_athena_client(region_name=self.config.region) |
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.
Wondering if we should passin user-agent to athena in constructor
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.
User-agent for all boto clients is defined in utils.py
boto3.client: Configured Athena client | ||
""" | ||
region = region_name or os.getenv('AWS_REGION') or 'us-east-1' | ||
config = Config(user_agent_extra=f'awslabs/mcp/s3-tables-mcp-server/{__version__}') |
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.
This is ok but I prefer that we construct the string in one place
from awslabs.s3_tables_mcp_server.namespaces import ( | ||
create_namespace, | ||
delete_namespace, | ||
get_namespace, | ||
) | ||
from unittest.mock import MagicMock, patch | ||
|
||
|
||
class TestCreateNamespace: |
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.
I don't see any namespace tests that check if read-only that write namespace operations fail
SchemaField, | ||
MaintenanceStatus, | ||
) | ||
from unittest.mock import MagicMock, patch | ||
|
||
|
||
class TestCreateTable: |
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.
We should check that if read-only then create/delete operations are disallowed
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.
Looks good
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.
Looks good
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.
Looks good
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.
Looks good
@@ -143,7 +144,11 @@ def _execute_database_query( | |||
if validate_read_only: | |||
validate_read_only_query(query) | |||
|
|||
results = engine.execute_query(query) | |||
# Prepend version comment to the query | |||
version_comment = f'/* awslabs/mcp/s3-tables-mcp-server/{__version__} */' |
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.
if version does not have complex text that breaks comments then this is fine
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.
one comment. otherwise looks good.
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.
Looks good
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.
Mechanical changes. looks good.
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.
Looks good.
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.
Looks good
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.
Looks good.
|
||
### Added | ||
|
||
- Initial project setup |
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.
Do you want to add anything more ?
Summary
An MCP server providing programmatic read/write access to AWS S3 Tables information through standardized endpoints, enabling AI assistants to retrieve current S3 Tables data.
Changes
Added S3 Tables MCP Server implementation.
User experience
Users can perform read S3 Tables operations by default.
Users need to specify
--allow-write
to allow write operations.Checklist
If your change doesn't seem to apply, please leave them unchecked.
Is this a breaking change? No
RFC issue number: #583
Checklist:
Acknowledgment
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the project license.