Guide · Amazon Bedrock · Amazon Nova

MCP Server Amazon Nova Lite — 300k multimodal context, video and image inputs

Amazon Nova Lite is Amazon's low-cost multimodal model: it accepts text, images, video, and documents in a single Converse API request against a 300,000-token context window, at pricing competitive with Claude Haiku for image-heavy workloads. Two constraints catch MCP server authors by surprise when first using Nova Lite for video: video inputs require an S3 URI source — base64-encoded video is not accepted, unlike images which support both base64 and S3; and only one video is allowed per request, regardless of context window size, and the video must be 30 seconds or fewer (or at most 1,800 frames at 1 frame per second). Within those bounds, Nova Lite is well-suited for MCP tools that analyze screenshots, process uploaded PDFs, compare multiple product images, or extract data from short screen recordings. For pure text workloads where multimodal is not needed, Nova Micro is cheaper and faster. For complex multi-step reasoning over rich media, Nova Pro provides higher accuracy at higher cost.

TL;DR

Model ID: us.amazon.nova-lite-v1:0. Max output: 5120 tokens. Images: JPEG/PNG/GIF/WEBP, up to 20 per request, base64 or S3. Video: S3 URI only, max 1 per request, max 30 seconds. Documents: PDF/CSV/DOC/HTML/TXT/XLS/XLSX via base64 bytes. Use cross-region model IDs for production throughput.

Client setup and model IDs

Nova Lite uses the same @aws-sdk/client-bedrock-runtime package and ConverseCommand as other Bedrock models. Use the cross-region inference profile ID for production:

import {
  BedrockRuntimeClient,
  ConverseCommand,
  ConverseStreamCommand,
} from "@aws-sdk/client-bedrock-runtime";
import * as fs from "fs";

const client = new BedrockRuntimeClient({ region: "us-east-1" });

// Cross-region IDs (recommended for production throughput)
const NOVA_LITE_US = "us.amazon.nova-lite-v1:0";
const NOVA_LITE_EU = "eu.amazon.nova-lite-v1:0";
const NOVA_LITE_AP = "ap.amazon.nova-lite-v1:0";

// InferenceConfiguration — same constraints as Nova Micro
// maxTokens: 1–5120, temperature: 0–1, topP: 0–1
// topK is NOT supported — omit it entirely

Nova Lite's 300k context window is the largest in the Nova family (Nova Micro has 128k). However, multimodal content — particularly images and video frames — can consume context tokens rapidly. Each image typically uses 1,000–6,000 tokens depending on resolution; a 30-second video at 1fps can consume 30,000+ tokens. Plan context budgets accordingly when combining multiple media types in a single request.

Image inputs: base64 and S3 sources

Nova Lite accepts images as either base64-encoded bytes inline in the request or as S3 URIs. Base64 is simpler for small images served from memory; S3 URIs avoid the base64 encoding overhead and reduce request size for large images.

Base64 image input

import * as fs from "fs";

async function analyzeImage(imagePath: string, question: string): Promise {
  const imageBytes = fs.readFileSync(imagePath);
  const ext = imagePath.split(".").pop()?.toLowerCase() ?? "jpeg";
  const format = ext === "jpg" ? "jpeg" : ext as "jpeg" | "png" | "gif" | "webp";

  const response = await client.send(new ConverseCommand({
    modelId: "us.amazon.nova-lite-v1:0",
    messages: [{
      role: "user",
      content: [
        {
          image: {
            format,
            source: { bytes: imageBytes },
          },
        },
        { text: question },
      ],
    }],
    inferenceConfig: { maxTokens: 1024, temperature: 0.3 },
  }));

  if (response.stopReason === "max_tokens") {
    throw new Error("Response truncated — increase maxTokens");
  }
  return response.output?.message?.content?.find((b) => b.text)?.text ?? "";
}

Multi-image comparison (up to 20 images)

Nova Lite allows up to 20 image content blocks in a single request. This is useful for product image comparison, before/after analysis, or multi-frame inspection:

async function compareImages(
  imageBuffers: Buffer[],
  prompt: string
): Promise {
  if (imageBuffers.length > 20) {
    throw new Error("Nova Lite supports a maximum of 20 images per request");
  }

  const content = [
    ...imageBuffers.map((buf) => ({
      image: {
        format: "jpeg" as const,
        source: { bytes: buf },
      },
    })),
    { text: prompt },
  ];

  const response = await client.send(new ConverseCommand({
    modelId: "us.amazon.nova-lite-v1:0",
    messages: [{ role: "user", content }],
    inferenceConfig: { maxTokens: 2048, temperature: 0.5 },
  }));

  return response.output?.message?.content?.find((b) => b.text)?.text ?? "";
}

Video inputs: S3 URI required

Video input is the starkest difference between Nova Lite and other multimodal models. Base64 video is not accepted — you must supply an S3 URI. This means the video file must already be stored in an S3 bucket accessible to the Bedrock service, and the IAM role used by your MCP server must have s3:GetObject permission on that bucket.

async function analyzeVideo(
  s3Bucket: string,
  s3Key: string,
  question: string
): Promise {
  // S3 source is required — base64 video is not accepted by Nova Lite
  const videoUri = `s3://${s3Bucket}/${s3Key}`;

  const response = await client.send(new ConverseCommand({
    modelId: "us.amazon.nova-lite-v1:0",
    messages: [{
      role: "user",
      content: [
        {
          video: {
            format: "mp4",   // mp4, mov, avi, mkv, webm, flv, mpeg, mpg, wmv, 3gp
            source: {
              s3Location: {
                uri: videoUri,
                bucketOwner: process.env.AWS_ACCOUNT_ID, // optional but recommended
              },
            },
          },
        },
        { text: question },
      ],
    }],
    inferenceConfig: { maxTokens: 1024, temperature: 0.5 },
  }));

  return response.output?.message?.content?.find((b) => b.text)?.text ?? "";
}

The bucketOwner field in s3Location is optional but recommended in production. It prevents cross-account confused deputy attacks by asserting that the bucket is owned by your AWS account. Set it to your 12-digit AWS account ID via an environment variable.

Video duration and format limits

Nova Lite processes video at 1 frame per second up to a maximum of 1,800 frames. The effective maximum duration is therefore 30 minutes of content — but only if no other context tokens are present. In practice, with a system prompt and question, the video frame budget is lower. Video exceeding these limits returns a ValidationException before inference begins:

// Validate before invoking — avoids unnecessary API calls
function validateVideoConstraints(
  durationSeconds: number,
  videoCount: number
): void {
  if (videoCount > 1) {
    throw new Error(
      "Nova Lite accepts only one video per request. " +
      "Split multi-video analysis into separate requests."
    );
  }
  if (durationSeconds > 1800) {
    throw new Error(
      `Video duration ${durationSeconds}s exceeds Nova Lite maximum of 1800s. ` +
      "Trim or segment the video before uploading."
    );
  }
}

Document inputs: PDF, CSV, DOCX, and more

Nova Lite accepts structured documents via the document content block type. Documents are provided as base64-encoded bytes with a declared format. This is useful for MCP tools that need to extract data from uploaded PDFs, analyze spreadsheets, or process HTML reports:

async function analyzeDocument(
  fileBuffer: Buffer,
  format: "pdf" | "csv" | "doc" | "docx" | "html" | "txt" | "xls" | "xlsx",
  question: string
): Promise {
  const response = await client.send(new ConverseCommand({
    modelId: "us.amazon.nova-lite-v1:0",
    messages: [{
      role: "user",
      content: [
        {
          document: {
            format,
            name: `document.${format}`,
            source: { bytes: fileBuffer },
          },
        },
        { text: question },
      ],
    }],
    inferenceConfig: { maxTokens: 2048, temperature: 0 },
  }));

  if (response.stopReason === "max_tokens") {
    throw new Error("Document response truncated — reduce document length or increase maxTokens");
  }
  return response.output?.message?.content?.find((b) => b.text)?.text ?? "";
}

