Claude Agent SDK (TypeScript) vs Mastra
Claude Agent SDK (TypeScript) and Mastra are both agent frameworks for TypeScript. Claude Agent SDK (TypeScript) is published by Anthropic and Mastra by Mastra. On GitHub, Mastra has 29,050 stars and Claude Agent SDK (TypeScript) has 1,831. Both were last active in Oct 2026. The table lines up where they differ (publisher, GitHub stars, weekly downloads and category) and has the install commands for both. Everything here comes from the listings' public sources and is refreshed daily. Claude Agent SDK (TypeScript) describes itself as: TypeScript SDK that gives programs Claude Code's built-in tools for reading, editing and running code, installed from npm. Mastra: TypeScript framework for AI agents and apps with graph-based workflows, memory, suspend-and-resume approvals, MCP servers and model routing.
Updated Oct 26, 2026 · Built from catalog data; how we rank and grade
Claude Agent SDK (TypeScript)
Anthropic
TypeScript SDK that gives programs Claude Code's built-in tools for reading, editing and running code, installed from npm.
Mastra
Mastra
TypeScript framework for AI agents and apps with graph-based workflows, memory, suspend-and-resume approvals, MCP servers and model routing.
Who should pick which
- Pick Mastra if you want MCP support built in.
- Pick Mastra if you want a stable release (Claude Agent SDK (TypeScript) is marked beta).
- Mastra has the larger community: 29,050 GitHub stars against 1,831.
From listing data only. We don't pick a winner on security beyond the grades; read how grades work.
Side by side
| Fact | Claude Agent SDK (TypeScript) | Mastra |
|---|---|---|
| Type | Harness | Harness |
| Publisher | Anthropic | Mastra |
| License | License unknown | License unknown |
| Pricing | Not stated | Not stated |
| Runs | Not stated | Not stated |
| Auth | Not stated | Not stated |
| Hosts supported | Not stated | Not stated |
| Tools | Not listed yet | Not listed yet |
| Security grade | –Security: not graded yet | –Security: not graded yet |
| Freshness grade | AFreshness: A | AFreshness: A |
| GitHub stars | 1,831 | 29,050 |
| Weekly downloads | 8,074,182 | 1,442,185 |
| Last release | Oct 23, 2026 | Oct 21, 2026 |
| Last activity | Oct 23, 2026 | Oct 24, 2026 |
Facts from each listing's public sources, checked daily. Tool lists arrive with tool scans.
Install
Claude Agent SDK (TypeScript)
npm install @anthropic-ai/claude-agent-sdk
Mastra
npm install @mastra/core
Also consider
- 0.867score
Pi Agent Core
Earendil
Minimal TypeScript agent harness with an agent runtime, multi-provider LLM API, terminal UI and coding agent CLI that users extend themselves.
HarnessAFreshness: A★ 117.6K↓ 5.1M/wk - 0.831score
CopilotKit
CopilotKit
Open-source SDK that connects AI agents to app front ends with chat UI, generative UI, shared state and human approvals; creator of the AG-UI protocol.
HarnessAFreshness: A★ 38.2K↓ 286.2K/wk - 0.740score
Deep Agents
LangChain
Opinionated agent harness on LangGraph with sub-agents, filesystem access, context management, persistent memory and approval of tool calls.
HarnessAFreshness: A★ 30.6K↓ 1.9M/wk
Questions
- Is Claude Agent SDK (TypeScript) or Mastra more popular?
- Mastra has more GitHub stars (29,050 against 1,831). Stars measure attention, not quality, so check freshness and docs too.
- Are Claude Agent SDK (TypeScript) and Mastra open source?
- Neither has an open-source license on record.
Related
- AlternativesAlternatives to Claude Agent SDK (TypeScript)
- AlternativesAlternatives to Mastra
- Best ofBest agent frameworks for building AI agents
- Best ofBest agent frameworks for TypeScript
- ComparisonClaude Agent SDK (TypeScript) vs Pi Agent Core
- ComparisonClaude Agent SDK (TypeScript) vs CopilotKit
- ComparisonClaude Agent SDK (TypeScript) vs Deep Agents
- ComparisonMastra vs Pi Agent Core
- ComparisonCopilotKit vs Mastra
- ComparisonLetta vs Mastra
Cite this page
Claude Agent SDK (TypeScript) vs Mastra. Agent Mart. https://agentmart.dev/compare/claude-agent-sdk-typescript-vs-mastra (last updated 2026-10-26)