Guide · AWS Chime SDK · Four-Package Split, AppInstance & Identity

AWS Chime SDK for MCP Servers — Four-Package Split, AppInstance Setup, and Identity Model

AWS Chime SDK is split across four separate npm packages — @aws-sdk/client-chime-sdk-identity, @aws-sdk/client-chime-sdk-messaging, @aws-sdk/client-chime-sdk-meetings, and @aws-sdk/client-chime-sdk-media-pipelines — each routing to a different AWS service endpoint. The first-hour failure when building MCP server tools against Chime SDK is reaching for the legacy @aws-sdk/client-chime package, which covers only classic Chime account management and has been deprecated for the communication use cases. This guide covers the architecture of all four packages, the AppInstance namespace that underpins Chime SDK Messaging, the AppInstanceUser identity model, the ChimeBearer header that substitutes for SigV4 caller identity in messaging calls, and the IAM principals required for each sub-service.

TL;DR

AWS Chime SDK has four npm packages: chime-sdk-identity (AppInstance management), chime-sdk-messaging (channels + messages), chime-sdk-meetings (video/audio meetings + attendees), and chime-sdk-media-pipelines (capture + live connector + insights pipelines). The old @aws-sdk/client-chime package does not expose these APIs — install the split packages separately. All Chime SDK Messaging resources live under an AppInstance, which must be created before channels, users, or admins can be added. Every Messaging API call identifies the acting user via a ChimeBearer parameter (an AppInstanceUser ARN), not the IAM principal — MCP tools acting on the system's behalf use a designated service user ARN. Meetings are independent of the AppInstance; they require only an IAM principal with the chime:CreateMeeting permission.

Why the package split matters for MCP servers

When AWS evolved Chime SDK from a monolithic communication service into a set of composable building blocks, they intentionally split the client surface to give each sub-service an independent release cadence. The consequence for MCP server authors is that there is no single import point for the entire Chime SDK. A server that exposes tools for messaging, meetings, and media capture must install and instantiate three to four separate AWS SDK clients.

Each client uses a different AWS service endpoint internally. ChimeSDKIdentity calls go to identity-chime.{region}.amazonaws.com. ChimeSDKMessaging calls go to messaging-chime.{region}.amazonaws.com. ChimeSDKMeetings calls go to meetings-chime.{region}.amazonaws.com. ChimeSDKMediaPipelines calls go to media-pipelines-chime.{region}.amazonaws.com. AWS SDK v3 constructs these endpoints automatically when you instantiate the correct client class — you do not need to set a manual endpoint URL as was required with older SDK versions.

Region availability matters. As of late 2026, Chime SDK Messaging is available in us-east-1, us-west-2, eu-west-1, ap-southeast-1, and ap-northeast-1. Chime SDK Meetings adds more regions including several EU and APAC regions. Media Pipelines has a narrower region list — verify at the AWS documentation for your deployment region before provisioning AppInstances or capture pipelines, because the AppInstance region is permanent after creation.

For MCP servers, the natural split is: use the Identity client once during setup to provision AppInstances and AppInstanceUsers, use the Messaging client for channel-based communication tools, use the Meetings client for video/audio meeting lifecycle tools, and optionally wire the Media Pipelines client for recording and AI analysis tools. Many MCP server implementations only need one or two of these sub-services — do not install all four packages if your use case is limited to one sub-service.

Package installation and client setup

Install only the sub-service packages you need. Each package independently follows AWS SDK v3 modular architecture — tree-shaking removes unused commands at build time.

npm install \
  @aws-sdk/client-chime-sdk-identity \
  @aws-sdk/client-chime-sdk-messaging \
  @aws-sdk/client-chime-sdk-meetings \
  @aws-sdk/client-chime-sdk-media-pipelines

Instantiate one client per sub-service. All four clients accept the same constructor options (region, credentials, endpoint override).

import { ChimeSDKIdentityClient } from '@aws-sdk/client-chime-sdk-identity';
import { ChimeSDKMessagingClient } from '@aws-sdk/client-chime-sdk-messaging';
import { ChimeSDKMeetingsClient } from '@aws-sdk/client-chime-sdk-meetings';
import { ChimeSDKMediaPipelinesClient } from '@aws-sdk/client-chime-sdk-media-pipelines';

const region = process.env.CHIME_REGION ?? 'us-east-1';

const identityClient = new ChimeSDKIdentityClient({ region });
const messagingClient = new ChimeSDKMessagingClient({ region });
const meetingsClient = new ChimeSDKMeetingsClient({ region });
const pipelinesClient = new ChimeSDKMediaPipelinesClient({ region });

