MCP Tools

by ZbigniewTomanek

23 stars
325 downloads
Not rated
GitHub

Description

# 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…

About

# 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…

Details

Author
ZbigniewTomanek
GitHub stars
23
Downloads
325
Categories
Developer Tools, Other, AI, Cloud Service

- Execute shell commands with argument lists
- View file contents with optional line ranges
- Search for patterns in files using regular expressions
- Make precise edits: text replacements, line insertions, deletions
- Write or append content to files
- Fetch a web page to PDF and parse it to markdown (requires Chromium)

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name MCP Tools
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

Install Python 3.10 or higher and the uv package manager. Clone the repository, run uv run mcp install, then get the absolute path to uv. Update your Claude Desktop MCP server configuration JSON to include the absolute path and the server.py file as arguments. Connect Claude Desktop using the server identifier "zbigniew-mcp".

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "mcp tools": {
            "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"
                ]
            }
        }
    }
}

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"
        ]
    }
}

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

1. Install uv
2. Clone this repository or download the source code
3. Run uv run mcp install to install the MCP server
4. Run which uv to get an absolute path to the uv executable
5. Update your MCP server configuration in Claude Desktop to use the absolute path to the uv executable

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

Connecting from Claude Desktop

1. Open Claude Desktop
2. Connect to the MCP server using the identifier "zbigniew-mcp"

> Note: While this implementation focuses on Claude Desktop, MCP is designed to be compatible with any MCP-compatible tool or LLM client, providing flexibility in implementation and integration.

Available Tools

execute_shell_command

Execute shell commands safely using a list of arguments:

execute_shell_command(["ls", "-la"])
execute_shell_command(["grep", "-r", "TODO", "./src"])
execute_shell_command(["python", "analysis.py", "--input", "data.csv"])
execute_shell_command(["uname", "-a"])

show_file

View file contents with optional line range specification:

show_file("/path/to/file.txt")
show_file("/path/to/file.txt", num_lines=10)
show_file("/path/to/file.txt", start_line=5, num_lines=10)

search_in_file

Search for patterns in files using regular expressions:

search_in_file("/path/to/script.py", r"def\s+\w+\s\(")
search_in_file("/path/to/code.py", r"#\sTODO", case_sensitive=False)

edit_file

Make precise changes to files:

```python

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.