// MCP tool handler example
server.tool(
  "analyze_document",
  {
    fileBase64: z.string(),
    format: z.enum(["pdf", "csv", "docx", "txt", "xlsx"]),
    question: z.string(),
  },
  async ({ fileBase64, format, question }) => {
    const buffer = Buffer.from(fileBase64, "base64");
    const answer = await analyzeDocument(buffer, format, question);
    return { content: [{ type: "text", text: answer }] };
  }
);

The name field in the document block is required and should include the file extension. Nova Lite uses the name as a hint when multiple documents are in the same request. For multi-document analysis (e.g., compare two PDFs), include multiple document blocks with distinct names before the text question — but be aware that large PDFs will consume a large portion of the 300k context window.

Combining images and text: screenshot analysis tool

A common MCP tool pattern with Nova Lite is screenshot or UI analysis — the caller passes a screenshot as base64, and the tool describes UI elements, extracts text, or checks for errors:

import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
import { z } from "zod";

const server = new McpServer({ name: "vision-tools", version: "1.0.0" });

server.tool(
  "analyze_screenshot",
  {
    imageBase64: z.string().describe("Base64-encoded JPEG or PNG screenshot"),
    task: z.enum([
      "describe",
      "extract_text",
      "find_errors",
      "check_accessibility",
    ]),
  },
  async ({ imageBase64, task }) => {
    const prompts: Record = {
      describe: "Describe what you see in this screenshot in detail.",
      extract_text: "Extract all visible text from this screenshot, preserving layout where possible.",
      find_errors: "Identify any error messages, warnings, or broken UI elements visible in this screenshot.",
      check_accessibility: "Identify accessibility issues in this UI screenshot: missing alt text indicators, low contrast areas, small touch targets, or missing labels.",
    };

    const imageBuffer = Buffer.from(imageBase64, "base64");

    const response = await client.send(new ConverseCommand({
      modelId: "us.amazon.nova-lite-v1:0",
      messages: [{
        role: "user",
        content: [
          { image: { format: "jpeg", source: { bytes: imageBuffer } } },
          { text: prompts[task] },
        ],
      }],
      inferenceConfig: { maxTokens: 1024, temperature: 0.2 },
    }));

    const text = response.output?.message?.content?.find((b) => b.text)?.text ?? "";
    return { content: [{ type: "text", text }] };
  }
);

Production gotchas

Video requires S3 source — base64 video raises ValidationException

Unlike images, Nova Lite does not accept base64-encoded video. Attempting to pass video as bytes in the source field raises ValidationException: Video source type 'bytes' is not supported for this model. You must upload the video to S3 first. For MCP tools that receive video uploads from users, implement a pre-processing step that uploads the video to a designated S3 bucket before invoking Nova Lite.

Only one video content block per request is allowed

Requests with more than one video content block return ValidationException: Too many video content blocks (max: 1). If your tool needs to compare two video clips, you must run two separate API calls and synthesize the results yourself — there is no way to include both videos in a single request.

Image MIME type must match the declared format field

The format field in an image content block ("jpeg", "png", "gif", "webp") must accurately describe the actual image bytes. Declaring "png" while passing JPEG bytes may produce a ValidationException or garbled analysis. Always derive the format from the actual file header or file extension rather than accepting it unchecked from user input.

300k context is consumed by media tokens, not just text

Nova Lite's 300k token context window sounds large, but multimodal inputs shrink the effective space quickly. A 1024×768 image uses approximately 1,500–3,000 tokens. Twenty images can consume 60,000 tokens before any text is processed. A 10-minute video at 1fps (600 frames) may use 100,000+ tokens. Monitor response.usage.inputTokens and add guards in your MCP tool that reject requests likely to exceed the context budget before invoking the model.

Monitor your Nova Lite MCP tools with AliveMCP

AliveMCP provides uptime, latency, and error-rate monitoring for MCP servers using Amazon Nova Lite. When an image or video analysis tool goes down or starts returning slow responses, AliveMCP alerts you before your users notice.

Start free monitoring