Store each client as a module-level singleton. MCP servers are long-running processes — do not construct clients inside tool handler callbacks, as this recreates the credential provider chain on every tool invocation.

AppInstance: the root namespace for Chime SDK Messaging

An AppInstance is the top-level container for all Chime SDK Messaging resources: channels, channel memberships, channel flows, and app instance users. All Messaging API calls are scoped to exactly one AppInstance — you cannot create a channel without an AppInstance, and you cannot query channels across AppInstances from a single API call.

Most production deployments use one AppInstance per application environment (one for staging, one for production). An AppInstance is permanent; AWS does not support deleting an AppInstance once it has been created, and the ARN is embedded in every resource ARN under it. Plan AppInstance regions carefully.

import {
  CreateAppInstanceCommand,
  DescribeAppInstanceCommand,
} from '@aws-sdk/client-chime-sdk-identity';

async function getOrCreateAppInstance(name: string): Promise<string> {
  // Check if already created (store in env or Parameter Store)
  const existingArn = process.env.CHIME_APP_INSTANCE_ARN;
  if (existingArn) return existingArn;

  const response = await identityClient.send(
    new CreateAppInstanceCommand({
      Name: name,
      // ClientRequestToken provides idempotency for creation
      ClientRequestToken: `app-instance-${name}-v1`,
      Metadata: JSON.stringify({ environment: 'production' }),
    })
  );

  const arn = response.AppInstanceArn!;
  console.log(`Created AppInstance: ${arn}`);
  return arn;
}

The ClientRequestToken parameter makes CreateAppInstance idempotent — if called again with the same token, it returns the existing AppInstance rather than creating a duplicate. Use a stable token (not a random UUID) so that repeated calls are safe. The AppInstance ARN format is arn:aws:chime:us-east-1:123456789012:app-instance/{uuid}.

After creation, persist the AppInstance ARN to AWS Systems Manager Parameter Store or an environment variable. Every subsequent Chime SDK Messaging API call requires this ARN, either explicitly in the request body or as the prefix for resource ARNs.

AppInstanceUser: the identity model

Unlike IAM-based AWS services where the caller identity comes from the signed request, Chime SDK Messaging uses a separate identity layer. Every channel membership, message, and moderation action is associated with an AppInstanceUser, not an IAM principal. The IAM principal authenticates the API request; the AppInstanceUser is the logical identity within Chime's messaging layer.

AppInstanceUsers are created with an AppInstanceUserId that you define — typically your application's user UUID. The ARN format is arn:aws:chime:us-east-1:123456789012:app-instance/{instanceId}/user/{userId}. This ARN is what appears as the sender in channel messages and as the member in channel memberships.

import {
  CreateAppInstanceUserCommand,
  DescribeAppInstanceUserCommand,
} from '@aws-sdk/client-chime-sdk-identity';

async function ensureAppInstanceUser(
  appInstanceArn: string,
  userId: string,
  displayName: string
): Promise<string> {
  const userArn = `${appInstanceArn}/user/${userId}`;

  try {
    // Check if user already exists
    await identityClient.send(
      new DescribeAppInstanceUserCommand({ AppInstanceUserArn: userArn })
    );
    return userArn;
  } catch (err: any) {
    if (err.name !== 'NotFoundException') throw err;
  }

  // User doesn't exist — create
  const response = await identityClient.send(
    new CreateAppInstanceUserCommand({
      AppInstanceArn: appInstanceArn,
      AppInstanceUserId: userId,
      Name: displayName,
      // ExpirationSettings can auto-delete inactive users after a period
      ExpirationSettings: {
        ExpirationDays: 90,
        ExpirationCriterion: 'CREATED_TIMESTAMP',
      },
    })
  );

  return response.AppInstanceUserArn!;
}

The ExpirationSettings feature (added in 2023) automatically deletes AppInstanceUsers who have not interacted past a threshold, preventing unbounded growth in long-running applications. For MCP server use cases where users map to AI agent sessions, setting a 90-day expiration keeps the AppInstance clean without manual pruning.

For MCP server tools that perform administrative actions (create channels, ban users, delete messages) without acting as a specific end user, create a dedicated service user AppInstanceUser and use its ARN as the ChimeBearer in those calls. This separates system operations from user-initiated actions in audit logs and channel history.

const SERVICE_USER_ID = 'mcp-service-user';

export async function getServiceUserArn(appInstanceArn: string): Promise<string> {
  return ensureAppInstanceUser(
    appInstanceArn,
    SERVICE_USER_ID,
    'MCP Service Bot'
  );
}

