8000 feat: add S3 Tables MCP Server by okhomin · Pull Request #584 · awslabs/mcp · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

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

Open
wants to merge 31 commits into
base: main
Choose a base branch
from
Open

feat: add S3 Tables MCP Server #584

wants to merge 31 commits into from

Conversation

okhomin
Copy link
@okhomin okhomin commented Jun 13, 2025

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.

Please provide a summary of what's being changed

User experience

Please share what the user experience looks like before and after this change

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.

  • I have reviewed the contributing guidelines
  • I have performed a self-review of this change
  • Changes have been tested
  • Changes are documented

Is this a breaking change? No

RFC issue number: #583

Checklist:

  • Migration process documented
  • Implement warnings (if it can live side by side)

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.

@scottschreckengaust scottschreckengaust changed the title add S3 Tables MCP Server implementation feat: add S3 Tables MCP Server Jun 13, 2025
@scottschreckengaust scottschreckengaust added hold-merging Signals to hold the PR from merging new mcp server A new MCP server ideally linked to an issue labels Jun 13, 2025
Copy link
codecov bot commented Jun 13, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.95%. Comparing base (8f5c671) to head (25e6667).

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@github-advanced-security
Copy link

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.

@okhomin okhomin requested a review from gsoundar June 13, 2025 16:58
@scottschreckengaust scottschreckengaust self-assigned this Jun 16, 2025
Copy link
@gsoundar gsoundar left a 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.

@scottschreckengaust
Copy link
Member

Please add entries at .github/CODEOWNERS, mkdocs.yml, and docs/index.md, plus add a documentation file at docs/servers/s3-tables-mcp-server.md.

Copy link
Member
@scottschreckengaust scottschreckengaust left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review comments.

@scottschreckengaust
Copy link
Member

Run pre-commit run --all-files at the top-level of the repository to review failures.

# 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)

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

Copy link
Author

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__}')

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:

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:

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

Copy link
@gsoundar gsoundar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

Copy link
@gsoundar gsoundar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

Copy link
@gsoundar gsoundar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

Copy link
@gsoundar gsoundar left a 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__} */'

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

Copy link
@gsoundar gsoundar left a 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.

Copy link
@gsoundar gsoundar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

Copy link
@gsoundar gsoundar left a 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.

Copy link
@gsoundar gsoundar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

Copy link
@gsoundar gsoundar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

Copy link
@gsoundar gsoundar left a 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

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 ?

@okhomin okhomin marked this pull request as ready for review June 24, 2025 16:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hold-merging Signals to hold the PR from merging new mcp server A new MCP server ideally linked to an issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0