Skip to main content

A short description of your project.

Project description

mcp-devtools: multi-functional development tools MCP server over SSE

  • mcp-devtools offers a comprehensive suite of development tools, including extensive Git operations
    • (git_status, git_diff, git_commit, git_add, git_reset, git_log, branch management, git_checkout, git_show, git_apply_diff, git_read_file, git_stage_all)
    • general file manipulation (search_and_replace, write_to_file)
    • ability to execute shell commands (execute_command)
  • All these functionalities are accessible via Server-Sent Events (SSE), making it a powerful and versatile server for various development needs.
  • Filesystem access boundaries are maintained via passing repo_path to every file command, so AI assistant only has read/write access to files in the current workspace (or whatever it decides to pass as repo_path , make sure system prompt is solid on that part).
  • It also won't stop assistant from execute_command rm -rf ~/* , so execise extreme caution with auto-allowing command execution tool or at least don't leave assistant unattended when doing so.

Prerequisites

pip install uv

Running with uvx (Recommended)

uvx mcp-devtools@latest -p 1337

Running from git

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

AI System Prompt

You have development tools at your disposal. Use relevant tools from devtools MCP server for git management, file operations, and terminal access. When using any tool from devtools, always provide the current repository full current working directory path as the 'repo_path' option, do not set it to any other folder. 'repo_path' must be explicitly asked from user in beginning of conversation. When using execute_command tool, the current working directory will be set to repo_path provided. When using it for file manipulations, make sure to pass full path in the terminal command including repo_path prefix as manipulated file path.

Integration

mcp-devtools is designed to be used in conjunction with MCP-SuperAssistant or similar projects to extend online chat-based assistants such as ChatGPT, Google Gemini, Perplexity, Grok, Google AI Studio, OpenRouter Chat, DeepSeek, Kagi, T3 Chat with direct access to local files, git and cli tools.

MCP Server Configuration Example

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

Known Issues and Workarounds

Issue:

write_to_file and 💾 Direct Code Editing vs 🤖 Delegated Editing by Coding Agent

  • 🔍 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 tool integrates with tsc (TypeScript compiler) for .js, .mjs, and .ts files. 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 adding it as another MCP server, as it is more suitable for direct code manipulation, and let AI assistant act as task orchestrator that will write down plans and docs with write_to_file and delegate coding to specialized agent, then use git_read_file or git_diff to check up on agent's work, and manage commits and branches (Aider via its MCP bridge is a good candidate to explore).
  • 🖥️ (if you're feeling lucky) Instruct your AI assistant to craft a terminal command to edit problematic file via execute_command tool.

Available Tools

git_status

  • Description: Shows the working tree status.
  • Input Schema:
    {
      "type": "object",
      "properties": {
        "repo_path": {
          "type": "string"
        }
      },
      "required": [
        "repo_path"
      ]
    }
    

git_diff_unstaged

  • Description: Shows changes in the working directory that are not yet staged.
  • Input Schema:
    {
      "type": "object",
      "properties": {
        "repo_path": {
          "type": "string"
        }
      },
      "required": [
        "repo_path"
      ]
    }
    

git_diff_staged

  • Description: Shows changes that are staged for commit.
  • Input Schema:
    {
      "type": "object",
      "properties": {
        "repo_path": {
          "type": "string"
        }
      },
      "required": [
        "repo_path"
      ]
    }
    

git_diff

  • Description: Shows differences between branches or commits.
  • Input Schema:
    {
      "type": "object",
      "properties": {
        "repo_path": {
          "type": "string"
        },
        "target": {
          "type": "string"
        }
      },
      "required": [
        "repo_path",
        "target"
      ]
    }
    

git_commit

  • Description: Records changes to the repository.
  • Input Schema:
    {
      "type": "object",
      "properties": {
        "repo_path": {
          "type": "string"
        },
        "message": {
          "type": "string"
        }
      },
      "required": [
        "repo_path",
        "message"
      ]
    }
    

git_add

  • Description: Adds file contents to the staging area.
  • Input Schema:
    {
      "type": "object",
      "properties": {
        "repo_path": {
          "type": "string"
        },
        "files": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "required": [
        "repo_path",
        "files"
      ]
    }
    

git_reset

  • Description: Unstages all staged changes.
  • Input Schema:
    {
      "type": "object",
      "properties": {
        "repo_path": {
          "type": "string"
        }
      },
      "required": [
        "repo_path"
      ]
    }
    

git_log

  • Description: Shows the commit logs.
  • Input Schema:
    {
      "type": "object",
      "properties": {
        "repo_path": {
          "type": "string"
        },
        "max_count": {
          "type": "integer",
          "default": 10
        }
      },
      "required": [
        "repo_path"
      ]
    }
    

git_create_branch

  • Description: Creates a new branch from an optional base branch.
  • Input Schema:
    {
      "type": "object",
      "properties": {
        "repo_path": {
          "type": "string"
        },
        "branch_name": {
          "type": "string"
        },
        "base_branch": {
          "type": "string",
          "nullable": true
        }
      },
      "required": [
        "repo_path",
        "branch_name"
      ]
    }
    

git_checkout

  • Description: Switches branches.
  • Input Schema:
    {
      "type": "object",
      "properties": {
        "repo_path": {
          "type": "string"
        },
        "branch_name": {
          "type": "string"
        }
      },
      "required": [
        "repo_path",
        "branch_name"
      ]
    }
    

git_show

  • Description: Shows the contents of a commit.
  • Input Schema:
    {
      "type": "object",
      "properties": {
        "repo_path": {
          "type": "string"
        },
        "revision": {
          "type": "string"
        }
      },
      "required": [
        "repo_path",
        "revision"
      ]
    }
    

git_apply_diff

  • Description: Applies a diff to the working directory. Also outputs a diff of the changes made after successful application and tsc --noEmit --allowJs output for .js, .mjs, and .ts files to facilitate clean edits.
  • Input Schema:
    {
      "type": "object",
      "properties": {
        "repo_path": {
          "type": "string"
        },
        "diff_content": {
          "type": "string"
        }
      },
      "required": [
        "repo_path",
        "diff_content"
      ]
    }
    

git_read_file

  • Description: Reads the content of a file in the repository.
  • Input Schema:
    {
      "type": "object",
      "properties": {
        "repo_path": {
          "type": "string"
        },
        "file_path": {
          "type": "string"
        }
      },
      "required": [
        "repo_path",
        "file_path"
      ]
    }
    

git_stage_all

  • Description: Stages all changes in the working directory.
  • Input Schema:
    {
      "type": "object",
      "properties": {
        "repo_path": {
          "type": "string"
        }
      },
      "required": [
        "repo_path"
      ]
    }
    

search_and_replace

  • Description: Searches for a string or regex pattern in a file and replaces it with another string. It first attempts to use sed for the replacement. If sed fails or makes no changes, it falls back to a Python-based logic that first attempts a literal search and then a regex search if no literal matches are found. Also outputs a diff of the changes made after successful replacement and tsc --noEmit --allowJs output for .js, .mjs, and .ts files to facilitate clean edits.
  • Input Schema:
    {
      "type": "object",
      "properties": {
        "repo_path": {
          "type": "string"
        },
        "file_path": {
          "type": "string"
        },
        "search_string": {
          "type": "string"
        },
        "replace_string": {
          "type": "string"
        },
        "ignore_case": {
          "type": "boolean",
          "default": false
        },
        "start_line": {
          "type": "integer",
          "nullable": true
        },
        "end_line": {
          "type": "integer",
          "nullable": true
        }
      },
      "required": [
        "repo_path",
        "file_path",
        "search_string",
        "replace_string"
      ]
    }
    

write_to_file

  • Description: Writes content to a specified file, creating it if it doesn't exist or overwriting it if it does. Also outputs a diff of the changes made after successful write and tsc --noemit --allowJs output for .js .mjs .ts files to facilitate clean edits.
  • Input Schema:
    {
      "type": "object",
      "properties": {
        "repo_path": {
          "type": "string"
        },
        "file_path": {
          "type": "string"
        },
        "content": {
          "type": "string"
        }
      },
      "required": [
        "repo_path",
        "file_path",
        "content"
      ]
    }
    

execute_command

  • Description: Executes a custom shell command. The repo_path parameter is used to set the current working directory (cwd) for the executed command.
  • Input Schema:
    {
      "type": "object",
      "properties": {
        "repo_path": {
          "type": "string"
        },
        "command": {
          "type": "string"
        }
      },
      "required": [
        "repo_path",
        "command"
      ]
    }
    

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.0.6.tar.gz (12.3 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.0.6-py3-none-any.whl (12.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mcp_devtools-1.0.6.tar.gz
  • Upload date:
  • Size: 12.3 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.0.6.tar.gz
Algorithm Hash digest
SHA256 909a09d2879028b65496d9eaf0a95d1df11afe977996106e5954251ba81fcbeb
MD5 e9af43cbcde067ec22b156d28138462b
BLAKE2b-256 f964a29c6e933e3e916723ebec8950a5285b38af7499b1e9f04a30df5fddd857

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcp_devtools-1.0.6.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.0.6-py3-none-any.whl.

File metadata

  • Download URL: mcp_devtools-1.0.6-py3-none-any.whl
  • Upload date:
  • Size: 12.5 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.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 a041989da3bbb6e0ddeb4edc99f6745441040ffef7f6727023591d92b697cdb9
MD5 47dd3ead786849f52d6b051517222f8e
BLAKE2b-256 baf48f3e3fd179f3181cf008fbaeb4f75b2b5ac2c377bda1fe9d72ec4eb63913

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcp_devtools-1.0.6-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