AppInstanceAdmin: elevated permissions within messaging

An AppInstanceAdmin is an AppInstanceUser with administrative rights within the AppInstance. Admins can read and moderate all channels regardless of membership, delete any message, and retrieve channel membership lists for channels they did not join. The admin role is separate from IAM — an AppInstanceAdmin has expanded powers only within the Chime Messaging layer, not in AWS IAM.

import {
  CreateAppInstanceAdminCommand,
  ListAppInstanceAdminsCommand,
} from '@aws-sdk/client-chime-sdk-identity';

async function promoteToAdmin(
  appInstanceArn: string,
  userArn: string
): Promise<void> {
  await identityClient.send(
    new CreateAppInstanceAdminCommand({
      AppInstanceAdminArn: userArn,
      AppInstanceArn: appInstanceArn,
    })
  );
}

Promote the service user to AppInstanceAdmin at setup time. Without admin status, the service user's Messaging calls fail with ForbiddenException when operating on channels it has not joined — a confusing failure mode when the service user has full IAM permissions but lacks in-AppInstance admin rights.

The ChimeBearer parameter

Every Chime SDK Messaging API call requires a ChimeBearer parameter containing the ARN of the AppInstanceUser performing the action. This is the most common source of BadRequestException for developers new to Chime SDK — the parameter is required but easy to miss because it looks like optional metadata rather than mandatory identity context.

import {
  CreateChannelCommand,
  SendChannelMessageCommand,
  ListChannelMessagesCommand,
} from '@aws-sdk/client-chime-sdk-messaging';

// All Messaging calls require ChimeBearer
const response = await messagingClient.send(
  new CreateChannelCommand({
    AppInstanceArn: appInstanceArn,
    Name: 'support-channel',
    Mode: 'RESTRICTED',
    Privacy: 'PRIVATE',
    ChimeBearer: serviceUserArn, // mandatory
    ClientRequestToken: 'channel-support-v1',
  })
);

The ChimeBearer value is an AppInstanceUser ARN, not an IAM ARN. The SDK does not infer it from the credential chain. If your MCP tool wraps a Messaging call and you forget to pass ChimeBearer, the SDK throws a client-side validation error before the request reaches AWS. If you pass an ARN with a typo or a non-existent user, the service returns NotFoundException for the user, not UnauthorizedException — another confusing failure path.

For MCP server tools, the standard pattern is to accept an optional actingUserArn parameter in the tool input schema and fall back to the service user ARN when not provided. This lets agent orchestrators invoke tools on behalf of specific users when that context is available, while administrative tools default to the service user.

server.tool(
  'create_chime_channel',
  'Create a new Chime SDK Messaging channel',
  {
    name: z.string().describe('Channel display name'),
    mode: z.enum(['UNRESTRICTED', 'RESTRICTED']).default('UNRESTRICTED'),
    privacy: z.enum(['PUBLIC', 'PRIVATE']).default('PUBLIC'),
    actingUserArn: z.string().optional().describe('AppInstanceUser ARN of acting user (defaults to service user)'),
  },
  async ({ name, mode, privacy, actingUserArn }) => {
    const bearer = actingUserArn ?? await getServiceUserArn(appInstanceArn);
    const result = await messagingClient.send(
      new CreateChannelCommand({
        AppInstanceArn: appInstanceArn,
        Name: name,
        Mode: mode,
        Privacy: privacy,
        ChimeBearer: bearer,
        ClientRequestToken: `channel-${Date.now()}`,
      })
    );
    return { content: [{ type: 'text', text: result.ChannelArn! }] };
  }
);

IAM permissions per sub-service

Each Chime SDK sub-service uses a different IAM action namespace. The IAM principal running the MCP server needs permissions from the correct namespace for each client it uses.

Sub-serviceIAM namespaceKey permissions
Identity chime:*AppInstance* CreateAppInstance, CreateAppInstanceUser, CreateAppInstanceAdmin, DescribeAppInstanceUser
Messaging chime:*Channel* CreateChannel, SendChannelMessage, ListChannelMessages, CreateChannelMembership, CreateChannelBan
Meetings chime:*Meeting*, chime:*Attendee* CreateMeeting, DeleteMeeting, CreateAttendee, BatchCreateAttendee, GetAttendee
Media Pipelines chime:*MediaCapturePipeline*, chime:*MediaInsightsPipeline* CreateMediaCapturePipeline, DeleteMediaCapturePipeline, CreateMediaInsightsPipeline

Chime SDK does not support resource-level ARN conditions for most actions — the standard policy grants chime:* scoped by namespace. Scope the IAM policy to only the sub-service namespaces your MCP server uses; a meetings-only server should not have chime:CreateChannel.

