Skip to main content
Glama
Amazon Bedrock MCP Server

Amazon Bedrock MCP Server

by zxkane

Amazon Bedrock MCP サーバー

AI 画像生成のために Amazon Bedrock の Nova Canvas モデルと統合するモデル制御プロトコル (MCP) サーバー。

特徴

  • AmazonのNova Canvasモデルを使用したテキスト説明からの高品質画像生成

  • ネガティブプロンプトによる高度な制御で画像構成を洗練

  • 画像のサイズと品質を柔軟に設定できるオプション

  • シード制御による決定論的な画像生成

  • 堅牢な入力検証とエラー処理

Related MCP server: AWS Nova Canvas

前提条件

  1. Amazon Bedrock および Nova Canvas モデルへのアクセスが可能なアクティブな AWS アカウント

  2. 必要な権限を持つAWS認証情報が適切に設定されている

  3. Node.js バージョン 18 以降

インストール

AWS認証情報の設定

サーバーには、適切な Amazon Bedrock 権限を持つ AWS 認証情報が必要です。以下のいずれかの方法で設定してください。

  1. 環境変数:

    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
  2. AWS 認証情報ファイル ( ~/.aws/credentials ):

    [the_profile_name]
    aws_access_key_id = your_access_key
    aws_secret_access_key = your_secret_key

    アクティブプロファイルの環境変数:

    export AWS_PROFILE=the_profile_name
  3. IAM ロール (AWS インフラストラクチャにデプロイされている場合)

クロードデスクトップ統合

Claude Desktop と統合するには、設定ファイルに次の構成を追加します。

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 you want to use 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'
      }
    }
  }
}

利用可能なツール

画像を生成する

Amazon Bedrock の Nova Canvas モデルを使用して、テキストの説明から画像を作成します。

パラメータ

  • prompt (必須): 希望する画像の説明文(1~1024文字)

  • negativePrompt (オプション):画像から除外する要素(1〜1024文字)

  • width (オプション):ピクセル単位の画像の幅(デフォルト:1024)

  • height (オプション):ピクセル単位の画像の高さ(デフォルト:1024)

  • quality (オプション):画像品質レベル - 「標準」または「プレミアム」(デフォルト:「標準」)

  • cfg_scale (オプション):プロンプト遵守強度(1.1-10、デフォルト:6.5)

  • seed (オプション):再現性のための生成シード(0-858993459、デフォルト:12)

  • numberOfImages (オプション): 生成のバッチサイズ (1-5、デフォルト: 1)

実装例

const result = await callTool('generate_image', {
  prompt: "A serene mountain landscape at sunset",
  negativePrompt: "people, buildings, vehicles",
  quality: "premium",
  cfg_scale: 8,
  numberOfImages: 2
});

プロンプトガイドライン

最適な結果を得るには、メインプロンプトで否定的な表現(「いいえ」「ない」「なし」など)を避けてください。代わりに、これらの要素をnegativePromptパラメータに移動してください。例えば、プロンプトで「建物のない風景」を使用する代わりに、 negativePromptでは「建物」を使用してください。

詳細な使用ガイドラインについては、 Nova Canvas のドキュメントを参照してください。

発達

ローカル環境でサーバーをセットアップして実行するには:

git clone https://github.com/zxkane/mcp-server-amazon-bedrock.git
cd mcp-server-amazon-bedrock
npm install
npm run build

パフォーマンスに関する考慮事項

生成時間は、解像度( widthとheight )、 numberOfImages 、およびquality設定によって影響を受けます。高い値を使用する場合は、実装においてタイムアウトが発生する可能性があることにご注意ください。

ライセンス

このプロジェクトは MIT ライセンスに基づいてライセンスされています - 詳細については LICENSE ファイルを参照してください。

Available Tools

1 tool
generate_imageC

Generate image(s) using Amazon Nova Canvas model. The returned data is Base64-encoded string that represent each image that was generated.

Inputs: prompt (required), cfg_scale, height, negativePrompt, +4 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3/5.0

    Scored across 1 tool

    Disambiguation5/5

    With only one tool, there is no possibility of confusion or overlap between tools. The tool 'generate_image' has a clear and distinct purpose that cannot be mistaken for any other tool in the set.

    Naming Consistency5/5

    The single tool name 'generate_image' follows a verb_noun pattern, and with only one tool, consistency is inherently perfect. There are no other tools to compare against, so no inconsistencies can arise.

    Tool Count2/5

    A single tool is too few for a server named 'Amazon Bedrock MCP Server', which suggests a broader scope related to Amazon Bedrock services. This minimal toolset feels thin and incomplete for the implied domain, limiting functionality to just image generation.

    Completeness1/5

    The tool surface is severely incomplete for the server's purpose. Amazon Bedrock includes multiple models and capabilities beyond image generation, such as text generation, embeddings, and model management. The single tool fails to cover these core aspects, leaving significant gaps that will cause agent failures.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers