{"id":5858,"library":"awslabs-s3-tables-mcp-server","title":"AWS S3 Tables MCP Server","description":"The `awslabs-s3-tables-mcp-server` is an AWS Labs Model Context Protocol (MCP) server that enables AI assistants to interact with Amazon S3 Tables using natural language. It simplifies the management of S3-based tables by providing capabilities to create and query tables, generate tables directly from CSV files uploaded to S3, and access metadata through the S3 Metadata Table. The current version is 0.0.22, and it is part of the broader AWS Model Context Protocol ecosystem, with updates typically aligned with AWS service enhancements and MCP specification changes.","status":"active","version":"0.0.22","language":"en","source_language":"en","source_url":"https://github.com/awslabs/mcp/tree/main/src/s3-tables-mcp-server","tags":["aws","s3","tables","mcp","ai","llm","data-management","server","awslabs"],"install":[{"cmd":"pip install awslabs-s3-tables-mcp-server uv","lang":"bash","label":"Install library and uv"}],"dependencies":[{"reason":"Used as a prerequisite for running the MCP server executable.","package":"uv","optional":false},{"reason":"Required for configuring AWS credentials to interact with S3 and other AWS services.","package":"aws-cli","optional":false}],"imports":[],"quickstart":{"code":"import subprocess\nimport os\nimport json\n\n# NOTE: Ensure AWS credentials are configured (e.g., via `aws configure` or environment variables).\n# The server will pick them up from the environment.\n# For example:\n# os.environ['AWS_ACCESS_KEY_ID'] = os.environ.get('AWS_ACCESS_KEY_ID', 'YOUR_ACCESS_KEY')\n# os.environ['AWS_SECRET_ACCESS_KEY'] = os.environ.get('AWS_SECRET_ACCESS_KEY', 'YOUR_SECRET_KEY')\n# os.environ['AWS_REGION'] = os.environ.get('AWS_REGION', 'us-east-1')\n\n# 1. Define a minimal mcp_config.json content.\n# This configuration tells an MCP client how to start the S3 Tables MCP server.\n# In a real scenario, this file would be loaded by an AI client.\n# For demonstration, we simulate running the command directly.\n\nmcp_config_content = {\n    \"mcpServers\": {\n        \"awslabs.s3-tables-mcp-server\": {\n            \"command\": \"uvx awslabs.s3-tables-mcp-server --profile default --region us-east-1\",\n            \"description\": \"MCP Server for Amazon S3 Tables\",\n            \"schemas\": [\"file://~/.config/mcp/awslabs.s3-tables-mcp-server.json\"]\n        }\n    }\n}\n\n# 2. To run the server directly, you would typically execute a command.\n# This example shows how an AI client might configure and run it.\n# For local testing, ensure 'uv' is installed (`pip install uv`).\n\nprint(\"Attempting to run awslabs.s3-tables-mcp-server...\")\nprint(\"This server typically runs in a long-lived process and interacts with AI clients via stdio.\")\nprint(\"Press Ctrl+C to stop the server if it starts successfully.\")\n\n# Example of how an MCP client would launch the server process\ntry:\n    # The actual command might vary based on your AWS profile and region.\n    # Using --allow-write is generally not recommended for quickstart without understanding implications.\n    command_to_run = [\n        \"uvx\",\n        \"awslabs.s3-tables-mcp-server\",\n        \"--profile\", os.environ.get('AWS_PROFILE', 'default'), # Use 'default' or actual profile\n        \"--region\", os.environ.get('AWS_REGION', 'us-east-1'), # Use 'us-east-1' or actual region\n        # Add --allow-write if you intend to enable write operations, but be cautious!\n        # \"--allow-write\"\n    ]\n    \n    # Starting the server in a non-blocking way for demonstration.\n    # In a real setup, this would be managed by the AI client application.\n    process = subprocess.Popen(command_to_run, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True)\n    \n    print(\"Server process started (PID: {})\".format(process.pid))\n    print(\"Output (first few lines, server runs indefinitely):\")\n    \n    # Read some output to confirm it's running, then terminate for quickstart.\n    # In a real scenario, the process would continue running and communicate via stdio.\n    for _ in range(5):\n        line = process.stdout.readline()\n        if line:\n            print(line.strip())\n        else:\n            break\n\n    # For a quickstart, we often don't want a blocking server.\n    # You would typically interact with this server via an AI client (e.g., Kiro, Cline).\n    # For this example, we'll terminate it after a short period.\n    print(\"\\n--- Server started. Terminating quickstart process. ---\")\n    print(\"To interact, connect an AI client configured with this server.\")\n    process.terminate()\n    process.wait(timeout=5)\n\nexcept FileNotFoundError:\n    print(\"Error: 'uvx' command not found. Please ensure 'uv' is installed and in your PATH.\")\nexcept Exception as e:\n    print(f\"An error occurred: {e}\")\n","lang":"python","description":"The `awslabs-s3-tables-mcp-server` operates as a server that AI clients connect to, rather than being directly imported for application development. The quickstart demonstrates how to initiate the server process using `uvx`, a common method for running MCP servers. Ensure AWS credentials are configured in your environment or `~/.aws/credentials` as the server will use them. The server will run indefinitely, typically interacting with AI clients via standard I/O (stdio). This example starts the server and then terminates it after capturing some initial output for demonstration purposes."},"warnings":[{"fix":"Grant appropriate IAM permissions to the AWS user/role running the server and launch the server with the `--allow-write` flag (e.g., `uvx awslabs.s3-tables-mcp-server --allow-write`). Always follow the principle of least privilege.","message":"By default, the S3 Tables MCP server operates in read-only mode. To enable write access (create or append operations on S3 Tables), you must explicitly configure the MCP server with the necessary AWS IAM permissions and use the `--allow-write` flag when starting the server.","severity":"breaking","affected_versions":"All versions"},{"fix":"Always follow the principle of least privilege when setting up IAM permissions. If enabling write operations, take a backup of your data and carefully validate any instructions generated by your LLM before execution. Use separate AWS profiles for different environments (dev, test, prod).","message":"Users are solely responsible for the actions and permissions of agents using the MCP server. Misconfigured permissions or unverified agent actions may result in data loss, failed operations, or unexpected LLM behavior.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Ensure that your S3 Tables data schemas correctly define data types, and that ingested data conforms to these types. Pre-process data as needed to avoid type mismatches when performing operations that rely on specific data types.","message":"The Daft engine, utilized by the S3 Tables MCP Server for querying, has strict data type handling. This can lead to failures on numeric operations if real-world datasets have attributes stored as strings that are expected to be numeric.","severity":"gotcha","affected_versions":"All versions"},{"fix":"For operations not supported by the MCP Server (e.g., deleting buckets, general table updates), users are advised to use the AWS CLI or AWS SDK for S3 Tables.","message":"The MCP Server for S3 Tables provides a limited set of tools for managing S3 Tables. Specifically, it does not support delete or update operations for table buckets and namespaces, and only supports create, rename, and list for individual tables (no general update or delete).","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"last_verified":"2026-04-14T00:00:00.000Z","next_check":"2026-07-13T00:00:00.000Z"}