XW

xtraordinaryscar/workspace-assistant-mcp

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

0 stars 0 forks 质量 58 趋势 14

一个用Python编写的小型模型上下文协议服务器,为Claude提供了十二种处理项目文件夹的工具:列出、搜索、读取、编辑和分析文件、生成......

概览

一个用 Python 编写的小型模型上下文协议服务器,为 Claude 提供了十二种处理项目文件夹的工具:列出、搜索、读取、编辑和分析文件、生成 Markdown 输出、保存笔记以及只读 git 信息。 为大学课程项目开发,使用官方 mcp Python SDK(版本 1.x,FastMCP 风格)。它在 127.0.0.1 上为 MCP 提供服务。claude.ai 通过固定地址访问,小型看门狗脚本保持服务器和隧道运行。 Notes/ 是在 write_note(或保存的报告)首次写入文件时创建的。.trash/ 保存被 delete_file 移除的文件。logs/ 保存看门狗输出。测试使用临时文件夹,之后删除。 1. 从 https://www.python.org/downloads/ 下载 Python 3.10 或更新版本 2.在安装程序中,点击安装前先勾选。3. 打开一个新的命令提示符,勾选:python --version requirements.txt mps mp>=1.8.0,<2。可流式 HTTP 需要 1.8 或更新版本,版本 2。

概述(AI 翻译)

一个用 Python 编写的小型模型上下文协议服务器,为 Claude 提供了十二种处理项目文件夹的工具:列出、搜索、读取、编辑和分析文件、生成 Markdown 输出、保存笔记以及只读 git 信息。

为大学课程项目开发,使用官方 mcp Python SDK(版本 1.x,FastMCP 风格)。它通过 [127.0.0.1 上的 可流式 HTTP 提供 MCP。claude.ai 通过固定的 ngrok 地址访问,小型看门狗脚本保持服务器和隧道运行。

它的作用

工具 它的作用 写入文件吗?
list_project_files 列出文件大小和最后修改日期,并可选副名过滤器 无
analyze_text_file 字数、行数、阅读时间和前十名关键词 无
search_in_files 跨文本文件、文件号和行号的大小写不区分关键词搜索 无
generate_markdown_toc 从.md文件的标题构建Markdown目录 否
generate_project_report Markdown 摘要:按文件类型、总大小、最大和最新文件计数 仅当 save_as 给出时
write_note 创建一个新的.md或’。

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

workspace-assistant (MCP server)

A small Model Context Protocol server, written in Python, that gives Claude twelve tools for working with a project folder: listing, searching, reading, editing and analyzing files, generating Markdown output, saving notes, and read-only git information.

Built for a university course project using the official mcp Python SDK (version 1.x, FastMCP style). It serves MCP over streamable HTTP on 127.0.0.1. claude.ai reaches it through a fixed ngrok address, and small watchdog scripts keep the server and tunnel running.

What it does

Tool What it does Writes files?
list_project_files Lists files with size and last-modified date, with an optional extension filter No
analyze_text_file Word count, line count, reading time and top 10 keywords No
search_in_files Case-insensitive keyword search across text files, with file and line numbers No
generate_markdown_toc Builds a Markdown table of contents from a .md file’s headings No
generate_project_report Markdown summary: counts by file type, total size, largest and newest files Only if save_as is given
write_note Creates a new .md or .txt file in notes/ Yes (new files only)
find_todos Lists TODO, FIXME and NOTE comments with file and line number No
find_broken_links Reports relative links in a .md file that point to files that don’t exist No
read_file Returns a file’s lines with line numbers, in parts for long files No
str_replace Replaces one exact piece of text in an existing file (must match exactly once; never edits server.py) Yes (existing files only)
delete_file Moves a file into .trash/ so it can be recovered; never erases it; never touches server.py Yes (moves to .trash/)
git_lite Runs only git status, git log or git diff and returns the output No

Project structure

mcp-server/
├── server.py          # the MCP server and all tools
├── requirements.txt   # Python dependency (mcp 1.x)
├── test_tools.py      # tests that call the tools directly (no Claude needed)
├── run-server.bat     # keeps the server running (restarts it if it stops)
├── run-tunnel.bat     # keeps the ngrok tunnel running (restarts it if it stops)
├── start-all.bat      # starts both watchdogs
├── check-status.bat   # checks that both addresses respond
├── handoff/           # session handoff files (see "Handoff protocol" below)
├── .gitignore         # keeps notes/, .trash/, logs/, caches and test files out of git
└── README.md

notes/ is created the first time write_note (or a saved report) writes a file. .trash/ holds files removed by delete_file. logs/ holds the watchdog output. The tests use a temporary folder and delete it afterwards.

Setup (Windows), one time

1. Install Python

在 GitHub 查看完整 README

安装

This server does not publish a one-line install command.

Open the repository installation guide 新手?先看 mcpskill.org 教程 →