
Product
Socket Now Supports pylock.toml Files
Socket now supports pylock.toml, enabling secure, reproducible Python builds with advanced scanning and full alignment with PEP 751's new standard.
A Model Context Protocol server for turning repositories into navigable MCP systems
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.
pip install dev-kit-mcp-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
uv run python -m dev_kit_mcp_server.mcp_server --root-dir=workdir
python -m dev_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.
The server provides the following tools:
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"
from fastmcp import Client
async def example():
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"]})
# 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"})
# Clone the repository
git clone https://github.com/DanielAvdar/dev-kit-mcp-server.git
cd dev-kit-mcp-server
# Install development dependencies
pip install -e ".[dev]"
# Run tests
pytest
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
FAQs
A Model Context Protocol server for turning repositories into navigable MCP systems
We found that dev-kit-mcp-server demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago.Β It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket now supports pylock.toml, enabling secure, reproducible Python builds with advanced scanning and full alignment with PEP 751's new standard.
Security News
Research
Socket uncovered two npm packages that register hidden HTTP endpoints to delete all files on command.
Research
Security News
Malicious Ruby gems typosquat Fastlane plugins to steal Telegram bot tokens, messages, and files, exploiting demand after Vietnamβs Telegram ban.