Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions content/docs/(get-started)/quick-start/server-developers.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,29 @@ title: 服务器开发者
description: 快速开始 - 服务器开发者
---

开始构建自己的服务器,以便在Claude中用于Desktop和其他客户端。

在本教程中,我们将构建一个简单的MCP天气服务器,并将其连接到主机Claude for Desktop。我们将从基本设置开始,然后进行更复杂的用例。

## 我们将要干什么
许多LLM(包括Claude)目前无法获取预报和恶劣天气警报。让我们用MCP解决这个问题。

我们将构建一个server,该server提供两个工具:get-alerts and get-forecast。然后,我们将服务器连接到MCP主机(在本例中使用Claude for Desktop):
![ImaImageZoomge](/server-developers-01.png)
![ImaImageZoomge](/server-developers-02.png)

```
服务可以连接任何客户端。为了简单起见,我们在这里选择了Claude作为桌面,但我们也有关于[建立自己的client](https://mcp.thinkinai.xyz/docs/quick-start/client-developers)建立自己的client的指南,以及[这里的其他客户列表](https://mcp.thinkinai.xyz/docs/example-clients)。
```

```
为什么选择Claude for DeskTop而不是Claude.ai?
由于服务器是本地运行的,MCP目前只支持桌面主机。远程主机正在积极开发中。
```

## MCP核心概念
MCP服务器可以提供三种主要功能:
1. **Resources**:客户端可以读取的类文件数据(如API响应或文件内容)
2. **Tools**:LLM可以调用的函数(经用户批准)
3. **Prompts**:帮助用户完成特定任务的预先编写的模板
本教程将主要关注工具。
Binary file added public/server-developers-01.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/server-developers-02.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.