Back to MCP directory
publicPublicdnsLocal runtime

MyFirstMcpServer

基于MCP框架的Python桌面TXT文件管理工具,提供文件统计、列表展示和创建功能

article

README

🚀 MyFirstMcpServer

MyFirstMcpServer 是一款基于 MCP 框架的桌面端 TXT 文件管理工具。它能帮助用户轻松管理桌面的 TXT 文件,具备统计文件数量、列出所有文件以及创建新文件等实用功能。

🚀 快速开始

本工具的使用非常便捷,只需按照以下步骤操作即可。

📦 安装指南

首先,你需要克隆项目仓库并安装相关依赖。

# 克隆仓库
git clone https://github.com/YingHe-1/MyFirstMcpServer.git
cd MyFirstMcpServer

# 安装依赖
pip install -r requirements.txt

💻 使用示例

安装完成后,你可以运行以下命令来使用该工具。

python add_num.py

✨ 主要特性

本工具提供了以下几个实用的功能:

  1. 统计桌面上的 TXT 文件数量
  2. 列出桌面上的所有 TXT 文件
  3. 在桌面创建新的 TXT 文件(带用户交互确认)

📚 详细文档

工具函数说明

  • count_desktop_txt_files(): 统计桌面 TXT 文件数量
  • list_desktop_txt_files(): 列出桌面 TXT 文件
  • create_desktop_txt_file(filename, content): 创建桌面 TXT 文件
help

Runtime guide

cloud

Hosted runtime

Hosted servers run from a provider-managed environment. You usually connect the MCP client to the hosted endpoint or follow the provider's authorization flow, without keeping a local process alive

  1. Open provider connection page
  2. Authorize or copy endpoint
  3. Connect from your MCP client
terminal

Local runtime / other methods

Local servers run on your own machine or infrastructure. You normally copy the server_config into your MCP client, install the required package, and provide env variables from env_schema when needed

  1. Copy server_config
  2. Install required package
  3. Fill env variables and restart client