convez.ai
MCP ServerIntegração & APIsIntermediário
Sagargupta16

Bedrock Multi-Model MCP

Sagargupta16/bedrock-multi-model-mcp

Acesso unificado aos modelos Bedrock: compare, gere e embuta em uma interface comum

Ver no GitHub
InicialPluginScore · de 0 a 100

Servidor MCP que expõe todos os modelos de IA da AWS Bedrock (Claude, Llama, Mistral, Nova, Qwen, DeepSeek, GPT-OSS) com suporte a texto, imagem, vídeo e embeddings. Permite comparar modelos lado a lado, gerar conteúdo multimodal e calcular similaridade semântica diretamente do Claude ou qualquer cliente MCP.

Instalação

$npx convez-ai Sagargupta16/bedrock-multi-model-mcp

1 comando no terminal: detecta o formato do repositório (marketplace ou plugin avulso) e instala via Claude Code. Requer Node 18+ e o Claude Code instalado.

Métricas

Estrelas
3
Forks
0
Acompanhando
1
Saúde
42%
Último commit
há 4 dias
Versão
v0.8.0
Issues abertas
3
Contribuidores
1

Casos de uso

  • Comparar saídas de múltiplos modelos para escolher o melhor
  • Gerar imagens e vídeos via Bedrock sem código específico
  • Calcular embeddings e similaridade semântica entre textos
  • Avaliar latência e custo de tokens entre diferentes modelos

Veredito

Excelente integração com AWS Bedrock que democratiza o acesso a múltiplos modelos open-source e proprietários. O design com aliases e dados separados em JSON torna fácil manter e expandir o suporte a novos modelos sem tocar código.

README

A tradução para o português deste README ainda está na fila.

bedrock-multi-model-mcp

MCP server for AWS Bedrock - text, image, and video generation from any model. Use Claude, Llama, Mistral, Nova, Qwen, DeepSeek, GPT-OSS, and more from Claude Code (or any MCP client).

Tools

ToolDescription
bedrock_askSend a prompt to any text model. Returns response with token counts and latency.
bedrock_compareSame prompt to 2-5 models side by side. Compare quality, speed, and style.
bedrock_list_modelsList available text models with aliases, use cases, and capabilities.
bedrock_generate_imageGenerate images from text (Stable Image Ultra, SD3.5 Large, Stable Image Core). Saves PNG locally.
bedrock_generate_videoStart async video generation (Luma Ray 2). Output to S3.
bedrock_video_statusCheck video generation job progress.
bedrock_embed_similarityEmbed 2+ texts (Titan, Cohere) and return a cosine-similarity matrix.

Supported Models

Model data lives in src/data/ (text-models.json, image-models.json, video-models.json, embedding-models.json) - edit those files to add or remove models without touching code.

Text (Converse API)

ProviderModelsAliases
AnthropicClaude Fable 5, Opus 4.8 / 4.7 / 4.6, Sonnet 4.6, Haiku 4.5fable, claude-opus, claude-sonnet, claude-haiku
MetaLlama 4 Maverick, Llama 4 Scout, Llama 3.3 70Bllama4, llama4-scout, llama3.3
MistralMistral Large 3, Devstral 2, Mistral Small, Pixtral Largemistral-large, devstral, mistral-small, pixtral
AmazonNova Pro, Nova 2 Lite, Nova Lite, Nova Micronova-pro, nova2-lite, nova-lite, nova-micro
QwenQwen3 Coder Next, Qwen3 VL 235Bqwen-coder, qwen-vl
DeepSeekDeepSeek V3.2, DeepSeek R1deepseek, deepseek-r1
OpenAIGPT-OSS 120B, GPT-OSS 20Bgpt-oss, gpt-oss-20b

Image (InvokeModel API)

ModelAliasMax ResolutionRegion
Stable Image Ultra (default)stable-ultra1536x1536us-west-2
Stable Diffusion 3.5 Largesd3.51536x1536us-west-2
Stable Image Corestable-core1536x1536us-west-2

Video (Async API)

ModelAliasDurationResolutionRegion
Luma Ray 2luma-ray, ray25s or 9s720pus-west-2

The output S3 bucket must be in us-west-2 (same region as the model).

Amazon Nova Canvas/Reel and Titan Image were removed when AWS marked them end-of-life (Nova Reel EOL 2026-09-30); the registry only ships ACTIVE models.

Embeddings (InvokeModel API)

