44 lines
874 B
Markdown
44 lines
874 B
Markdown
---
|
||
id: mcp
|
||
title: "MCP"
|
||
type: concept
|
||
tags: [AI, protocol, tool-integration]
|
||
sources:
|
||
- "[[LLM Terms Framework]]"
|
||
last_updated: 2025-12-20
|
||
---
|
||
|
||
## Definition
|
||
|
||
MCP(Model Context Protocol,模型上下文协议)是一种标准化接口,用于连接大模型与外部数据和工具。
|
||
|
||
## Purpose
|
||
|
||
解决LLM无法访问实时数据和外部工具的问题:
|
||
- LLM给出执行步骤
|
||
- 实际执行需要配合MCP
|
||
- 实现智能体(Agent)功能
|
||
|
||
## Architecture
|
||
|
||
- **Client**:运行在AI应用端
|
||
- **Server**:运行在外部服务或本地
|
||
|
||
## Use Cases
|
||
|
||
- 文件系统访问
|
||
- API调用
|
||
- 数据库查询
|
||
- 代码执行
|
||
|
||
## Connection to Agent
|
||
|
||
Agent = LLM + MCP
|
||
- LLM负责理解和规划
|
||
- MCP负责执行具体操作
|
||
|
||
## Connections
|
||
- [[LLM]] ← uses ← [[MCP]]
|
||
- [[Agent]] ← combines ← [[LLM]] + [[MCP]]
|
||
- [[MCP]] ← enables ← [[工具调用]]
|