
一种自定义的模型上下文协议(MCP)服务器实现,为 Claude Desktop 及其他大型语言模型客户端提供文件系统和命令执行工具。
概览
一种自定义的模型上下文协议(MCP)服务器实现,为 Claude Desktop 及其他大型语言模型客户端提供文件系统和命令执行工具。 模型上下文协议(MCP)是一种开放协议,规范了应用程序向大型语言模型(LLMs)提供上下文的方式。就像USB-C端口提供了连接设备与各种外设的标准化方式一样,MCP也提供了将AI模型与不同数据源和工具连接的标准化方式。 该项目实现了一台FastMCP服务器,配备了多种实用工具,使Claude及其他大型语言模型能够与本地文件系统交互并执行命令。它通过定义良好的工具接口,以受控的方式扩展了LLM的本地系统访问能力。 - : MCP 提供了越来越多的预构建集成,您的 LLM 可以直接接入 - : 轻松在 LLM 提供商和厂商之间切换(如 Claude、GPT-4o、Gemini 等)。
概述(AI 翻译)
一种自定义的模型上下文协议(MCP)服务器实现,为 Claude Desktop 及其他大型语言模型客户端提供文件系统和命令执行工具。
什么是模型上下文协议?
模型上下文协议(MCP)是一种开放协议,规范了应用程序向大型语言模型(LLMs)提供上下文的方式。就像USB-C端口提供了连接设备与各种外设的标准化方式一样,MCP也提供了将AI模型与不同数据源和工具连接的标准化方式。
该项目实现了一台FastMCP服务器,配备了多种实用工具,使Claude及其他大型语言模型能够与本地文件系统交互并执行命令。它通过定义良好的工具接口,以受控的方式扩展了LLM的本地系统访问能力。
MCP的主要优势
- 标准化集成:MCP提供了越来越多的预建集成,你的LLM可以直接插入
- 供应商灵活性:轻松在LLM提供商和供应商之间切换(Claude、GPT-4o、Gemini等)
- 安全:保护基础设施内数据安全的最佳实践
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
MCP Tools
A custom Model Context Protocol (MCP) server implementation that provides file system and command execution tools for Claude Desktop and other LLM clients.
What is the Model Context Protocol?
The Model Context Protocol (MCP) is an open protocol that standardizes how applications provide context to Large Language Models (LLMs). Much like a USB-C port provides a standardized way to connect devices to various peripherals, MCP provides a standardized way to connect AI models to different data sources and tools.
This project implements a FastMCP server with several useful tools that enable Claude and other LLMs to interact with your local file system and execute commands. It extends LLMs’ capabilities with local system access in a controlled way through well-defined tool interfaces.
Key Benefits of MCP
- Standardized Integration: MCP provides a growing list of pre-built integrations that your LLM can directly plug into
- Vendor Flexibility: Easily switch between LLM providers and vendors (Claude, GPT-4o, Gemini, etc.)
- Security: Best practices for securing your data within your infrastructure
- Tool Exposure: Encapsulate existing tools and make them accessible to any MCP-compatible LLM client
Features
The MCP server provides the following file system and command execution tools:
- execute_shell_command: Execute shell commands and get stdout/stderr results
- show_file: View file contents with optional line range specification
- search_in_file: Search for patterns in files using regular expressions
- edit_file: Make precise changes to files with string replacements and line operations
- write_file: Write or append content to files
MCP Architecture
MCP follows a client-server architecture:
- Hosts: LLM applications (like Claude Desktop or IDEs) that initiate connections
- Clients: Maintain 1:1 connections with servers, inside the host application
- Servers: Provide context, tools, and prompts to clients (this project implements a server)
Prerequisites
- Python 3.10 or higher
- An MCP-compatible client (Claude Desktop, or any other client that supports MCP)
Installation
- Install uv
- Clone this repository or download the source code
- Run
uv run mcp installto install the MCP server - Run
which uvto get an absolute path to theuvexecutable - Update your MCP server configuration in Claude Desktop to use the absolute path to the
uvexecutable
My MCP server configuration looks like this:
{
"globalShortcut": "",
"mcpServers": {
"zbigniew-mcp": {
"command": "/Users/zbigniewtomanek/.local/bin/uv",
"args": [
"run",
"--with",
"mcp[cli]",
"--with",
"marker-pdf",
"mcp",
"run",
"/Users/zbigniewtomanek/PycharmProjects/my-mcp-tools/server.py"
]
}
}
}
Usage
安装
This server does not publish a one-line install command.
Open the repository installation guide 新手?先看 mcpskill.org 教程 →配置
{
"globalShortcut": "",
"mcpServers": {
"zbigniew-mcp": {
"command": "/Users/zbigniewtomanek/.local/bin/uv",
"args": [
"run",
"--with",
"mcp[cli]",
"--with",
"marker-pdf",
"mcp",
"run",
"/Users/zbigniewtomanek/PycharmProjects/my-mcp-tools/server.py"
]
}
}
}