dev-kit-mcp-server 0.1.5b0
pip install dev-kit-mcp-server
Released:
A Model Context Protocol server for turning repositories into navigable MCP systems
Navigation
Verified details
These details have been verified by PyPIMaintainers
๐ Avatar for DanielAvdar from gravatar.comDanielAvdar
Unverified details
These details have not been verified by PyPIMeta
- License: MIT License (MIT)
- Author: DanielAvdar
- Tags ast , code-exploration , code-structure , mcp , python , repository-navigation , tokenize
- Requires: Python >=3.10
-
Provides-Extra:
github
Classifiers
- License
- Operating System
- Programming Language
Project description
Dev-Kit MCP Server
๐ PyPI - Python Version
๐ version
๐ License
๐ OS
๐ OS
๐ OS
๐ Tests
๐ Code Checks
๐ codecov
๐ Ruff
๐ Last Commit
A Model Context Protocol (MCP) server targeted for agent development tools, providing scoped authorized operations in the root project directory. This package enables secure execution of operations such as running makefile commands, moving and deleting files, with future plans to include more tools for code editing. It serves as an excellent MCP server for VS-Code copilot and other AI-assisted development tools.
๐ dev-kit-mcp-server MCP serverFeatures
- ๐ Secure Operations: Execute operations within a scoped, authorized root directory
- ๐ ๏ธ Makefile Command Execution: Run makefile commands securely within the project
- ๐ File Operations: Move, Create, Rename and Delete files within the authorized directory
- ๐ Git Operations: Perform Git operations like status, add, commit, push, pull, and checkout
- ๐ MCP Integration: Turn any codebase into an MCP-compliant system
- ๐ค AI-Assisted Development: Excellent integration with VS-Code copilot and other AI tools
- ๐ Extensible Framework: Easily add new tools for code editing and other operations
- ๐ Fast Performance: Built with FastMCP for high performance
Installation
pipinstalldev-kit-mcp-server
Usage
Running the Server
# Recommended method (with root directory specified) dev-kit-mcp-server--root-dir=workdir # With custom TOML file for predefined commands dev-kit-mcp-server--root-dir=workdir--commands-toml=custom_commands.toml # Alternative methods uvrunpython-mdev_kit_mcp_server.mcp_server--root-dir=workdir python-mdev_kit_mcp_server.mcp_server--root-dir=workdir
The --root-dir parameter specifies the directory where file operations will be performed. This is important for security reasons, as it restricts file operations to this directory only.
The --commands-toml parameter allows you to specify a custom TOML file for predefined commands instead of using the default pyproject.toml file. This is useful when you want to define a separate set of commands for different purposes.
Available Tools
The server provides the following tools:
File Operations
- create_dir: Create directories within the authorized root directory
- edit_file: Edit files by replacing lines between specified start and end lines with new text
- move_dir: Move files and directories within the authorized root directory
- remove_file: Delete files within the authorized root directory
- rename_file: Rename files and directories within the authorized root directory
Git Operations
- git_status: Get the status of the Git repository (changed files, untracked files, etc.)
- git_add: Add files to the Git index (staging area)
- git_commit: Commit changes to the Git repository
- git_push: Push changes to a remote Git repository
- git_pull: Pull changes from a remote Git repository
- git_checkout: Checkout or create a branch in the Git repository
- git_diff: Show diffs between commits, commit and working tree, etc.
Makefile Operations
- exec_make_target: Run makefile commands securely within the project
Exploration Operations
- search_files: Search for files by regex pattern in the project directory. Supports optional root directory and output length limits.
- search_text: Search for lines in files matching a given pattern. Supports file filtering, context lines, and output length limits.
- read_lines: Read specific lines or a range from a file. Supports line range selection and output length limits.
Predefined Commands
- predefined_commands: Execute predefined commands from a TOML file (default: pyproject.toml under [tool.dkmcp.commands] section)
The TOML file format for predefined commands is as follows:
[tool.dkmcp.commands] test="uv run pytest" lint="ruff check" check="uvx pre-commit run --all-files" doctest="make doctest"
Each command is defined as a key-value pair where the key is the command name and the value is the command to execute. For example, when you call the predefined command "test", it will execute "uv run pytest" in the root directory.
Here's a simple example of how to define commands in a custom TOML file:
# custom_commands.toml [tool.dkmcp.commands] # Basic commands hello="echo Hello, World!" date="date" # Development commands test="pytest" lint="ruff check ." build="python setup.py build"
Example Usage with MCP Client
fromfastmcpimport Client async defexample(): async with Client() as client: # List available tools tools = await client.list_tools() # File Operations # Create a directory result = await client.call_tool("create_dir", {"path": "new_directory"}) # Move a file result = await client.call_tool("move_dir", {"path1": "source.txt", "path2": "destination.txt"}) # Remove a file result = await client.call_tool("remove_file", {"path": "file_to_remove.txt"}) # Rename a file result = await client.call_tool("rename_file", {"path": "old_name.txt", "new_name": "new_name.txt"}) # Edit a file result = await client.call_tool("edit_file", { "path": "file_to_edit.txt", "start_line": 2, "end_line": 4, "text": "This text will replace lines 2-4" }) # Git Operations # Get repository status result = await client.call_tool("git_status") # Add files to the index result = await client.call_tool("git_add", {"paths": ["file1.txt", "file2.txt"]}) # Commit changes result = await client.call_tool("git_commit", {"message": "Add new files"}) # Pull changes from remote result = await client.call_tool("git_pull", {"remote": "origin", "branch": "main"}) # Push changes to remote result = await client.call_tool("git_push") # Checkout a branch result = await client.call_tool("git_checkout", {"branch": "feature-branch", "create": True}) # Makefile Operations # Run a makefile command result = await client.call_tool("exec_make_target", {"commands": ["test"]}) # Exploration Operations # Search for Python files result = await client.call_tool("search_files", {"pattern": ".*\\.py$"}) # Search for files in a specific directory with output limit result = await client.call_tool("search_files", { "pattern": "test.*", "root": "tests", "max_chars": 1000 }) # Search for text patterns in files result = await client.call_tool("search_text", {"pattern": "def.*test"}) # Search in specific files with context result = await client.call_tool("search_text", { "pattern": "import", "files": ["main.py", "utils.py"], "context": 2 }) # Read specific lines from a file result = await client.call_tool("read_lines", {"file_path": "README.md", "start": 1, "end": 10}) # Read entire file with character limit result = await client.call_tool("read_lines", { "file_path": "config.json", "max_chars": 500 }) # Predefined Commands # Execute a predefined command result = await client.call_tool("predefined_commands", {"command": "test"}) # Execute a predefined command with a parameter result = await client.call_tool("predefined_commands", {"command": "test", "param": "specific_test"})
Development
Setup
# Clone the repository gitclonehttps://github.com/DanielAvdar/dev-kit-mcp-server.git cddev-kit-mcp-server # Install development dependencies pipinstall-e".[dev]" # Run tests pytest
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Project details
Verified details
These details have been verified by PyPIMaintainers
๐ Avatar for DanielAvdar from gravatar.comDanielAvdar
Unverified details
These details have not been verified by PyPIMeta
- License: MIT License (MIT)
- Author: DanielAvdar
- Tags ast , code-exploration , code-structure , mcp , python , repository-navigation , tokenize
- Requires: Python >=3.10
-
Provides-Extra:
github
Classifiers
- License
- Operating System
- Programming Language
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dev_kit_mcp_server-0.1.5b0.tar.gz.
File metadata
- Download URL: dev_kit_mcp_server-0.1.5b0.tar.gz
- Upload date:
- Size: 20.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
16e2525a276a3753a0dcce29fd99632b45c221b622890714e42b78eae8f476f5
|
|
| MD5 |
f000ead9c81055d83144e4bca416c392
|
|
| BLAKE2b-256 |
e4145b78253bd8ab8048f5b0bb4c3cb18c32b029fb695311de7dba895ba7ae15
|
File details
Details for the file dev_kit_mcp_server-0.1.5b0-py3-none-any.whl.
File metadata
- Download URL: dev_kit_mcp_server-0.1.5b0-py3-none-any.whl
- Upload date:
- Size: 36.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0faf7d21a1ca612bb390236ff5c4d33924dcfa9a7ae027e41d0b3ba96b9c8e9d
|
|
| MD5 |
d67d6d2995019f524a75738e9423613c
|
|
| BLAKE2b-256 |
ce17725f4a2b58066362e8b7c3b892f5b61bed7610fed1220d5c91bdf7a8a8c6
|
