The Amazon Bedrock MCP Server integrates with Amazon Bedrock's Nova Canvas model to provide AI image generation capabilities. This server implements the Model Control Protocol (MCP) standard, allowing applications like Claude Desktop to generate high-quality images directly from text descriptions.
Before installing the server, ensure you have:
The server requires AWS credentials with appropriate Amazon Bedrock permissions. Configure these using one of these methods:
Using environment variables:
export AWS_ACCESS_KEY_ID=your_access_key
export AWS_SECRET_ACCESS_KEY=your_secret_key
export AWS_REGION=us-east-1 # or your preferred region
Using an AWS credentials file (~/.aws/credentials
):
[the_profile_name]
aws_access_key_id = your_access_key
aws_secret_access_key = your_secret_key
Then set your active profile:
export AWS_PROFILE=the_profile_name
Using an IAM role (when deployed on AWS infrastructure)
You can install and run the server using npx:
npx -y @zxkane/mcp-server-amazon-bedrock
To integrate with Claude Desktop, add the MCP server configuration to your Claude settings file:
MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%/Claude/claude_desktop_config.json
{
"mcpServers": {
"amazon-bedrock": {
"command": "npx",
"args": [
"-y",
"@zxkane/mcp-server-amazon-bedrock"
],
"env": {
"AWS_PROFILE": "your_profile_name", // Optional, only if using a specific profile
"AWS_ACCESS_KEY_ID": "your_access_key", // Optional if using AWS credentials file or IAM role
"AWS_SECRET_ACCESS_KEY": "your_secret_key", // Optional if using AWS credentials file or IAM role
"AWS_REGION": "us-east-1" // Optional, defaults to 'us-east-1'
}
}
}
}
The server provides a generate_image
tool with the following parameters:
prompt
(required): Descriptive text for the desired image (1-1024 characters)negativePrompt
(optional): Elements to exclude from the image (1-1024 characters)width
(optional): Image width in pixels (default: 1024)height
(optional): Image height in pixels (default: 1024)quality
(optional): Image quality level - "standard" or "premium" (default: "standard")cfg_scale
(optional): Prompt adherence strength (1.1-10, default: 6.5)seed
(optional): Generation seed for reproducibility (0-858993459, default: 12)numberOfImages
(optional): Batch size for generation (1-5, default: 1)When using the MCP server programmatically:
const result = await callTool('generate_image', {
prompt: "A serene mountain landscape at sunset",
negativePrompt: "people, buildings, vehicles",
quality: "premium",
cfg_scale: 8,
numberOfImages: 2
});
For best results:
negativePrompt
parameterGeneration time varies based on:
width
and height
)numberOfImages
)Be mindful of these settings to avoid timeouts, especially when generating multiple high-resolution images with premium quality.
To add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "amazon-bedrock" '{"command":"npx","args":["-y","@zxkane/mcp-server-amazon-bedrock"],"env":{"AWS_PROFILE":"your_profile_name","AWS_ACCESS_KEY_ID":"your_access_key","AWS_SECRET_ACCESS_KEY":"your_secret_key","AWS_REGION":"us-east-1"}}'
See the official Claude Code MCP documentation for more details.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"amazon-bedrock": {
"command": "npx",
"args": [
"-y",
"@zxkane/mcp-server-amazon-bedrock"
],
"env": {
"AWS_PROFILE": "your_profile_name",
"AWS_ACCESS_KEY_ID": "your_access_key",
"AWS_SECRET_ACCESS_KEY": "your_secret_key",
"AWS_REGION": "us-east-1"
}
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.config/Claude/claude_desktop_config.json
2. Add this to your configuration file:
{
"mcpServers": {
"amazon-bedrock": {
"command": "npx",
"args": [
"-y",
"@zxkane/mcp-server-amazon-bedrock"
],
"env": {
"AWS_PROFILE": "your_profile_name",
"AWS_ACCESS_KEY_ID": "your_access_key",
"AWS_SECRET_ACCESS_KEY": "your_secret_key",
"AWS_REGION": "us-east-1"
}
}
}
}
3. Restart Claude Desktop for the changes to take effect