Claude 5 + MCP 生态 2026:完整实战与生态全景
Claude 5 正式发布 + MCP 2.0 协议。Opus / Sonnet / Haiku 三档 + 百万上下文 + Claude Code SDK + MCP Server 市场。
今日技术简讯
📰 技术简讯 · 2026-09-02
今日聚合 6 条热门技术内容(中文素材优先)。
🤖 AI / LLM
1. Claude 5 正式发布
- 链接:https://anthropic.com/blog/claude-5
- 来源:Anthropic
- 摘要:Claude 5 推出 Opus / Sonnet / Haiku 三档,推理能力提升 40%,支持百万上下文。
2. MCP 协议 2.0 发布
- 链接:https://modelcontextprotocol.io/blog/2-0
- 来源:Anthropic
- 摘要:MCP 2.0 推出新传输协议 + 多模态支持,AI Agent 工具标准成熟。
🎨 前端 / Web
3. Claude Code SDK 1.0 推出
- 链接:https://docs.claude.com/en/docs/claude-code/sdk
- 来源:Anthropic
- 摘要:Claude Code SDK 1.0 推出,TypeScript / Python 原生,AI 编程助手必备。
4. MCP Server 官方市场
- 链接:https://mcp.so
- 来源:Anthropic
- 摘要:MCP Server 官方市场上线,500+ 预构建服务器,覆盖 GitHub / Slack / 数据库。
⚙️ 后端 / 架构
5. Claude Agent SDK 推出
- 链接:https://docs.claude.com/en/docs/agent-sdk
- 来源:Anthropic
- 摘要:Claude Agent SDK 推出完整 Agent 框架,对标 LangGraph / CrewAI。
🚀 独立开发 / OPC
6. 即刻"Claude 5"专题
- 链接:https://m.okjike.com/claude-5
- 来源:即刻
- 摘要:即刻 600+ 独立开发者分享 Claude 5 体验,编程 / Agent / 多模态。
数据来源:掘金 / InfoQ 中文 / 即刻 / 少数派 / HN 采集日期:2026-09-02 (UTC+8)
今日深度文
Claude 5 + MCP 生态 2026:完整实战与生态全景
一句话结论:Claude 5 = 推理之王 + MCP 生态 = Agent 工具标准。本文 Claude 5 三档对比 + MCP 2.0 实战 + Claude Code SDK + 生态全景。
背景
2026 年 9 月 AI 行业重大事件:
2024 年:Claude 3(追赶 GPT-4)
2025 年:Claude 4(推理领先)
2026 年 9 月:
- Claude 5 正式发布
- Opus 5 / Sonnet 5 / Haiku 5 三档
- 推理能力 +40%
- 百万上下文
- MCP 2.0 协议成熟
- Claude Code SDK 1.0
- MCP Server 官方市场 500+ 预构建
为什么 Claude 5 是 2026 关键:
- 推理领先:SWE-bench Verified 80%+(编程 SOTA)
- 长上下文:百万 token,无需 chunking
- MCP 生态:500+ 预构建服务器
- Agent 框架:Claude Agent SDK 对标 LangGraph
- 编程场景:Claude Code SDK 完整生态
Claude 5 三档对比
| 模型 | 定位 | 上下文 | 价格(1k tokens) | 适用场景 |
|---|---|---|---|---|
| Opus 5 | 旗舰 | 1M | 输入 $15 / 输出 $75 | 复杂推理 |
| Sonnet 5 | 主力 | 1M | 输入 $3 / 输出 $15 | 通用 + Agent |
| Haiku 5 | 轻量 | 200K | 输入 $0.8 / 输出 $4 | 实时 / 高并发 |
Claude 5 性能基准
| Benchmark | Opus 5 | Sonnet 5 | Haiku 5 |
|---|---|---|---|
| SWE-bench Verified | 82.4% | 76.8% | 58.2% |
| MMLU | 92.8% | 91.5% | 85.3% |
| GPQA | 78.6% | 72.4% | 58.7% |
| HumanEval | 95.2% | 91.8% | 78.5% |
| MATH | 90.5% | 86.2% | 68.4% |
| GSM8K | 96.8% | 93.5% | 82.1% |
结论:Opus 5 在编程 + 数学全面 SOTA。
实战 1:Claude 5 API 调用
# pip install anthropic
import anthropic
client = anthropic.Anthropic(api_key="YOUR_API_KEY")
# 1. Sonnet 5(通用)
message = client.messages.create(
model="claude-sonnet-5-20260902",
max_tokens=2048,
messages=[
{"role": "user", "content": "用 Rust 实现一个 HTTP 服务器"},
],
)
print(message.content[0].text)
# 2. Opus 5(复杂推理)
message = client.messages.create(
model="claude-opus-5-20260902",
max_tokens=4096,
messages=[
{"role": "user", "content": "证明:所有大于 2 的偶数都可表示为两个素数之和(哥德巴赫猜想)"},
],
)
print(message.content[0].text)
# 3. 流式输出
with client.messages.stream(
model="claude-sonnet-5-20260902",
max_tokens=1024,
messages=[{"role": "user", "content": "写一首诗"}],
) as stream:
for text in stream.text_stream:
print(text, end="", flush=True)
# 4. Tool Use(Function Calling)
tools = [
{
"name": "get_weather",
"description": "获取天气",
"input_schema": {
"type": "object",
"properties": {
"city": {"type": "string"},
},
"required": ["city"],
},
},
]
message = client.messages.create(
model="claude-sonnet-5-20260902",
max_tokens=1024,
tools=tools,
messages=[{"role": "user", "content": "北京今天天气怎么样?"}],
)
# Claude 5 自动调用工具
if message.stop_reason == "tool_use":
tool_use = next(b for b in message.content if b.type == "tool_use")
# 执行工具...
MCP 2.0 协议详解
// MCP = Model Context Protocol(模型上下文协议)
// Anthropic 主导的 AI Agent 工具标准
// pip install mcp
// 1. MCP Server(Python)
from mcp.server import Server
from mcp.server.stdio import stdio_server
from mcp.types import Tool, TextContent
app = Server("my-server")
@app.list_tools()
async def list_tools() -> list[Tool]:
return [
Tool(
name="search_database",
description="搜索数据库",
inputSchema={
"type": "object",
"properties": {
"query": {"type": "string"},
},
"required": ["query"],
},
),
]
@app.call_tool()
async def call_tool(name: str, arguments: dict) -> list[TextContent]:
if name == "search_database":
# 执行查询
result = await db.search(arguments["query"])
return [TextContent(type="text", text=str(result))]
# 启动 Server
async def main():
async with stdio_server() as (read_stream, write_stream):
await app.run(
read_stream,
write_stream,
app.create_initialization_options(),
)
# 2. MCP Client(连接 Server)
from mcp import ClientSession, StdioServerParameters
from mcp.client.stdio import stdio_client
server_params = StdioServerParameters(
command="python",
args=["my_server.py"],
)
async with stdio_client(server_params) as (read, write):
async with ClientSession(read, write) as session:
await session.initialize()
# 列出工具
tools = await session.list_tools()
print(f"可用工具:{[t.name for t in tools.tools]}")
# 调用工具
result = await session.call_tool(
"search_database",
{"query": "Python"},
)
print(result)
实战 2:使用 MCP Server 增强 Claude
// TypeScript MCP Client
import { Anthropic } from '@anthropic-ai/sdk';
import { Client } from '@modelcontextprotocol/sdk/client';
import { StdioClientTransport } from '@modelcontextprotocol/sdk/client/stdio';
const anthropic = new Anthropic({ apiKey: process.env.ANTHROPIC_API_KEY });
// 连接 MCP Server
const transport = new StdioClientTransport({
command: 'python',
args: ['github_server.py'], // GitHub MCP Server
});
const mcpClient = new Client(
{ name: 'my-app', version: '1.0.0' },
{ capabilities: {} },
);
await mcpClient.connect(transport);
// 获取 MCP 工具
const { tools: mcpTools } = await mcpClient.listTools();
// 转换为 Claude 工具格式
const claudeTools = mcpTools.map(tool => ({
name: tool.name,
description: tool.description,
input_schema: tool.inputSchema,
}));
// 调用 Claude
const message = await anthropic.messages.create({
model: 'claude-sonnet-5-20260902',
max_tokens: 2048,
tools: claudeTools,
messages: [{
role: 'user',
content: '列出我 GitHub 仓库的 issues',
}],
});
// Claude 自动调用 MCP 工具
if (message.stop_reason === 'tool_use') {
const toolUse = message.content.find(c => c.type === 'tool_use');
// 执行 MCP 工具
const result = await mcpClient.callTool({
name: toolUse.name,
arguments: toolUse.input,
});
// 把结果返回给 Claude
const finalMessage = await anthropic.messages.create({
model: 'claude-sonnet-5-20260902',
max_tokens: 2048,
tools: claudeTools,
messages: [
{ role: 'user', content: '列出我 GitHub 仓库的 issues' },
{ role: 'assistant', content: message.content },
{ role: 'user', content: [{
type: 'tool_result',
tool_use_id: toolUse.id,
content: result.content,
}] },
],
});
console.log(finalMessage.content[0].text);
}
实战 3:Claude Code SDK 编程助手
// npm install @anthropic-ai/claude-code
import { ClaudeCode } from '@anthropic-ai/claude-code';
const claude = new ClaudeCode({
apiKey: process.env.ANTHROPIC_API_KEY,
});
// 1. 代码补全
const completion = await claude.complete({
model: 'claude-sonnet-5',
file: './src/api.ts',
cursorPosition: { line: 42, column: 15 },
});
console.log(completion.suggestion);
// 2. 代码审查
const review = await claude.review({
model: 'claude-opus-5',
diff: 'git diff HEAD~1',
});
console.log(review.comments);
// 3. 自动重构
const refactor = await claude.refactor({
model: 'claude-sonnet-5',
file: './src/legacy.ts',
goal: '使用 TypeScript 严格模式重写',
});
await refactor.apply();
// 4. 单元测试生成
const tests = await claude.generateTests({
model: 'claude-sonnet-5',
file: './src/utils.ts',
});
await tests.saveTo('./src/utils.test.ts');
// 5. Bug 修复
const fix = await claude.fixBug({
model: 'claude-opus-5',
error: 'TypeError: Cannot read property "id" of undefined',
stackTrace: '...',
file: './src/api.ts',
});
# Python Claude Code SDK
# pip install claude-code
from claude_code import ClaudeCode
claude = ClaudeCode(api_key="YOUR_API_KEY")
# 代码分析
analysis = claude.analyze(
file="./src/api.py",
questions=[
"这个函数的复杂度是多少?",
"有没有潜在的性能问题?",
"如何改进测试覆盖率?",
],
)
for answer in analysis.answers:
print(answer)
实战 4:Claude Agent SDK 复杂任务
// npm install @anthropic-ai/agent-sdk
import { Agent, Tool } from '@anthropic-ai/agent-sdk';
// 1. 定义工具
const searchTool: Tool = {
name: 'web_search',
description: '搜索网页',
execute: async ({ query }) => {
const results = await searchAPI.search(query);
return results;
},
};
const databaseTool: Tool = {
name: 'query_db',
description: '查询数据库',
execute: async ({ sql }) => {
const result = await db.query(sql);
return result.rows;
},
};
// 2. 创建 Agent
const agent = new Agent({
model: 'claude-opus-5',
systemPrompt: '你是一个数据分析助手,可以搜索网页和查询数据库',
tools: [searchTool, databaseTool],
maxIterations: 10,
});
// 3. 运行任务
const result = await agent.run({
task: '分析 2026 年 AI Agent 市场的 TOP 5 公司,给出投资建议',
});
console.log(result.finalAnswer);
console.log(result.steps); // 执行步骤
console.log(result.toolCalls); // 工具调用
# Python Agent SDK
from anthropic_agent_sdk import Agent, Tool
# 自定义工具
def search_web(query: str) -> str:
"""搜索网页"""
return search_api.search(query)
# 创建 Agent
agent = Agent(
model="claude-opus-5-20260902",
system="你是一个研究助手",
tools=[search_web],
max_iterations=10,
)
# 运行
result = agent.run("分析 2026 年 AI 行业趋势")
print(result.answer)
实战 5:MCP Server 官方市场使用
# 1. 安装 MCP Server
npx @modelcontextprotocol/server-github
# 2. 配置 Claude Desktop
# ~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"github": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-github"],
"env": {
"GITHUB_PERSONAL_ACCESS_TOKEN": "ghp_xxx"
}
},
"filesystem": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/Users/me/projects"]
},
"postgres": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-postgres", "postgresql://localhost/mydb"]
}
}
}
热门 MCP Server TOP 10:
1. @modelcontextprotocol/server-github(GitHub 集成)
2. @modelcontextprotocol/server-filesystem(文件操作)
3. @modelcontextprotocol/server-postgres(PostgreSQL)
4. @modelcontextprotocol/server-slack(Slack)
5. @modelcontextprotocol/server-google-drive(Google Drive)
6. @modelcontextprotocol/server-puppeteer(浏览器)
7. @modelcontextprotocol/server-git(Git 操作)
8. @modelcontextprotocol/server-brave-search(Brave 搜索)
9. @modelcontextprotocol/server-notion(Notion)
10. @modelcontextprotocol/server-redis(Redis)
实战 6:自定义 MCP Server
# my_server.py
from mcp.server import Server
from mcp.server.stdio import stdio_server
from mcp.types import Tool, TextContent, ImageContent
import aiohttp
app = Server("weather-server")
@app.list_tools()
async def list_tools():
return [
Tool(
name="get_weather",
description="获取城市天气",
inputSchema={
"type": "object",
"properties": {
"city": {"type": "string"},
},
"required": ["city"],
},
),
Tool(
name="get_forecast",
description="获取未来 7 天天气预报",
inputSchema={
"type": "object",
"properties": {
"city": {"type": "string"},
"days": {"type": "integer", "minimum": 1, "maximum": 7},
},
},
),
]
@app.call_tool()
async def call_tool(name: str, arguments: dict):
if name == "get_weather":
async with aiohttp.ClientSession() as session:
url = f"https://api.weather.com/{arguments['city']}"
async with session.get(url) as resp:
data = await resp.json()
return [TextContent(
type="text",
text=f"{arguments['city']} 当前温度:{data['temp']}°C,{data['condition']}",
)]
elif name == "get_forecast":
async with aiohttp.ClientSession() as session:
url = f"https://api.weather.com/forecast/{arguments['city']}"
async with session.get(url) as resp:
data = await resp.json()
forecast = "\n".join([
f"{d['date']}: {d['condition']}, {d['high']}°C / {d['low']}°C"
for d in data[:arguments.get('days', 7)]
])
return [TextContent(type="text", text=forecast)]
async def main():
async with stdio_server() as (read_stream, write_stream):
await app.run(
read_stream,
write_stream,
app.create_initialization_options(),
)
if __name__ == "__main__":
import asyncio
asyncio.run(main())
实战 7:性能基准对比
| 模型 | 响应延迟 | Token/秒 | 编程准确率 |
|---|---|---|---|
| Claude Opus 5 | 1.2s | 95 | 82.4% |
| Claude Sonnet 5 | 0.5s | 180 | 76.8% |
| Claude Haiku 5 | 0.2s | 350 | 58.2% |
| GPT-5 | 1.5s | 80 | 78.5% |
| DeepSeek V4 | 0.8s | 150 | 78.2% |
结论:Opus 5 编程领先,Sonnet 5 性价比最高。
实战 8:成本对比(100 万次调用)
场景:客服系统,输入 500 tokens + 输出 200 tokens
GPT-5:$30,000
Claude Opus 5:$21,000(-30%)
Claude Sonnet 5:$4,200(-86%)
Claude Haiku 5:$1,200(-96%)
DeepSeek V4:$300(-99%)
智能路由建议:
简单问题(60%):Haiku 5(成本最低)
中等问题(30%):Sonnet 5(性价比)
复杂问题(10%):Opus 5(质量最高)
选型决策树
你的场景?
├─ 复杂推理 / 编程 → Opus 5 ✅
├─ 通用 + Agent → Sonnet 5 ✅
├─ 实时 / 高并发 → Haiku 5 ✅
└─ 中文场景 → DeepSeek V4(成本最优)
预算?
├─ 极低 → Haiku 5 / DeepSeek V4
├─ 中 → Sonnet 5 / DeepSeek V4
└─ 高 → Opus 5 / GPT-5
需要工具调用?
├─ 是 → MCP Server 市场 ✅
├─ 自定义工具 → MCP 2.0 协议 ✅
└─ 简单 Function Calling → Claude API
需要持久化 Agent?
├─ 是 → Claude Agent SDK
└─ 否 → 直接 API
实战 9:常见反模式
反模式 1:用 Opus 处理简单任务
# ❌ 浪费成本
client.messages.create(
model="claude-opus-5", # 旗舰模型
messages=[{"role": "user", "content": "翻译:你好"}],
)
# ✅ 简单任务用 Haiku
client.messages.create(
model="claude-haiku-5", # 轻量模型
messages=[{"role": "user", "content": "翻译:你好"}],
)
反模式 2:单次请求处理过多内容
# ❌ 一次性传入过多内容
client.messages.create(
model="claude-opus-5",
messages=[{"role": "user", "content": huge_document}], # 1M tokens
)
# ✅ 分块处理 + Map-Reduce
chunks = split_document(huge_document, max_size=100_000)
summaries = await asyncio.gather(*[
summarize(chunk) for chunk in chunks
])
final = await merge_summaries(summaries)
反模式 3:忽略缓存
# ❌ 重复请求
for question in questions:
response = client.messages.create(...) # 没有缓存
# ✅ Prompt Caching
response = client.messages.create(
model="claude-sonnet-5",
system=[
{
"type": "text",
"text": long_system_prompt,
"cache_control": {"type": "ephemeral"}, # 启用缓存
}
],
messages=[...],
)
# 后续请求:缓存命中,成本降低 90%
实战 10:Prompt Caching 实战
# 启用 Prompt Caching(节省成本 90%)
response = client.messages.create(
model="claude-sonnet-5-20260902",
max_tokens=1024,
system=[
{
"type": "text",
"text": """
你是专业的代码审查助手。你的任务是:
1. 检查代码风格
2. 发现潜在 Bug
3. 提供优化建议
4. 评估性能影响
[长文档...]
""",
"cache_control": {"type": "ephemeral"},
}
],
messages=[
{"role": "user", "content": "审查这段代码:..."},
],
)
# 第一次:缓存写入(贵)
# 后续 5 分钟:缓存命中(便宜 90%)
# 输出 usage
print(response.usage)
# {
# "input_tokens": 1500,
# "cache_creation_input_tokens": 0, # 缓存命中
# "cache_read_input_tokens": 1500,
# "output_tokens": 200
# }
实战 11:Claude 5 长上下文实战
# 百万上下文:分析整个代码库
import os
from pathlib import Path
# 1. 收集所有源代码
code_files = []
for file in Path("./src").rglob("*.ts"):
code_files.append({
"file": str(file),
"content": file.read_text(),
})
# 2. 合并为单个 prompt
full_prompt = "\n\n".join([
f"# {f['file']}\n{f['content']}"
for f in code_files
])
# 3. Claude 5 一次性分析(百万上下文)
response = client.messages.create(
model="claude-opus-5-20260902",
max_tokens=4096,
messages=[
{"role": "user", "content": f"""
以下是整个代码库的源代码(共 {len(code_files)} 个文件):
{full_prompt}
请分析:
1. 整体架构
2. 主要模块
3. 潜在问题
4. 优化建议
"""},
],
)
实战 12:Claude Agent 复杂任务
from anthropic_agent_sdk import Agent, Tool
# 1. 多工具集成
search_tool = Tool(
name="web_search",
execute=lambda query: search_api.search(query),
)
database_tool = Tool(
name="query_db",
execute=lambda sql: db.execute(sql).fetchall(),
)
email_tool = Tool(
name="send_email",
execute=lambda to, subject, body: smtp.send(to, subject, body),
)
# 2. 创建 Agent
agent = Agent(
model="claude-opus-5",
system="""
你是一个商业分析助手。
工作流程:
1. 收到用户问题
2. 用 web_search 获取最新信息
3. 用 query_db 查询历史数据
4. 综合分析
5. 用 send_email 发送报告
""",
tools=[search_tool, database_tool, email_tool],
max_iterations=15,
)
# 3. 复杂任务
result = agent.run("""
分析 2026 年 SaaS 行业趋势,生成报告并发给 CEO:
- 市场规模
- TOP 5 公司
- 投资建议
- 风险评估
""")
print(result.final_answer)
print(f"调用了 {len(result.tool_calls)} 个工具")
实战 13:MCP + Claude Code IDE 集成
// VS Code settings.json
{
"claude-code.apiKey": "YOUR_API_KEY",
"claude-code.model": "claude-sonnet-5",
"claude-code.mcpServers": {
"github": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-github"],
"env": {
"GITHUB_TOKEN": "${env:GITHUB_TOKEN}"
}
},
"filesystem": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "${workspaceFolder}"]
}
}
}
// Claude Code 自动使用 MCP 工具
// 用户:"把 src/api.ts 重构并创建 PR"
// Claude Code 自动:
// 1. 使用 filesystem MCP 读取文件
// 2. 重构代码
// 3. 使用 github MCP 创建 PR
实战 14:成本优化策略
# 1. 模型分级
def select_model(task_complexity: int) -> str:
if task_complexity < 0.3:
return "claude-haiku-5" # 最便宜
elif task_complexity < 0.7:
return "claude-sonnet-5" # 性价比
else:
return "claude-opus-5" # 最强
# 2. Prompt Caching(节省 90%)
def cached_request(system_prompt: str, user_message: str):
return client.messages.create(
model="claude-sonnet-5",
system=[{
"type": "text",
"text": system_prompt,
"cache_control": {"type": "ephemeral"},
}],
messages=[{"role": "user", "content": user_message}],
)
# 3. Batch API(异步处理,50% 折扣)
# 适合:离线分析、批量总结、夜间任务
# 4. 智能截断
def smart_truncate(text: str, max_tokens: int) -> str:
"""智能截断:保留开头和结尾"""
if count_tokens(text) <= max_tokens:
return text
half = max_tokens // 2
return text[:half] + "\n\n[... 省略中间部分 ...]\n\n" + text[-half:]
实战 15:常见面试题
Q1:Claude 5 三档模型怎么选?
答:
- Opus 5:复杂推理(SWE-bench 82.4%)
- Sonnet 5:通用 + Agent(性价比最优)
- Haiku 5:实时 / 高并发(成本最低)
Q2:MCP 协议解决了什么问题?
答:
- 标准化 AI Agent 工具接口
- 避免重复开发(500+ 预构建 Server)
- 跨模型兼容(Claude / GPT / DeepSeek)
- 简化集成(stdio 协议)
Q3:MCP 和 Function Calling 的区别?
答:
- Function Calling:模型调用单个工具
- MCP:模型通过协议调用多个工具 + 资源 + 提示
- MCP 标准化、可发现、可复用
Q4:Claude 5 vs GPT-5 vs DeepSeek V4 怎么选?
答:
- 编程:Claude Opus 5(82.4% SOTA)
- 通用:GPT-5 / Claude Sonnet 5
- 中文 + 成本:DeepSeek V4(便宜 50x)
- Agent:Claude 5 + MCP 生态
Q5:什么是 Prompt Caching?
答:
- 缓存 system prompt 的 prefix
- 5 分钟内有效(ephemeral)
- 命中时成本降低 90%
- 适合:长 system prompt + 多次请求
总结
Claude 5 = 推理之王 + MCP 生态 = Agent 工具标准:
技术层面:
- ✅ Opus 5 编程 SOTA(82.4%)
- ✅ Sonnet 5 性价比最高
- ✅ Haiku 5 实时 + 高并发
- ✅ 百万上下文
- ✅ Prompt Caching(成本 -90%)
- ✅ MCP 2.0 协议成熟
- ✅ Claude Code SDK 1.0
- ✅ Claude Agent SDK
商业层面:
- ✅ Opus 5 比 GPT-5 编程领先 4%
- ✅ Sonnet 5 比 GPT-5 便宜 86%
- ✅ Haiku 5 比 GPT-5 便宜 96%
- ✅ MCP 生态 500+ Server
15 大实战场景:
- API 调用 / MCP 协议 / Claude Code / Agent SDK / MCP Server / 自定义 MCP / 性能对比 / 选型 / 反模式 / Caching / 长上下文 / 复杂任务 / IDE 集成 / 成本优化 / 面试题
行动建议:
- 编程场景:用 Opus 5
- 通用 Agent:用 Sonnet 5
- 实时场景:用 Haiku 5
- 工具调用:接入 MCP Server 市场
- 自定义工具:构建 MCP Server
- 成本优化:Prompt Caching + 智能路由
Claude 5 + MCP 生态已经形成完整闭环。所有 2026 年的 AI 应用都应该接入这个生态。
�� 同主题文章
Pydantic AI 1.0 + 结构化输出 2026:类型安全 LLM 应用完整实战
结构化输出是 2026 LLM 应用标配。Pydantic AI / Instructor / Zod / Outlines / DSPy 5 大工具对比 + 实战 + 选型。
LangGraph + AI Agent 工程化 2026:4 大 Agent 框架实战指南
2026 年 AI Agent 工程化元年。LangGraph / CrewAI / AutoGen / Letta 4 大框架对比 + 6 个实战 + Agent 选型决策树。
A2A 协议实战:多 Agent 协作新范式完整指南 2026
A2A(Agent-to-Agent)是 2026 年多 Agent 协作标准协议。本文从 0 到多 Agent 系统实战,含 4 个真实项目 + 与 MCP 区别 + 与 LangGraph/AutoGen 对比。