4 ファイル変更 +39 -9

この更新の概要

Python SDKの動作要件としてPython 3.10以降が必要であることが明記され、Windows環境を含む詳細なセットアップ手順が拡充されました。MCPサーバーの接続オプションにWebSocket (WS) トランスポートが新しく追加され、双方向通信を必要とするリモートサーバーの利用が可能になっています。また、プラグインマーケットプレイスの登録名に関する仕様が整理され、同一名称での重複登録時の挙動や複数プラグインの管理方法が定義されました。全体として、開発環境の構築と外部連携機能の柔軟性を高めるアップデート内容となっています。

agent-sdk/overview +2 -0

Python 3.10以降が必要であるという動作要件と、バージョンを確認するためのOS別コマンドが追加されました。

@@ -52,6 +52,8 @@ npm install @anthropic-ai/claude-agent-sdk
pip install claude-agent-sdk
```
The Python package requires Python 3.10 or later. If pip reports `No matching distribution found for claude-agent-sdk`, your interpreter is older than 3.10. Run `python3 --version` on macOS or Linux, or `py --version` on Windows, to check.
The TypeScript SDK bundles a native Claude Code binary for your platform as an optional dependency, so you don't need to install Claude Code separately.
Get an API key from the [Console](https://platform.claude.com/), then set it as an environment variable:
agent-sdk/quickstart +21 -6

Windows環境での仮想環境構築とパッケージインストールの手順が追加され、PowerShellの実行ポリシーに関する注意書きが補完されました。

@@ -25,7 +25,8 @@ Use the Agent SDK to build an AI agent that reads your code, finds bugs, and fix
Create a new directory for this quickstart:
```bash theme={null}
mkdir my-agent && cd my-agent
mkdir my-agent
cd my-agent
```
For your own projects, you can run the SDK from any folder; it will have access to files in that directory and its subdirectories by default.
@@ -36,19 +37,33 @@ Install the Agent SDK package for your language:
npm install @anthropic-ai/claude-agent-sdk
```
[uv Python package manager](https://docs.astral.sh/uv/) is a fast Python package manager that handles virtual environments automatically:
[uv](https://docs.astral.sh/uv/) is a fast Python package manager that handles virtual environments automatically:
```bash theme={null}
uv init && uv add claude-agent-sdk
uv init
uv add claude-agent-sdk
```
Create a virtual environment first, then install:
Create and activate a virtual environment, then install the package.
On macOS or Linux:
```bash theme={null}
python3 -m venv .venv && source .venv/bin/activate
pip3 install claude-agent-sdk
python3 -m venv .venv
source .venv/bin/activate
pip install claude-agent-sdk
```
On Windows:
```powershell theme={null}
py -m venv .venv
.venv\Scripts\Activate.ps1
pip install claude-agent-sdk
```
If PowerShell blocks `Activate.ps1` with an execution policy error, run `Set-ExecutionPolicy -Scope Process RemoteSigned` first.
The TypeScript SDK bundles a native Claude Code binary for your platform as an optional dependency, so you don't need to install Claude Code separately.
Get an API key from the [Claude Console](https://platform.claude.com/), then create a `.env` file in your project directory:
mcp +15 -2

新しいトランスポートタイプとしてWebSocketが追加され、接続設定のJSON形式やHTTPとの使い分けについての説明が追記されました。

@@ -48,7 +48,7 @@ Claude asks about your use case and scaffolds a remote HTTP or local stdio serve
## Installing MCP servers
MCP servers can be configured in three different ways depending on your needs:
MCP servers can be configured in several ways depending on your needs:
### Option 1: Add a remote HTTP server
@@ -112,6 +112,19 @@ For example:
This prevents conflicts between Claude's flags and the server's flags.
### Option 4: Add a remote WebSocket server
WebSocket servers hold a persistent bidirectional connection, which suits remote MCP servers that push events to Claude unprompted. Use HTTP instead when your server only responds to requests, since HTTP supports OAuth and the `claude mcp add --transport` flag, while WebSocket supports neither.
Configure WebSocket servers in `.mcp.json` or with `claude mcp add-json`:
```bash
claude mcp add-json events-server \
'{"type":"ws","url":"wss://mcp.example.com/socket","headers":{"Authorization":"Bearer YOUR_TOKEN"}}'
```
The `type: "ws"` entry accepts the same `url`, `headers`, `headersHelper`, `timeout`, and `alwaysLoad` fields as `http`. Authentication is header-only, so pass a static token in `headers` or generate one at connect time with [`headersHelper`](#use-dynamic-headers-for-custom-authentication). The `claude mcp add --transport` flag does not accept `ws`.
### Managing your servers
Once configured, you can manage your MCP servers with these commands:
@@ -214,7 +227,7 @@ Or inline in `plugin.json`:
- **Automatic lifecycle**: At session startup, servers for enabled plugins connect automatically. If you enable or disable a plugin during a session, run `/reload-plugins` to connect or disconnect its MCP servers
- **Environment variables**: use `${CLAUDE_PLUGIN_ROOT}` for bundled plugin files, `${CLAUDE_PLUGIN_DATA}` for [persistent state](/en/plugins-reference#persistent-data-directory) that survives plugin updates, and `${CLAUDE_PROJECT_DIR}` for the stable project root
- **User environment access**: Access to same environment variables as manually configured servers
- **Multiple transport types**: Support stdio, SSE, and HTTP transports (transport support may vary by server)
- **Multiple transport types**: Support stdio, SSE, HTTP, and WebSocket transports (transport support may vary by server)
**Viewing plugin MCP servers**:
plugin-marketplaces +1 -1

マーケットプレイス名が重複した場合の上書き仕様と、単一の定義ファイルで複数のプラグインを公開する方法について明記されました。

@@ -139,7 +139,7 @@ Each plugin entry needs at minimum a `name` and `source` (where to fetch it from
| Field | Type | Description | Example |
| :- | :- | :- | :- |
| `name` | string | Marketplace identifier (kebab-case, no spaces). This is public-facing: users see it when installing plugins (for example, `/plugin install my-tool@your-marketplace`). | `"acme-tools"` |
| `name` | string | Marketplace identifier (kebab-case, no spaces). This is public-facing: users see it when installing plugins (for example, `/plugin install my-tool@your-marketplace`). Each user can register only one marketplace per name: adding a second marketplace with the same name replaces the first. To publish multiple plugins under one marketplace name, list them all in a [single `marketplace.json`](#create-the-marketplace-file). | `"acme-tools"` |
| `owner` | object | Marketplace maintainer information ([see fields below](#owner-fields)) | |
| `plugins` | array | List of available plugins | See below |