MCPToolkit
MCPToolkit
requires the zod
and @modelcontextprotocol/sdk
dependencies to be installed first:
npm install zod @modelcontextprotocol/sdk
A utility for quickly adding Tools to an MCP Server, enabling any MCP Clients (like Claude or Cursor) to interact with your DynamoDB Tables using natural language.
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js'
import { MCPToolkit } from 'dynamodb-toolbox/database/actions/mcpToolkit'
// Set up your MCP Server as usual
const server = new McpServer(...)
const mcpToolkit = PokeDB.build(MCPToolkit)
mcpToolkit.addTools(server)
Methodsβ
addTools(...)
β
(server:McpServer, options?: Options) => MCPToolkit
Adds DynamoDB-Toolbox querying tools to an MCP Server. See Available Tools for a list of supported operations.
- Usage
- Read-only
mcpToolkit.addTools(server)
mcpToolkit.addTools(server, { readonly: true })
Available toolsβ
The following tools are available:
Access Pattern Toolsβ
ddb-tb_use-<KEY>-access-pattern-on-<TABLE>-table
β
Enables querying items from the database using a registered AccessPattern
.
Entity Toolsβ
ddb-tb_get-${entityName}-item-from-${dbTableKey}-table
β
Enables retrieving an entity item from the database.
ddb-tb_put-${entityName}-item-in-${dbTableKey}-table
β
(Unavailable in readonly
mode)
Enables inserting an entity item in the database.
ddb-tb_delete-${entityName}-item-from-${dbTableKey}-table
β
(Unavailable in readonly
mode)
Enables deleting an entity item from the database.
All tools automatically apply validation, default values, links, encoding/decoding and formatting.