Skip to main content

《MCP极简开发》学习笔记

本项目基于Datawhale组队学习的共读《MCP极简开发》课程,主要包括学习笔记和项目代码。

项目地址:https://github.com/datawhalechina/mcp-lite-dev

环境安装

  1. 基础环境:Python3.10+

  2. 安装UV

pip install uv
set UV_INDEX=https://mirrors.aliyun.com/pypi/simple
  1. 安装Python依赖包
uv sync --python 3.10 --all-extras
  1. 切换到本地环境(.venv)
cd .venv/Scripts
activate

配置文件

  1. 访问openweathermap网站,注册账号,获取API KEY

  2. 在项目根目录下新建.env文件,并添加以下内容

OPENWEATHER_API_KEY=YOUR_API_KEY
  1. 访问硅基流动网站,注册账号,获取API KEY
    注:书中使用的是deepseek,我们使用硅基流动的模型,其实效果是一样的。

  2. 在项目根目录下新建.env文件,并添加以下内容

BASE_URL=https://api.siliconflow.cn/v1
MODEL=deepseek-ai/DeepSeek-V3
API_KEY=YOUR_API_KEY

项目协作安排

章节号 标题 进度 负责人
1 快速了解MCP 进行中 王子怡
2 MCP核心原理 进行中 洪可壕
3 MCP的安全问题 进行中 易华挥
4 支持MCP的主流平台 进行中 -
5 MCP Server资源整理 进行中 -
6 动手写一个MCP 进行中 尹大吕
7 MCP开发进阶 进行中 钟永麟
8 基于MCP Server的IDE应用实战 进行中 -
9 基于MCP Server的生活类智能体应用 进行中 -
10 基于MCP Server的个人效率智能体应用 进行中 -
11 基于MCP Server的办公效率智能体应用 进行中 -

致谢

核心贡献者

其他

  1. 特别感谢 @Sm1les、@LSGOMYP 对本项目的帮助与支持;

阅读提示

第7.2.2节 MCP Server的上线发布

  1. 请登录PyPI官方网站注册账号。

  2. 访问PyPI官网-我的账户创建API token。

  3. 在项目根目录下执行以下命令,进行项目打包和上传发布,需要使用到API token:

python -m build
python -m twine upload dist/*

关注我们

扫描下方二维码关注公众号:Datawhale

Metadata

Release files for mcp-weather-demo-cjy 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mcp-weather-demo-cjy 0.1.0
File Size Uploaded
mcp_weather_demo_cjy-0.1.0.tar.gz 8.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for mcp-weather-demo-cjy 0.1.0
File Interpreter ABI Platform
mcp_weather_demo_cjy-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 17.5 kB

Release files / mcp_weather_demo_cjy-0.1.0.tar.gz

Download URL mcp_weather_demo_cjy-0.1.0.tar.gz
Size 8.0 kB
Tags Source
SHA-256 checksum
How to use checksums
19a1429a3761560dba77f8cdcb8a1689e0cb87aab338cefbeda792cb9f810ecc
BLAKE2b-256 checksum
How to use checksums
f4060cdad4650a2df6ed9e9146e40147f3bbc3d9834f46d9e469b55280069c81
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.18

Release files / mcp_weather_demo_cjy-0.1.0-py3-none-any.whl

Download URL mcp_weather_demo_cjy-0.1.0-py3-none-any.whl
Size 9.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
76355065d1ce1e8cb6bda108e447566ded292972eaace77b4319f7b5226123d4
BLAKE2b-256 checksum
How to use checksums
30a23bb27206038faa3085d32979e33669c0605f3aa4855973df0e5164365f5a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.18

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page