Auto-sync: 2026-04-27 08:02
This commit is contained in:
40
wiki/entities/McpServer.md
Normal file
40
wiki/entities/McpServer.md
Normal file
@@ -0,0 +1,40 @@
|
||||
---
|
||||
title: "MCP Server"
|
||||
type: entity
|
||||
tags: [mcp, ai-agent, server, protocol]
|
||||
sources: [mcp在cursor中的集成与应用详解]
|
||||
last_updated: 2026-04-26
|
||||
---
|
||||
|
||||
## Definition
|
||||
MCP Server 是 MCP(Modal Context Protocol)体系中的**服务提供方**,负责对外暴露资源和工具接口,供 MCP Client(如 Cursor、Claude Desktop)调用。
|
||||
|
||||
## Role in Architecture
|
||||
MCP 基于 Client-Server 架构:
|
||||
- **MCP Server(服务端)**:提供服务接口(资源、工具、提示词)
|
||||
- **MCP Client(客户端)**:集成 MCP 协议的应用程序,消费 Server 提供的接口
|
||||
|
||||
## Three Interface Types
|
||||
|
||||
| 接口 | 类型 | 说明 |
|
||||
|------|------|------|
|
||||
| 资源(Resource) | GET 类 | 提供外部数据读取 |
|
||||
| 工具(Tool) | POST 类 | 提供外部操作能力 |
|
||||
| 提示词(Prompt) | 扩展接口 | 预定义的提示词模板 |
|
||||
|
||||
## MCP Server 实例
|
||||
- **热点新闻 MCP Server**(smisery 网站):支持九个新闻来源的实时新闻获取
|
||||
- **Sequential Thinking**:逻辑推理分步拆解工具
|
||||
|
||||
## Integration with Cursor
|
||||
在 Cursor 中接入 MCP Server:
|
||||
1. 在 Cursor 设置中新增 MCP Server
|
||||
2. 两种接入方式:
|
||||
- **SSE 方式**:连接远程 MCP Server(需 HTTP 服务)
|
||||
- **Command 方式**:本地执行命令启动 MCP Server
|
||||
|
||||
## See Also
|
||||
- [[ModalContextProtocol]] ← 所遵循的协议
|
||||
- [[Cursor]] ← 客户端
|
||||
- [[McpBuilderAgent]] ← 构建工具
|
||||
- [[SequentialThinking]] ← 工具示例
|
||||
Reference in New Issue
Block a user