Get the FREE Ultimate OpenClaw Setup Guide →

sdk-typescript

A model-driven approach to building AI agents in just a few lines of code.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio strands-agents-sdk-typescript uvx strands-agents/sdk-typescript-mcp-server@latest \
  --env MCP_LOG_LEVEL="info (optional; can be debug/trace)"

How to use

This MCP server integration focuses on enabling a TypeScript SDK to interact with external MCP tools via the Model Context Protocol. It demonstrates how to connect to an MCP server using the MCP client built into the Strands SDK and a local MCP transport (stdio-based). The MCP client lets you discover and invoke tools exposed by the MCP server, enabling your agent to call external capabilities in a structured, server-governed way. You can wire the MCP client directly as a tool within your agent, allowing seamless tool invocation from natural language prompts or structured commands. Examples show how to instantiate a client transport with a local MCP server, connect, and then use the client as a tool source for your agent. Finally, you can disconnect when your session ends or when you no longer need the MCP tools.

How to install

Prerequisites:

  • Node.js 18+ or 20+ installed
  • npm or pnpm available
  • Access to an MCP server package (or a local MCP server you want to run via UVX)

Step 1: Install Node.js and npm

Step 2: Install the MCP client tooling (via UVX) if you plan to run an MCP server locally

# Install UVX if not already installed (example; install method may vary)
npm install -g uvx

Step 3: Run the MCP server (via UVX) if needed

# Start the MCP server package as shown in the README example
uvx strands-agents/sdk-typescript-mcp-server@latest

Step 4: Install the Strands SDK in your project (for client-side usage)

npm install @strands-agents/sdk

Step 5: Use the MCP client in your code (example generic pattern)

import { McpClient } from '@strands-agents/sdk'
import { StdioClientTransport } from '@modelcontextprotocol/sdk/client/stdio.js'

const documentationTools = new McpClient({
  transport: new StdioClientTransport({
    command: 'uvx',
    args: ['strands-agents/sdk-typescript-mcp-server@latest'],
  }),
})

// Use documentationTools as a tool source for your agent

Additional notes

Tips and considerations:

  • Ensure the MCP server package name and version are correct when starting via UVX; replace with the exact package you intend to run.
  • If the MCP server exposes authentication or access control, configure environment variables or transport options accordingly.
  • When using the Stdio transport, the MCP server runs as a separate process; manage its lifecycle (start/stop) alongside your agent.
  • Use descriptive tool names and schemas on the MCP server side to maximize TypeScript type safety in your agent.
  • Monitor logs in MCP_TRANSPORT and MCP_SERVER environments to troubleshoot connectivity or tool discovery issues.

Related MCP Servers

Sponsor this space

Reach thousands of developers