Skip to main content

《MCP极简开发》项目代码

本项目来自Datawhale 2025年07月组队学习的共读《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

阅读提示

第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-lite-dev 0.1.2

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-lite-dev 0.1.2
File Size Uploaded Provenance
mcp_lite_dev-0.1.2.tar.gz 6.9 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for mcp-lite-dev 0.1.2
File Interpreter ABI Platform
mcp_lite_dev-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 15.8 kB

Release files / mcp_lite_dev-0.1.2.tar.gz

Download URL mcp_lite_dev-0.1.2.tar.gz
Size 6.9 kB
Tags Source
SHA-256 checksum
How to use checksums
6a7f1430f9ef379d60e85ae6bba5e0b41e979d8649283ee396de3a30fd9faf8f
BLAKE2b-256 checksum
How to use checksums
670019308a4134111baf38fe8f85d45f1590c7d413bef9b0db176025fdc38a49
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.5

Release files / mcp_lite_dev-0.1.2-py3-none-any.whl

Download URL mcp_lite_dev-0.1.2-py3-none-any.whl
Size 8.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
20b0f56d21e56f65c4837833ff9ac7d8a7743ef990695dba86705e9d115b4abc
BLAKE2b-256 checksum
How to use checksums
662794806f0f0e7f6d18b027367f17b7b052ca709eba5bc58ed28fb87df6fe4d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.5

Security for mcp-lite-dev 0.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files No provenance

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