ModelAliasDimensions
Amazon Titan Text Embeddings V2titan-v21024
Amazon Titan Text Embeddings V1titan-v11536
Amazon Titan Multimodal Embeddingstitan-multimodal1024
Cohere Embed English v3cohere-en1024
Cohere Embed Multilingual v3cohere-multi1024

You can also pass any valid Bedrock model ID directly. Note: many foundation models require a cross-region inference profile (us. prefix) for on-demand invocation - the registry uses the working form for each model.

Model availability varies by region and account. The registry IDs are verified working in us-east-1, but individual models may not be enabled in your region or granted to your account. Models you can't access return a clear error (per-model in bedrock_compare); the rest still work. Enable models in the AWS Console under Bedrock > Model access.

Setup

Prerequisites

  • Node.js >= 20
  • AWS credentials configured (bearer token, env vars, ~/.aws/credentials, SSO, or IAM role)
  • Bedrock model access enabled in your AWS account (request access in the AWS Console under Bedrock > Model access)

Install and Build

git clone https://github.com/Sagargupta16/bedrock-multi-model-mcp.git
cd bedrock-multi-model-mcp
npm install
npm run build

Configure in Claude Code

Add to your Claude Code MCP settings (~/.claude.json):

{
  "mcpServers": {
    "bedrock": {
      "command": "node",
      "args": ["/path/to/bedrock-multi-model-mcp/dist/index.js"],
      "env": {
        "AWS_BEARER_TOKEN_BEDROCK": "ABSK...",
        "AWS_REGION": "us-east-1"
      }
    }
  }
}

Environment Variables

VariableDefaultDescription
AWS_REGIONus-east-1AWS region for Bedrock API calls
AWS_BEARER_TOKEN_BEDROCK-Bedrock API Key bearer token (recommended)
AWS_ACCESS_KEY_ID-AWS access key (if not using bearer token/SSO)
AWS_SECRET_ACCESS_KEY-AWS secret key (if not using bearer token/SSO)
AWS_PROFILE-Named AWS profile from ~/.aws/credentials
BEDROCK_MCP_OUTPUT_DIRcwd (or ~/bedrock-images if cwd is not writable)Default output directory for generated images. Overridden by the output_dir tool arg. Directory is auto-created.

Authentication

The server supports two auth methods:

  1. Bedrock API Key (bearer token) - Set AWS_BEARER_TOKEN_BEDROCK. The SDK (v3.840.0+) reads this automatically. If the SDK fails, falls back to raw HTTP with Authorization: Bearer header.
  2. IAM credentials - Standard AWS credential chain (env vars, profile, SSO, IAM role).

Usage Examples

Ask a single model

"Use bedrock_ask to ask llama4 to explain Docker in 3 sentences"

Compare models

"Use bedrock_compare with llama4, nova-pro, and mistral-large: What are the pros and cons of microservices?"

Generate an image

"Use bedrock_generate_image with stable-ultra: A futuristic Tokyo street at night, neon lights, rain"

Generate a video

"Use bedrock_generate_video: Closeup of ocean waves crashing on rocks at sunset, s3_uri: s3://my-bucket/videos/"

Compare text similarity

"Use bedrock_embed_similarity to compare: 'a cat', 'a kitten', 'a car'"

Architecture

src/
  index.ts          # MCP server - tool registration, stdio transport
  models.ts         # Loads + validates text-model data, resolves aliases
  types.ts          # Zod schemas for model data validation
  bedrock/
    client.ts       # Shared region/auth config + raw HTTP fallback
    converse.ts     # Converse API wrapper (text models)
    image.ts        # InvokeModel wrapper (image models)
    video.ts        # Async invoke wrapper (video models)
    embed.ts        # InvokeModel wrapper (embeddings) + cosine similarity
  data/
    text-models.json       # Text model registry (data, not code)
    image-models.json      # Image model registry
    video-models.json      # Video model registry
    embedding-models.json  # Embedding model registry

Model definitions are data, kept in src/data/*.json and validated against Zod schemas at load time, so the catalog can be updated without changing logic. The build copies these JSON files into dist/data/.

  • Text: Uses the Converse API - unified interface across all text models
  • Image: Uses InvokeModel with model-specific request formats (handled internally)
  • Video: Uses StartAsyncInvoke - requires S3 bucket for output

License

MIT

Ver o original no GitHub

Bom para

Relacionados