Skip to main content

A short description of your project.

Project description

โš™๏ธ mcp-devtools: multi-functional development tools MCP server over SSE

GitHub repository GitHub Workflow Status PyPI

  • ๐Ÿ”ง mcp-devtools offers a comprehensive suite of development tools:
  • ๐Ÿ“„ For detailed overview of all tools, their arguments, and descriptions, please refer to Available Tools.
    • ๐ŸŽ‹ Git management operations (git_status, git_stage_and_commit, git_diff, git_diff_all, git_log, git_create_branch, git_reset git_checkout, git_show)
    • ๐Ÿ“ Git file operations (git_read_file, git_apply_diff)
    • ๐Ÿ“‚ Direct file operations (search_and_replace, write_to_file)
    • ๐Ÿ–ฅ๏ธ Terminal commands execution (execute_command), please review Automation-Related Security.
    • ๐Ÿค– AI-assisted file operations using Aider (ai_edit (aider_status for systems ready check ))
      โ„น๏ธ When using the ai_edit tool, please refer to the Aider Configuration documentation.

โ›Ž Use Cases

  • ๐ŸŒ Use it to extend online chat-based assistants such as ChatGPT, Google Gemini or AI Studio, Perplexity, Grok, OpenRouter Chat, DeepSeek, Kagi, T3 Chat with direct access to local files, git, terminal commands execution and AI-assisted file editing capabilities via MCP-SuperAssistant or similar projects.
  • ๐Ÿ‘ฉ๐Ÿปโ€๐Ÿ’ป Use it to boost code editors like Cursor, Windsurf or VSCode extensions like Roo Code, Cline, Copilot or Augment with intuitive Git management and AI-assisted file editing capabilities and say goodbye to those pesky diff application failures wasting your time or Roo having trouble... breaking your carefully engineered automation workflows. Aider seems to get diffs right! (if it still doesn't work quite well, try to find perfect way for your AI model by explicitly passing different edit_format parameters to ai_edit tool):
    • unidiff seems to work better with GPT
    • diff-fenced performs best with Gemini
    • diff provides balanced quick results on all models (default)
    • whole is the slowest but most reliable option as it simply overwrites file

๐Ÿฆ˜ Agentic-Driven Workflow with Roo

https://github.com/user-attachments/assets/4d218e5e-906c-4d24-abc3-09ab0acdc1d0

  • For Roo Code, place the .roomodes file into your repo root to experience automated two-levels deep nested agents execution flow:

    ๐Ÿ˜บ Basic Flow (Roo ๐Ÿชƒ adapted to summon Aider as level 2 subagent)

    • ๐Ÿ›ธ AI Orchestrator agent is your Basic Flow manager, so talk to it if you prefer to keep your agent management simple. It coordinates agents by breaking complex problems into logical subtasks and delegates each using the Roo Code native new_task tool, providing comprehensive, context-rich instructions for each specialized AI agent. Each subtask receives explicit instructions to only perform the outlined work and signal completion using native attempt_completion tool. The orchestrator tracks all subtasks, synthesizes results, and suggests workflow improvements to reach near complete automation of your dev workflow (this pdf might help). Works fine using fast models with reasoning enabled to speed up your workflow or deep reasoning models to add basic subtasks management.
    • ๐Ÿค– AI Code and ๐Ÿ‘พ AI Debug agents (fast models like Gemini Flash 2.5 / GPT 4.1 work well here with lower temperature) delegate all code changes to Aider via ai_edit tool and enforce strict MCP tool schema compliance and review of Aider agent work with automated agent redelegation on unsatisfactory or missing results by checking diff (or stdout) output of ai_edit tool call.
    • ๐Ÿ‘ฝ AI Architect and ๐Ÿ”ฌ AI Researcher agents are responsible for architectural directions and geneal R&D needs. Deep reasoning models (like DeepSeek R1 / Gemini Pro 2.5 / OpenAI o1/o3/o4mini) are recommended for ๐Ÿ‘ฝ AI Architect, and internet-connected models (like Perplexity Sonar) are recommended for ๐Ÿ”ฌ AI Researcher. Adjust temperatures based on creativity level needed.

    ๐Ÿ˜ผ Advanced Flow (RooRoo ๐Ÿงญ adapted to summon Aider as level 2 subagent)

    • ๐Ÿงญ Rooroo Navigator agent is your Advanced Flow manager, so talk to it if you prefer to keep your agent management in orderly manner. Responsible for overall project coordination and task orchestration, task lifecycles, delegation to Planner, Developer, Analyzer, Idea Sparker, processes your commands, and oversees your workflows. Provides context.md files to tasks, either the ones generated by ๐Ÿ—“๏ธ Rooroo Planner, or generates new one if Planner wasn't deemed neccessary for the task. If used without deep reasoning model, Navi tends to forget generating them on its own, but delegated agents will remind Navi, and task will be redelegated correctly with context.md provided. So decide on LLM model yourself for this one: if you prefer speed but can tolerate some inefficencies due to Navi forgetting to write context files, use fast models with reasoning enabled. So if you don't mind Navi thinking for a minute on every step, use deep reasoning model here as well. Still can't decide? This DeepSeek R1/V3 hybrid is a good candidate.
    • ๐Ÿ‘ฉ๐Ÿปโ€๐Ÿ’ป Rooroo Developer agent gets detailed instructions from ๐Ÿงญ Rooroo Navigator via context.md passed to it and outputs task result in strict JSON schema asking Navi for clarification or complaining if context file was not provided. (context file in question needs to be generated either by Navi itself or via invocation of specialized ๐Ÿ—“๏ธ Rooroo Planner agent). Same model recommendations apply from Basic flow.
    • ๐Ÿ“Š Rooroo Analyzer agent combines the functions of ๐Ÿ‘ฝ AI Architect and ๐Ÿ”ฌ AI Researcher from Basic flow, it also gets task context via context.md passed and complains back to Navi if it wasn't found. Deep reasoning models remommended. Internet-connected models might provide more relevant analysis results. Adjust temperature based on creativity needed.
    • ๐Ÿ—“๏ธ Rooroo Planner agent decomposes complex goals requiring multi-expert coordination into clear, actionable sub-tasks for other agents to do. It is also the main supplier of context.md files for them. Deep reasoning model also recommended.
    • ๐Ÿ’ก Rooroo Idea Sparker agent is your brainstorming copilot and innovation catalyst, talk to it if you'd like some creative thinking and assumption challenging done, or just explore something new with it. Deep reasoning model with higher temperature set or internet-connected model recommended here.

1๏ธโƒฃ Prerequisites

  • Python 3.12, uv

๐Ÿง Linux/macOS

curl -LsSf https://astral.sh/uv/install.sh | sh

๐ŸชŸ Windows

powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"

2๏ธโƒฃ Usage

๐Ÿ Running from PyPi

uvx mcp-devtools@1.2.0 -p 1337

๐Ÿˆโ€โฌ› Running from GitHub

๐Ÿง Linux/macOS

git clone "https://github.com/daoch4n/zen-ai-mcp-devtools/"
cd zen-ai-mcp-devtools
./server.sh -p 1337

๐ŸชŸ Windows

git clone "https://github.com/daoch4n/zen-ai-mcp-devtools/"
cd zen-ai-mcp-devtools
.\server.ps1 -p 1337

3๏ธโƒฃ MCP Server Configuration

To integrate mcp-devtools with your AI assistant, add the following configuration to your MCP settings file:

{
  "mcpServers": {
    "devtools": {
      "url": "http://127.0.0.1:1337/sse",
      "disabled": false,
      "alwaysAllow": [],
      "timeout": 900
    }
  }
}

4๏ธโƒฃ AI System Prompt Example

You are an AI assistant with access to development tools.
Use the tools provided by the 'devtools' MCP server for git management, file operations, and terminal access.
When using any tool from 'devtools', always provide the absolute path to the current repository's working directory as the 'repo_path' option.
Do not set 'repo_path' to any other folder.
The 'repo_path' must be explicitly requested from the user at the beginning of the conversation.
When using the 'execute_command' tool, the current working directory will be set to the 'repo_path' provided.
When performing file manipulations with 'execute_command', ensure to pass the full path in the terminal command, including the 'repo_path' prefix, for the manipulated file path.
When using the 'ai_edit' tool, never put actual square brackets and other JSON breaking symbols in the tool calls; instead, use verbal descriptions of them.

โ‰๏ธ Known Issues and Workarounds

๐Ÿ’พ Direct Code Editing vs ๐Ÿค– Delegated Editing

Issue:

  • ๐Ÿ” When using the write_to_file tool for direct code editing, especially with languages like JavaScript that utilize template literals (strings enclosed by backticks), you may encounter unexpected syntax errors. This issue stems from how the AI assistant generates the content string, where backticks and dollar signs within template literals might be incorrectly escaped with extra backslashes (\).

Mitigation:

  • ๐Ÿ”จ The write_to_file,search_and_replace and git_apply_diff tools are dynamically integrated with tsc (TypeScript compiler) for conditional type checking of .js, .mjs, and .ts files on edit. The output of tsc --noEmit --allowJs is provided as part of the tool's response. AI assistants should parse this output to detect any compiler errors and should not proceed with further actions if errors are reported, indicating a problem with the written code.

Workarounds:

  • ๐Ÿค– (most reliable) Instruct your AI assistant to delegate editing files to MCP-compatible coding agent by using ai_edit tool instead, as it is more suitable for direct code manipulation, automatically commits changes and produces resulting diff as tool output, and let AI assistant act as task orchestrator that will write down plans and docs with write_to_file tool then delegate actual coding to specialized agent, get its report (diff) as tool call result, use git_read_file tool to double check agent's work, and manage commits and branches (ai_edit tool basically integrates Aider via some logic ported from its MCP bridge).
  • ๐Ÿ–ฅ๏ธ (if you're feeling lucky) Instruct your AI assistant to craft a terminal command to edit problematic file via execute_command tool.

โ” Aider limitations due to its commit-first nature

Issue:

  • ๐Ÿ” When using ai_edit tool in a dirty repo state, e.g. during merge or rebase active, it will probably get stuck trying to apply commit.

Workarounds:

  • โš™๏ธ Temporarily disable auto commiting functions in your .aider.conf.yml configuration file.

๐Ÿ™ˆ Automation-Related Security Considerations

  • ๐Ÿ›ก๏ธ For automated workflows, always run MCP Servers in isolated environments (๐ŸงFirejail or ๐ŸชŸSandboxie)
  • ๐Ÿ—ƒ๏ธ Filesystem access boundaries are maintained via passing repo_path to every tool call, so AI assistant only has read/write access to files in the current workspace (relative to any path AI decides to pass as repo_path , make sure system prompt is solid on cwd use).
  • โš ๏ธ execute_command doesn't have strict access boundaries defined, while it does execute all commands with cwd set to repo_path (relative to it), nothing is there to stop AI from passing full paths to other places it seems fit; reading, altering or deleting unintended data on your whole computer, so execise extreme caution with auto-allowing execute_command tool or at least don't leave AI assistant unattended while doing so. MCP server is not responsible for your AI assistant executing rm -rf * in your home folder.

โ„น๏ธ Available Tools

git_status

  • Description: Shows the current status of the Git working tree, including untracked, modified, and staged files.
  • Input Schema:
    {
      "type": "object",
      "properties": {
        "repo_path": {
          "type": "string",
          "description": "The absolute path to the Git repository's working directory."
        }
      },
      "required": [
        "repo_path"
      ]
    }
    

git_diff_all

  • Description: Shows all changes in the working directory, including both staged and unstaged modifications, compared to the HEAD commit. This provides a comprehensive view of all local changes.
  • Input Schema:
    {
      "type": "object",
      "properties": {
        "repo_path": {
          "type": "string",
          "description": "The absolute path to the Git repository's working directory."
        }
      },
      "required": [
        "repo_path"
      ]
    }
    

git_diff

  • Description: Shows differences between the current working directory and a specified Git target (e.g., another branch, a specific commit hash, or a tag).
  • Input Schema:
    {
      "type": "object",
      "properties": {
        "repo_path": {
          "type": "string",
          "description": "The absolute path to the Git repository's working directory."
        },
        "target": {
          "type": "string",
          "description": "The target (e.g., branch name, commit hash, tag) to diff against. For example, 'main', 'HEAD~1', or a full commit SHA."
        }
      },
      "required": [
        "repo_path",
        "target"
      ]
    }
    

git_stage_and_commit

  • Description: Stages specified files (or all changes if no files are specified) and then commits them to the repository with a given message. This creates a new commit in the Git history.
  • Input Schema:
    {
      "type": "object",
      "properties": {
        "repo_path": {
          "type": "string",
          "description": "The absolute path to the Git repository's working directory."
        },
        "message": {
          "type": "string",
          "description": "The commit message for the changes."
        },
        "files": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "An optional list of specific file paths (relative to the repository root) to stage before committing. If not provided, all changes will be staged."
        }
      },
      "required": [
        "repo_path",
        "message"
      ]
    }
    

git_reset

  • Description: Unstages all currently staged changes in the repository, moving them back to the working directory without discarding modifications. This is equivalent to git reset without arguments.
  • Input Schema:
    {
      "type": "object",
      "properties": {
        "repo_path": {
          "type": "string",
          "description": "The absolute path to the Git repository's working directory."
        }
      },
      "required": [
        "repo_path"
      ]
    }
    

git_log

  • Description: Shows the commit history for the repository, listing recent commits with their hash, author, date, and message. The number of commits can be limited.
  • Input Schema:
    {
      "type": "object",
      "properties": {
        "repo_path": {
          "type": "string",
          "description": "The absolute path to the Git repository's working directory."
        },
        "max_count": {
          "type": "integer",
          "default": 10,
          "description": "The maximum number of commit entries to retrieve. Defaults to 10."
        }
      },
      "required": [
        "repo_path"
      ]
    }
    

git_create_branch

  • Description: Creates a new Git branch with the specified name. Optionally, you can base the new branch on an existing branch or commit, otherwise it defaults to the current active branch.
  • Input Schema:
    {
      "type": "object",
      "properties": {
        "repo_path": {
          "type": "string",
          "description": "The absolute path to the Git repository's working directory."
        },
        "branch_name": {
          "type": "string",
          "description": "The name of the new branch to create."
        },
        "base_branch": {
          "type": "string",
          "nullable": true,
          "description": "Optional. The name of the branch or commit hash to base the new branch on. If not provided, the new branch will be based on the current active branch."
        }
      },
      "required": [
        "repo_path",
        "branch_name"
      ]
    }
    

git_checkout

  • Description: Switches the current active branch to the specified branch name. This updates the working directory to reflect the state of the target branch.
  • Input Schema:
    {
      "type": "object",
      "properties": {
        "repo_path": {
          "type": "string",
          "description": "The absolute path to the Git repository's working directory."
        },
        "branch_name": {
          "type": "string",
          "description": "The name of the branch to checkout."
        }
      },
      "required": [
        "repo_path",
        "branch_name"
      ]
    }
    

git_show

  • Description: Shows the metadata (author, date, message) and the diff of a specific commit. This allows inspection of changes introduced by a particular commit.
  • Input Schema:
    {
      "type": "object",
      "properties": {
        "repo_path": {
          "type": "string",
          "description": "The absolute path to the Git repository's working directory."
        },
        "revision": {
          "type": "string",
          "description": "The commit hash or reference (e.g., 'HEAD', 'main', 'abc1234') to show details for."
        }
      },
      "required": [
        "repo_path",
        "revision"
      ]
    }
    

git_apply_diff

  • Description: Applies a given diff content (in unified diff format) to the working directory of the repository. This can be used to programmatically apply patches or changes.
  • Input Schema:
    {
      "type": "object",
      "properties": {
        "repo_path": {
          "type": "string",
          "description": "The absolute path to the Git repository's working directory."
        },
        "diff_content": {
          "type": "string",
          "description": "The diff content string to apply to the repository. This should be in a unified diff format."
        }
      },
      "required": [
        "repo_path",
        "diff_content"
      ]
    }
    

git_read_file

  • Description: Reads and returns the entire content of a specified file within the Git repository's working directory. The file path must be relative to the repository root.
  • Input Schema:
    {
      "type": "object",
      "properties": {
        "repo_path": {
          "type": "string",
          "description": "The absolute path to the Git repository's working directory."
        },
        "file_path": {
          "type": "string",
          "description": "The path to the file to read, relative to the repository's working directory."
        }
      },
      "required": [
        "repo_path",
        "file_path"
      ]
    }
    

search_and_replace

  • Description: Searches for a specified string or regex pattern within a file and replaces all occurrences with a new string. Supports case-insensitive search and line-range restrictions. It attempts to use sed for efficiency, falling back to Python logic if sed fails or makes no changes.
  • Input Schema:
    {
      "type": "object",
      "properties": {
        "repo_path": {
          "type": "string",
          "description": "The absolute path to the Git repository's working directory."
        },
        "file_path": {
          "type": "string",
          "description": "The path to the file to modify, relative to the repository's working directory."
        },
        "search_string": {
          "type": "string",
          "description": "The string or regex pattern to search for within the file."
        },
        "replace_string": {
          "type": "string",
          "description": "The string to replace all matches of the search string with."
        },
        "ignore_case": {
          "type": "boolean",
          "default": false,
          "description": "If true, the search will be case-insensitive. Defaults to false."
        },
        "start_line": {
          "type": "integer",
          "nullable": true,
          "description": "Optional. The 1-based starting line number for the search and replace operation (inclusive). If not provided, search starts from the beginning of the file."
        },
        "end_line": {
          "type": "integer",
          "nullable": true,
          "description": "Optional. The 1-based ending line number for the search and replace operation (inclusive). If not provided, search continues to the end of the file."
        }
      },
      "required": [
        "repo_path",
        "file_path",
        "search_string",
        "replace_string"
      ]
    }
    

write_to_file

  • Description: Writes the provided content to a specified file within the repository. If the file does not exist, it will be created. If it exists, its content will be completely overwritten. Includes a check to ensure content was written correctly and generates a diff.
  • Input Schema:
    {
      "type": "object",
      "properties": {
        "repo_path": {
          "type": "string",
          "description": "The absolute path to the Git repository's working directory."
        },
        "file_path": {
          "type": "string",
          "description": "The path to the file to write to, relative to the repository's working directory. The file will be created if it doesn't exist, or overwritten if it does."
        },
        "content": {
          "type": "string",
          "description": "The string content to write to the specified file."
        }
      },
      "required": [
        "repo_path",
        "file_path",
        "content"
      ]
    }
    

execute_command

  • Description: Executes an arbitrary shell command within the context of the specified repository's working directory. This tool can be used for tasks not covered by other specific Git tools, such as running build scripts, linters, or other system commands.
  • Input Schema:
    {
      "type": "object",
      "properties": {
        "repo_path": {
          "type": "string",
          "description": "The absolute path to the directory where the command should be executed."
        },
        "command": {
          "type": "string",
          "description": "The shell command string to execute (e.g., 'ls -l', 'npm install')."
        }
      },
      "required": [
        "repo_path",
        "command"
      ]
    }
    

ai_edit

  • Description: AI pair programming tool for making targeted code changes using Aider. Use this tool to:

    1. Implement new features or functionality in existing code
    2. Add tests to an existing codebase
    3. Fix bugs in code
    4. Refactor or improve existing code
    5. Make structural changes across multiple files

    The tool requires:

    • A repository path where the code exists
    • A detailed message describing what changes to make. Please only describe one change per message. If you need to make multiple changes, please submit multiple requests.

    Edit Format Selection: If the edit_format option is not explicitly provided, the default is selected based on the model name:

    • If the model includes gemini, defaults to diff-fenced
    • If the model includes gpt, defaults to udiff
    • Otherwise, defaults to diff

    Best practices for messages:

    • Be specific about what files or components to modify
    • Describe the desired behavior or functionality clearly
    • Provide context about the existing codebase structure
    • Include any constraints or requirements to follow

    Examples of good messages:

    • "Add unit tests for the Customer class in src/models/customer.rb testing the validation logic"
    • "Implement pagination for the user listing API in the controllers/users_controller.js file"
    • "Fix the bug in utils/date_formatter.py where dates before 1970 aren't handled correctly"
    • "Refactor the authentication middleware in middleware/auth.js to use async/await instead of callbacks"
  • Input Schema:

    {
      "type": "object",
      "properties": {
        "repo_path": {
          "type": "string",
          "description": "The absolute path to the Git repository's working directory where the AI edit should be performed."
        },
        "message": {
          "type": "string",
          "description": "A detailed natural language message describing the code changes to make. Be specific about files, desired behavior, and any constraints."
        },
        "files": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "A list of file paths (relative to the repository root) that Aider should operate on. This argument is mandatory."
        },
        "options": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Optional. A list of additional command-line options to pass directly to Aider (e.g., ['--model=gpt-4o', '--dirty-diff']). Each option should be a string."
        },
        "edit_format": {
          "type": "string",
          "enum": [
            "diff",
            "diff-fenced",
            "udiff",
            "whole"
          ],
          "default": "diff",
          "description": "Optional. The format Aider should use for edits. Defaults to 'diff'. Options: 'diff', 'diff-fenced', 'udiff', 'whole'."
        }
      },
      "required": [
        "repo_path",
        "message",
        "files"
      ]
    }
    

