---
title: "Mastra：機能、バージョン、クイックスタート · DotsAgent"
description: "Mastra が提供する Mastra のライセンス、最新バージョン、MCP 対応、耐久性のある実行、人間による承認、トレーシング、評価機能を紹介。コピーして使えるクイックスタート付き。"
url: https://dotsagent.io/ja/frameworks/mastra
---

Framework · Mastra

# Mastra の概要

エージェント、一時停止・再開に対応したワークフロー、メモリ、評価機能、Studio UIを1つのパッケージにまとめたTypeScriptフレームワークです。Next.js、Express、Honoのアプリに組み込めます。コア部分はApache-2.0ライセンスですが、ee/ディレクトリはエンタープライズライセンスです。

**おすすめの用途：**  エージェント、ワークフロー、メモリ、評価機能を単一のスタックにまとめたいTypeScriptチーム。

## 基本情報

- **メンテナー**: Mastra
- **言語**: TypeScript
- **ライセンス**: Apache-2.0 (core)
- **最新バージョン**: `@mastra/core 1.73.0` · 2026年10月1日
- **リポジトリ**: [mastra-ai/mastra](https://github.com/mastra-ai/mastra) · 28,467 スター
- **ホスティング विकल्प**: [Mastra Cloud / Mastra Platform](https://mastra.ai/docs)mastra deployでDockerイメージをビルドしてデプロイします。

## クイックスタート

パッケージをインストールして認証情報を設定し、公式ドキュメントにある最小構成のエージェントを実行します。モデル ID はドキュメントで使われているものです。アカウントで有効になっていない場合があります。

`インストール`

```
npm install @mastra/core@latest zod@latest typescript@latest @types/node@latest mastra@latest  (or scaffold: npm create mastra@latest)
```

OPENAI_API_KEY が必要

`TypeScript`

```
// src/mastra/agents/weather-agent.ts
import { Agent } from '@mastra/core/agent'
import { weatherTool } from '../tools/weather-tool.ts'

export const weatherAgent = new Agent({
  id: 'weather-agent',
  name: 'Weather Agent',
  instructions: `
      You are a helpful weather assistant that provides accurate weather information.

      Your primary function is to help users get weather details for specific locations. When responding:
      - Include relevant details like humidity, wind conditions, and precipitation
      - Keep responses concise but informative

      Use the weatherTool to fetch current weather data.
`,
  // Use a string in provider/model format, not provider:model or a provider object.
  model: 'openai/gpt-5.6-sol',
  tools: { weatherTool },
})

// run.mjs (after registering the agent in src/mastra/index.ts)
import { mastra } from './src/mastra/index.ts'

const agent = mastra.getAgentById('weather-agent')
const response = await agent.generate('Weather in SF')
console.log(response.text)
```

[クイックスタートの参照元](https://mastra.ai/docs)

## 機能

| 任意のモデル | — | provider/model形式のモデルルーター文字列に対応 |
| --- | --- | --- |
| MCPクライアント | — | — |
| MCPサーバー | — | MCPServerでエージェント、ツール、ワークフロー、プロンプト、リソースを公開 |
| マルチエージェント | — | エージェントを別のエージェントのツールとして利用可能 |
| 耐久性のある実行 | — | libSQL、Postgresなどにスナップショットを保存して一時停止・再開 |
| 人による承認 | — | suspend()とresume()で人間からの入力を受け付け |
| トレーシング | — | Langfuse、Braintrust、Datadog、LangSmith向けのOTelエクスポーター |
| Evals | — | サンプリングを使った実行時評価と、CIでのオフライン評価に対応 |

## 最近の変更

- npm create mastraで、ワークスペース、シェルツール、メモリ、スケジュールを備えた汎用ハーネスを生成できるようになりました。
- Mastra Factoryは、コーディングエージェントで構成するソフトウェアファクトリーを対象としています。

## 同じ言語の代替ツール

- [OpenAI Agents SDK (JS)](https://dotsagent.io/ja/frameworks/openai-agents-js)

- [Claude Agent SDK](https://dotsagent.io/ja/frameworks/claude-agent-sdk)

- [Google ADK](https://dotsagent.io/ja/frameworks/google-adk)

- [LangGraph](https://dotsagent.io/ja/frameworks/langgraph)

- [LlamaIndex](https://dotsagent.io/ja/frameworks/llamaindex)

- [Vercel AI SDK](https://dotsagent.io/ja/frameworks/vercel-ai-sdk)

## 参照元

1. [mastra.ai](https://mastra.ai/docs)/docs
2. [mastra.ai](https://mastra.ai/docs/connections/mcp)/docs/connections/mcp
3. [mastra.ai](https://mastra.ai/reference/tools/mcp-server)/reference/tools/mcp-server
4. [mastra.ai](https://mastra.ai/docs/workflows/suspend-and-resume)/docs/workflows/suspend-and-resume
5. [mastra.ai](https://mastra.ai/docs/workflows/snapshots)/docs/workflows/snapshots
6. [mastra.ai](https://mastra.ai/ai-agent-observability)/ai-agent-observability
7. [github.com](https://github.com/mastra-ai/mastra/blob/main/LICENSE.md)/mastra-ai/mastra/blob/main/LICENSE.md
8. [registry.npmjs.org](https://registry.npmjs.org/@mastra%2fcore)/@mastra%2fcore

AIエージェント開発者向けの独立したリファレンスです。ここに記載されているいずれのベンダーとも提携していません。

© 2026 DotsAgent · 確認日: 2026年10月1日
