简报·YT
← 返回 GitHub 动态
anthropics/anthropic-sdk-python · 📌 手动指定 已完成

anthropics/anthropic-sdk-python v0.120.2

2026-07-28 17:38 · ⭐ 3781 · GitHub Release 原文 ↗
#版本更新 #Bug修复 #MCP兼容

anthropics/anthropic-sdk-python v0.120.2

此版本主要修复了 MCP(Model Context Protocol)模块中 SDK 版本兼容性问题,使其能同时支持 MCP SDK v1 和 v2。

▸ Release Notes 英文原文(385 字符)
## 0.120.2 (2026-07-28) Full Changelog: [v0.120.1...v0.120.2](https://github.com/anthropics/anthropic-sdk-python/compare/v0.120.1...v0.120.2) ### Bug Fixes * **mcp:** support mcp sdk v2 alongside v1 ([#300](https://github.com/anthropics/anthropic-sdk-python/issues/300)) ([177f88c](https://github.com/anthropics/anthropic-sdk-python/commit/177f88ccd7f966e47b654cb19ad0e9cfa4c58ac2))
▸ 主项目介绍 · anthropics/anthropic-sdk-python
▸ README 原文(同步于 2026-07-19 13:24)
# Claude SDK for Python [![PyPI version](https://img.shields.io/pypi/v/anthropic.svg)](https://pypi.org/project/anthropic/) The Claude SDK for Python provides access to the [Claude API](https://docs.anthropic.com/en/api/) from Python applications. ## Documentation Full documentation is available at **[platform.claude.com/docs/en/api/sdks/python](https://platform.claude.com/docs/en/api/sdks/python)**. ## Installation ```sh pip install anthropic ``` ## Getting started ```python import os from anthropic import Anthropic client = Anthropic( api_key=os.environ.get("ANTHROPIC_API_KEY"), # This is the default and can be omitted ) message = client.messages.create( max_tokens=1024, messages=[ { "role": "user", "content": "Hello, Claude", } ], model="claude-opus-4-6", ) print(message.content) ``` ## Requirements Python 3.9+ ## Contributing See [CONTRIBUTING.md](./CONTRIBUTING.md). ## License This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.