# Amazon DynamoDB Table MCP for AI Agents MCP

> The Amazon DynamoDB Table MCP gives your AI agent one focused superpower: secure, controlled access to a single NoSQL database table. It lets your agent read records using `get_item` or complex searches with `query_table`, and it handles writing data by inserting new records via `put_item` or removing them entirely with `delete_item`. This is built for giving AI applications reliable, contained data persistence without exposing your entire AWS infrastructure.

## Overview
- **Category:** industry-titans
- **Price:** Free
- **Tags:** nosql, aws, database-management, data-storage, security-scoping, serverless

## Description

Need to give your AI agent access to structured data but can't risk handing over global cloud permissions? This MCP solves that. It wraps up all the necessary DynamoDB interactions into one secure connection, strictly limiting the agent to a single table. You can now let your AI client perform complex database tasks—like fetching user profiles or tracking chat histories—without ever touching your critical production databases. The agent uses dedicated tools for everything: it pulls specific records using `get_item`, runs targeted data searches with `query_table`, and adds new information whenever you use the `put_item` function. If you need to clean up old entries, it handles that too, letting the agent run `delete_item`. Because Vinkius hosts this MCP, you connect once from your preferred AI client (like Cursor or Claude) and get immediate, safe database access for any application.

## Tools

### delete_item
Removes a specific item record from the DynamoDB table.

### get_item
Retrieves a single, specific item by its unique identifier in the table.

### put_item
Adds a brand new record to the table or overwrites an existing one with new data.

### query_table
Executes a targeted search query across multiple related items in the table.

### scan_table
Reads every single item in the entire DynamoDB table, useful for full audits or bulk data checks.

## Prompt Examples

**Prompt:** 
```
Find all user records associated with account ID 'CUST-456' that have status 'Suspended'.
```

**Response:** 
```
**User Search Results for CUST-456**

*   **Record 1:** Name: Sarah Connor, Email: s.connor@example.com, Status: Suspended, Last Access: 2023-01-15
*   **Record 2:** Name: John Doe, Email: jdoe@corp.net, Status: Suspended, Last Access: 2024-02-01

(Found 2 records matching the criteria.)
```

**Prompt:** 
```
I need to add a new order for product 'SKU-987'. The customer is Jane Smith.
```

**Response:** 
```
**Order Record Added Successfully**

We've inserted the following details into the database:

*   **OrderID:** ORD-2024-112
*   **Product:** SKU-987 (Widget Pro)
*   **Customer:** Jane Smith
*   **Status:** Pending Payment
*   **Timestamp:** 2024-06-13
```

**Prompt:** 
```
Scan the table and list all records that are marked as 'Draft' or 'Archived'.
```

**Response:** 
```
**Table Scan Audit Report**

I ran a full scan and found 12 items matching your request. Here is a summary:

| ID | Type | Status |
| :--- | :--- | :--- |
| R-101 | Project | Draft |
| R-450 | User | Archived |
| R-992 | Content | Draft |
```

## Capabilities

### Retrieve specific records
The agent retrieves a single item's data using the `get_item` tool.

### Insert or update records
You can add new entries into the table using `put_item`, or modify existing ones.

### Perform targeted data queries
The agent runs complex, filtered searches across related items with `query_table`.

### Scan the entire table content
You can execute a full scan of all data within the DynamoDB table using `scan_table`.

### Remove stored items
The agent deletes specific entries from the table using the `delete_item` tool.

## Use Cases

### Tracking chat history for a support bot
A user asks their agent to recall the context of last week's conversation. The agent uses `get_item` based on the user ID and date range, pulling up the complete thread structure so it can respond accurately without manual intervention.

### Building a product catalog database
The team needs to populate 500 new items. They instruct the agent to run `put_item` repeatedly with structured JSON data, allowing them to build out their entire NoSQL inventory in bulk and maintain data integrity.

### Identifying old or stale user accounts
The ops engineer needs a list of all users who haven't logged in for six months. They ask the agent to `query_table` using time filters, generating a report that helps them plan targeted re-engagement campaigns.

### Auditing data before migration
Before moving to a new database, a developer asks the agent to `scan_table`. This provides a complete snapshot of all current records, allowing them to validate schema compliance and check for missing fields across the entire dataset.

## Benefits

- Security: By using this MCP, your agent is locked down to one table. It can't list other tables or drop production data.
- Precision: Instead of vague instructions, you use `get_item` for direct lookups or `query_table` for highly filtered searches.
- Reliability: You get native DynamoDB integration that supports complex indexes and structured memory storage for your AI application state.
- Efficiency: When bulk data cleanup is needed, the agent can run a full audit with `scan_table` before executing targeted deletions using `delete_item`.
- Simplicity: It gives you instant, scalable NoSQL database access without needing to manage complex AWS credentials or networking setup.

## How It Works

The bottom line is, you're giving your AI a safe API endpoint that speaks DynamoDB, allowing natural language commands to become reliable data actions.

1. First, you connect your AI client to this MCP via Vinkius and tell it which DynamoDB table needs access.
2. Next, you ask your agent a question like 'Find all inactive user accounts.' The agent determines that `query_table` is the right tool and calls it with necessary filters.
3. The agent runs the query against the database and sends the structured results back to your AI client for review.

## Frequently Asked Questions

**How do I safely let my AI agent access my database without giving away all AWS permissions?**
You use the Amazon DynamoDB Table MCP. It gives your AI client limited, surgical access to only one table. You can perform necessary read/write operations using tools like `get_item` and `put_item`, but nothing more.

**Can this MCP handle complex data searches or just simple lookups?**
It handles both. For single records, you use `get_item`. If you need to filter by multiple criteria (e.g., status AND date range), the agent runs a targeted search using `query_table`.

**Is this suitable for storing application state or chat history?**
Yes, absolutely. This is ideal for giving your AI client persistent memory. You can save conversation threads and application settings by writing new records with `put_item`.

**If I want to delete old data, how do I do it with Amazon DynamoDB Table MCP?**
You first use `query_table` or `scan_table` to find the IDs of records you want gone. Then, you tell the agent to run `delete_item` on those specific IDs to clean up the data safely.

**Does this MCP work with all my AI clients like Cursor and Claude?**
Yes. As long as your client is MCP-compatible, you can connect it here. It lets any connected agent route data operations through natural language commands.