Auto-sync: 2026-04-27 08:02

This commit is contained in:
2026-04-27 08:02:55 +08:00
parent 1c7c7d673e
commit fbd6107be4
58 changed files with 2532 additions and 964 deletions

View 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 是 MCPModal 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]] ← 工具示例