aider_status

  • Description: Check the status of Aider and its environment. Use this to:
    1. Verify Aider is correctly installed
    2. Check API keys
    3. View the current configuration
    4. Diagnose connection or setup issues
  • Input Schema:
    {
      "type": "object",
      "properties": {
        "repo_path": {
          "type": "string",
          "description": "The absolute path to the Git repository or working directory to check Aider's status within."
        },
        "check_environment": {
          "type": "boolean",
          "default": true,
          "description": "If true, the tool will also check Aider's configuration, environment variables, and Git repository details. Defaults to true."
        }
      },
      "required": [
        "repo_path"
      ]
    }
    

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mcp_devtools-1.2.4.tar.gz (28.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mcp_devtools-1.2.4-py3-none-any.whl (28.1 kB view details)

Uploaded Python 3

File details

Details for the file mcp_devtools-1.2.4.tar.gz.

File metadata

  • Download URL: mcp_devtools-1.2.4.tar.gz
  • Upload date:
  • Size: 28.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for mcp_devtools-1.2.4.tar.gz
Algorithm Hash digest
SHA256 453c467df64146a29d3b0702f68a0a11e2a65e39ffcf088bdc6b5f1b61f25159
MD5 45d79993ffbae9900e7bdb55d5bc24a6
BLAKE2b-256 a7492adb033f6af52947b5e9746706b437d40b2d6c63ac215ae865fa8df340a5

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcp_devtools-1.2.4.tar.gz:

Publisher: python-package.yml on daoch4n/zen-ai-mcp-devtools

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mcp_devtools-1.2.4-py3-none-any.whl.

File metadata

  • Download URL: mcp_devtools-1.2.4-py3-none-any.whl
  • Upload date:
  • Size: 28.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for mcp_devtools-1.2.4-py3-none-any.whl
Algorithm Hash digest
SHA256 44ab1cfc6589abb6442e86fef8270adddd3cd3957133ae3a9eb4a1f416508ae8
MD5 2632dc9acef2115125998fbae5abafa8
BLAKE2b-256 1e178c602bc45906e321fc2cf23b6028430befef3adea4b084c72f60cb67299e

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcp_devtools-1.2.4-py3-none-any.whl:

Publisher: python-package.yml on daoch4n/zen-ai-mcp-devtools

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page