MCP Development File Tool

The hot-pluggable dev_file tool is implemented in /home/john/py/mcp-tools/dev_file_tools.py. It is discovered by misc_mcp_server.py when the process has MISC_MCP_TOOL_PATH including /home/john/py/mcp-tools.

Operations

Path And Lines

All paths are relative to /home/john/py/mcp-tools. Line numbers are 1-based and inclusive. Absolute paths, .. traversal, and symlinks resolving outside the root are rejected. The root directory itself cannot be deleted. Writes use an atomic temporary-file replacement.

Examples

Safety

This is intentionally a write/delete capability for the development plugin directory. It can modify executable Python code, so use it only for files under the configured development root. It does not grant access to files outside that root and does not automatically reload the server process; the plugin loader detects source changes during its next discovery.

Testing

The repository test_mcp_tool_plugins.py includes four focused dev_file tests. The complete remediation suite ran on 2026-09-05 with 30 tests passing.

version 1