Python Scripts
БесплатноНе проверенMCP server that exposes local Python scripts as tools for AI clients (e.g. Claude Desktop), enabling directory tree generation, Excel-to-text conversion, Python
Описание
MCP server that exposes local Python scripts as tools for AI clients (e.g. Claude Desktop), enabling directory tree generation, Excel-to-text conversion, Python code extraction, and text file merging.
README
通过 MCP (Model Context Protocol) 将本地 Python 工具脚本暴露给 AI 客户端(如 Claude Desktop)调用的工具集。
📦 功能概述
| 工具 | 功能 | 适用场景 |
|---|---|---|
| tree_to_txt | 扫描目录生成文件树,保存为文本文件 | 项目结构概览、文档编写 |
| xlsx_to_txt | 读取所有 .xlsx Excel 文件,提取内容转文本 |
将表格数据提供给 AI 处理 |
| python_to_txt | 提取所有 .py 文件代码,合并到一个文本文件 |
代码审查、AI 上下文准备 |
| text_to_txt | 自动检测编码,合并所有文本文件 | 文档汇总、语料整理 |
所有工具在扫描目录时自动跳过 .venv、__pycache__、.git 等目录,并尊重 .gitignore 配置。
🚀 快速开始
1. 安装依赖
本项目使用 uv 管理依赖:
uv sync
2. 配置 MCP 客户端
将以下 JSON 添加到你的 MCP 客户端配置中(如 Claude Desktop claude_desktop_config.json):
{
"mcpServers": {
"python-script-runner": {
"command": "path\\to\\.venv\\Scripts\\python.exe",
"args": [
"path\\to\\mcp_server.py"
]
}
}
}
⚠️ 请将
path\\to\\替换为你的实际项目路径。
3. 运行测试
python mcp_server.py
🛠️ 工具详情
tree_to_txt
python tree_to_txt.py # 扫描当前目录
python tree_to_txt.py -d /path/to/project # 指定目录
python tree_to_txt.py -o tree.txt # 自定义输出文件名
xlsx_to_txt
python xlsx_to_txt.py # 读取当前目录所有 xlsx
python xlsx_to_txt.py --raw-formulas # 提取公式原文
python xlsx_to_txt.py --max-rows 100 # 限制行数
python_to_txt
python python_to_txt.py # 提取所有 .py 文件
text_to_txt
python text_to_txt.py # 合并所有文本文件
📄 LICENSE
本项目基于 MIT License 开源。
Установка Python Scripts
У этого сервера нет опубликованного пакета — он собирается из исходников. Открой репозиторий и следуй инструкции в README.
▸ github.com/Liangbiaoyong/Python_Scripts_MCPFAQ
Python Scripts MCP бесплатный?
Да, Python Scripts MCP бесплатный — установка в пару кликов через Unyly без оплаты.
Нужен ли API-ключ для Python Scripts?
Нет, Python Scripts работает без API-ключей и переменных окружения.
Python Scripts — hosted или self-hosted?
Self-hosted: сервер запускается локально на твоей машине командой из раздела установки.
Как установить Python Scripts в Claude Desktop, Claude Code или Cursor?
Открой Python Scripts на unyly.org, выбери вкладку своего клиента (Claude Desktop, Claude Code, Cursor) и нажми Install — конфиг сгенерируется автоматически, без правки JSON.
Похожие MCP
GitHub
PRs, issues, code search, CI status
автор: GitHubFilesystem
Secure file operations with configurable access controls.
Memory
Knowledge graph-based persistent memory system.
Template MCP Server
A CLI tool to create a new Model Context Protocol server project with TypeScript support, dual transport options, and an extensible structure
автор: mcpdotdirectCompare Python Scripts with
Не уверен что выбрать?
Найди свой стек за 60 секунд
Автор?
Embed-бейдж для README
Похожее
Все в категории development