Media Pipelines additionally requires s3:PutObject on the target S3 bucket (for capture pipelines) and kinesisvideo:PutMedia (for insights pipelines using Kinesis Video Streams as a source). The service principal chime.amazonaws.com must be listed in the S3 bucket policy — an IAM policy on the execution role alone is insufficient for capture destinations.

Region and endpoint constraints summary

Chime SDK services are not available in all AWS regions. Use the following guidance for region selection:

Sub-servicePrimary regions (as of 2026)Constraint
Identity + Messaging us-east-1, us-west-2, eu-west-1, ap-southeast-1, ap-northeast-1 AppInstance region is permanent — cannot migrate after creation
Meetings us-east-1, us-west-2, eu-central-1, ap-southeast-1, ap-northeast-1 + others MediaRegion in CreateMeeting should match attendee geography
Media Pipelines us-east-1, us-west-2, eu-central-1, ap-southeast-1 Capture pipeline must be in same region as the meeting

Always verify current region support in the AWS documentation before choosing an AppInstance region. The AppInstance region constraint is the most critical — once you deploy users and channels, you cannot move the AppInstance to a different region. For multi-region resilience, AWS recommends separate AppInstances per region with application-level routing rather than attempting to cross-region a single AppInstance.

MCP server wiring: initializing Chime SDK at startup

The standard pattern for a Chime SDK–backed MCP server is to resolve the AppInstance ARN and service user ARN at process startup, then capture those values in module-level constants for use across all tool handlers.

import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
import { z } from 'zod';
import { ChimeSDKIdentityClient } from '@aws-sdk/client-chime-sdk-identity';
import { ChimeSDKMessagingClient } from '@aws-sdk/client-chime-sdk-messaging';
import { ChimeSDKMeetingsClient } from '@aws-sdk/client-chime-sdk-meetings';

const region = process.env.CHIME_REGION ?? 'us-east-1';
const identityClient = new ChimeSDKIdentityClient({ region });
const messagingClient = new ChimeSDKMessagingClient({ region });
const meetingsClient = new ChimeSDKMeetingsClient({ region });

let APP_INSTANCE_ARN: string;
let SERVICE_USER_ARN: string;

async function init() {
  APP_INSTANCE_ARN = await getOrCreateAppInstance('my-app');
  SERVICE_USER_ARN = await ensureAppInstanceUser(
    APP_INSTANCE_ARN, 'mcp-service', 'MCP Service'
  );
  await promoteToAdmin(APP_INSTANCE_ARN, SERVICE_USER_ARN);
}

const server = new McpServer({ name: 'chime-sdk', version: '1.0.0' });

// Register tools here (all tools close over APP_INSTANCE_ARN and SERVICE_USER_ARN)

await init();
const transport = new StdioServerTransport();
await server.connect(transport);

Calling init() before connecting the transport ensures that the AppInstance ARN is available when the first tool call arrives. If init() throws (e.g., missing IAM permissions), the process exits before accepting any connections — a fail-fast pattern that surfaces misconfiguration immediately rather than failing silently on the first tool call.

Production gotchas

GotchaSymptomFix
Using @aws-sdk/client-chime for messaging or meetings TypeScript type errors; API methods for channels/meetings not found Install @aws-sdk/client-chime-sdk-messaging and @aws-sdk/client-chime-sdk-meetings separately — the monolithic client only covers classic Chime
Missing ChimeBearer parameter BadRequestException: ChimeBearer is required from Messaging API Pass AppInstanceUser ARN in every Messaging call — it is mandatory even when acting as an IAM admin
Service user not promoted to AppInstanceAdmin ForbiddenException when tool tries to list or moderate a channel the service user did not join Call CreateAppInstanceAdmin for the service user ARN once at setup
AppInstance in wrong region NotFoundException when calling Messaging from a client in a different region Always instantiate Messaging client with the same region as the AppInstance — not a default region from the environment
Assuming AppInstance can be deleted or migrated Stuck with a misconfigured AppInstance in a region that doesn't support desired features Plan region carefully before creating AppInstance — it is permanent; create a new AppInstance if migration is needed and drain users programmatically
Constructing user ARN manually from wrong format NotFoundException for the user even though it exists ARN format is {appInstanceArn}/user/{userId} — always derive from the AppInstance ARN, do not hardcode the arn:aws:chime prefix independently
Meetings client used for Messaging UnknownOperation or HTTP 404 on CreateChannel Messaging and Meetings are separate clients with different endpoints — do not mix up client instances in tool handlers

Related pages