The reputation layer for AI skills, tools & agents

liaokongVFX/MCP-Chinese-Getting-Started-Guide

Score: 38.0 Rank #3176

Model Context Protocol(MCP) 编程极速入门

Overview

liaokongVFX/MCP-Chinese-Getting-Started-Guide is a MCP server. Model Context Protocol(MCP) 编程极速入门 Topics: ai, deepseek, mcp, modelcontextprotocol, mcp-server.

Ranked #3176 out of 25632 indexed tools.

Has 3,375 GitHub stars.

Ecosystem

No license
aideepseekmcpmodelcontextprotocolmcp-server

Signal Breakdown

Stars 3,375
Freshness 10mo ago
Issue Health 78%
Contributors 3
Dependents 0
Forks 208
Description Brief
License None

How to Improve

Description low impact

Expand your description to 150+ characters for better discoverability

License low impact

Add an MIT or Apache-2.0 license to signal trust and enable adoption

Freshness high impact

Last commit was 327 days ago — a recent commit would boost your freshness score

Badge

AgentRank score for liaokongVFX/MCP-Chinese-Getting-Started-Guide
[![AgentRank](https://agentrank-ai.com/api/badge/tool/liaokongVFX--MCP-Chinese-Getting-Started-Guide)](https://agentrank-ai.com/tool/liaokongVFX--MCP-Chinese-Getting-Started-Guide)
<a href="https://agentrank-ai.com/tool/liaokongVFX--MCP-Chinese-Getting-Started-Guide"><img src="https://agentrank-ai.com/api/badge/tool/liaokongVFX--MCP-Chinese-Getting-Started-Guide" alt="AgentRank"></a>

Matched Queries

"model context protocol""model-context-protocol"

From the README

# Model Context Protocol(MCP) 编程极速入门

[TOC]

## 简介

模型上下文协议(MCP)是一个创新的开源协议,它重新定义了大语言模型(LLM)与外部世界的互动方式。MCP 提供了一种标准化方法,使任意大语言模型能够轻松连接各种数据源和工具,实现信息的无缝访问和处理。MCP 就像是 AI 应用程序的 USB-C 接口,为 AI 模型提供了一种标准化的方式来连接不同的数据源和工具。

MCP 有以下几个核心功能:

- Resources 资源
- Prompts 提示词
- Tools 工具
- Sampling 采样
- Roots 根目录
- Transports 传输层

因为大部分功能其实都是服务于 Claude 客户端的,本文更希望编写的 MCP 服务器服务与通用大语言模型,所以本文将会主要以“工具”为重点,其他功能会放到最后进行简单讲解。

其中 MCP 的传输层支持了 2 种协议的实现:stdio(标准输入/输出)和 SSE(服务器发送事件),因为 stdio 更为常用,所以本文会以 stdio 为例进行讲解。

本文将会使用 3.11 的 Python 版本,并使用 uv 来管理 Python 项目。同时代码将会在文末放到 Github 上,废话不多说,我们这就开始吧~

## 开发 MCP 服务器

在这一小节中,我们将会实现一个用于网络搜索的服务器。首先,我们先来通过 uv 初始化我们的项目。

> uv 官方文档:https://docs.astral.sh/uv/

```shell
# 初始化项目
uv init mcp_getting_started
cd mcp_getting_started

# 创建虚拟环境并进入虚拟环境
uv venv
.venv\Scripts\activate.bat

# 安装依赖
uv add "mcp[cli]" httpx openai

```

然后我们来创建一个叫 `web_search.py` 文件,来实现我们的服务。MCP 为我们提供了2个对象:`mcp.server.FastMCP` 和 `mcp.server.Server`,`mcp.server.FastMCP` 是更高层的封装,我们这里就来使用它。

```python
import httpx
Read full README on GitHub →
Are you the maintainer? Claim this listing