| name | coding-tools-mcp-server |
| description | MCP server that gives AI agents local coding primitives for file operations, git commands, and safe command execution |
| triggers | ["how do I set up the coding-tools MCP server","configure coding tools for file operations and git","run commands safely in a workspace with MCP","set up local coding agent with file access","install coding-tools-mcp for Claude or Cursor","use MCP server for repository inspection and patching","execute shell commands through MCP with safety controls","configure remote MCP server with authentication"] |
Coding Tools MCP Server
Skill by ara.so — MCP Skills collection.
Overview
Coding Tools MCP is a model-neutral coding-agent runtime MCP server that exposes local coding primitives to any MCP client. It provides safe, workspace-bounded operations for:
- File operations: read, list, search files with automatic exclusion of build artifacts
- Structured patching: apply unified diff patches to files
- Command execution: run shell commands with safety controls, timeouts, and permission gates
- Git operations: status, diff, log, show, blame (read-only git inspection)
- Interactive sessions: manage stdin for long-running processes
- Image viewing: inspect image files with optional auto-resize
The server enforces workspace boundaries, rejects path traversal, blocks sensitive environment variables, and provides configurable permission modes.
Installation
Quick Install (Standalone)
curl -fsSL https://raw.githubusercontent.com/xyTom/coding-tools-mcp/main/scripts/install.sh | bash
uvx coding-tools-mcp --workspace /path/to/repo
Install with HTTP Server
curl -fsSL https://raw.githubusercontent.com/xyTom/coding-tools-mcp/main/scripts/install.sh \
| bash -s -- --start --workspace /path/to/repo
Install with Development Dependencies
git clone https://github.com/xyTom/coding-tools-mcp.git
cd coding-tools-mcp
python -m pip install -e ".[dev]"
python -m pip install -e ".[image]"
MCP Client Configuration
Claude Code
Add to claude_desktop_config.json:
{
"mcpServers": {
"coding-tools": {
"command": "uvx",
"args": ["coding-tools-mcp", "--stdio", "--workspace", "/path/to/repo"]
}
}
}
Cursor
Add to Cursor's MCP settings:
{
"mcpServers": {
"coding-tools": {
"command": "uvx",
"args": ["coding-tools-mcp", "--stdio", "--workspace", "/path/to/repo"]
}
}
}
Generic TOML Configuration
[mcp_servers.coding_tools]
command = "uvx"
args = ["coding-tools-mcp", "--stdio", "--workspace", "/path/to/repo"]
HTTP Client Configuration
For Streamable HTTP clients using protocol version 2025-06-18:
coding-tools-mcp --workspace /path/to/repo
Permission Modes
The server has three permission modes:
Safe Mode (Default)
coding-tools-mcp --permission-mode safe --workspace /path/to/repo
- Blocks shell expansion (
$VAR, $(command), glob patterns)
- Blocks network-looking commands
- Checks for destructive operations
- Filters sensitive environment variables
- Requires explicit permission for risky operations
Trusted Mode (Local Development)
coding-tools-mcp --permission-mode trusted --workspace /path/to/repo
CODING_TOOLS_MCP_SHELL_ENV_INHERIT=all \
coding-tools-mcp --permission-mode trusted --workspace /path/to/repo
- Allows shell expansion for local toolchains
- Allows dependency downloads
- Allows inline interpreter snippets
- Still filters secrets and destructive commands
Dangerous Mode (Isolated Environments Only)
coding-tools-mcp --permission-mode dangerous --workspace /path/to/repo
- Disables all
exec_command permission gates
- Only use inside isolated containers or VMs
- Workspace path boundaries still apply for file operations
Core Tools
File Operations
read_file
{
"path": "src/main.py",
"start_line": 10,
"end_line": 50
}
list_dir
{
"path": "src",
"recursive": False
}
list_files
{
"path": ".",
"pattern": "*.py",
"recursive": True
}
search_text
{
"query": "def authenticate",
"path": "src",
"case_sensitive": False,
"regex": False,
"max_results": 100
}
Patching
apply_patch
{
"patch": """--- a/src/config.py
+++ b/src/config.py
@@ -10,3 +10,4 @@
DEBUG = False
+FEATURE_FLAG = True
""",
"dry_run": False
}
Command Execution
exec_command
{
"command": "pytest tests/test_auth.py -v",
"cwd": ".",
"timeout": 30,
"capture_output": True,
"env": {
"PYTEST_ARGS": "--maxfail=1"
}
}
Safety features:
- Workspace-bounded working directory
- Timeout enforcement (default 30s for one-shot, 3600s for sessions)
- Output caps (1MB stdout, 256KB stderr per command)
- Sensitive value filtering in environment
- Destructive command checks
- Network command permission gates (in safe mode)
- Shell expansion gates (in safe mode)
- Landlock filesystem confinement on supported Linux hosts
write_stdin
{
"session_id": "exec_abc123",
"data": "yes\n"
}
kill_session
{
"session_id": "exec_abc123",
"signal": "SIGTERM"
}
Git Operations (Read-Only)
git_status
{
"cwd": "."
}
git_diff
{
"cwd": ".",
"staged": False,
"paths": ["src/"]
}
git_log
{
"cwd": ".",
"max_count": 20,
"path": "src/main.py"
}
git_show
{
"cwd": ".",
"revision": "HEAD~1",
"path": "src/config.py"
}
git_blame
{
"path": "src/main.py",
"start_line": 10,
"end_line": 50
}
Workspace Management
get_default_cwd
set_default_cwd
{
"cwd": "services/api"
}
server_info
view_image
{
"path": "assets/logo.png",
"max_dimension": 1024
}
Permission Management
request_permissions
{
"permissions": ["network", "shell_expansion"],
"reason": "Need to download dependencies with npm install"
}
Tool Profiles
Control which tools are exposed:
coding-tools-mcp --workspace /path/to/repo
CODING_TOOLS_MCP_TOOL_PROFILE=read-only coding-tools-mcp --workspace /path/to/repo
CODING_TOOLS_MCP_TOOL_PROFILE=compat-readonly-all coding-tools-mcp --workspace /path/to/repo
Remote MCP Setup
Bearer Token Auth (Recommended for Testing)
CODING_TOOLS_MCP_AUTH_MODE=noauth \
CODING_TOOLS_MCP_TOOL_PROFILE=read-only \
./scripts/tunnel.sh cloudflared /path/to/repo
CODING_TOOLS_MCP_AUTH_MODE=bearer \
CODING_TOOLS_MCP_BEARER_TOKEN="your-secret-token-here" \
./scripts/tunnel.sh cloudflared /path/to/repo
OAuth 2.1 Auth (For Production Clients)
CODING_TOOLS_MCP_AUTH_MODE=oauth \
./scripts/tunnel.sh cloudflared /path/to/repo
CODING_TOOLS_MCP_AUTH_MODE=oauth \
CODING_TOOLS_MCP_SERVER_URL=https://your-domain.com \
CODING_TOOLS_MCP_OAUTH_CLIENT_ID=client-id \
CODING_TOOLS_MCP_OAUTH_CLIENT_SECRET=client-secret \
./scripts/tunnel.sh cloudflared /path/to/repo
Supported Tunnels
scripts/tunnel.sh cloudflared /path/to/repo
scripts/tunnel.sh ngrok /path/to/repo
scripts/tunnel.sh devtunnel /path/to/repo
scripts/install.sh --tunnel cloudflared --auto-install-tunnel --workspace /path/to/repo
Common Patterns
Python Project Test Run
list_files({"path": ".", "recursive": True})
read_file({"path": "pytest.ini"})
git_status({"cwd": "."})
exec_command({
"command": "pytest tests/test_api.py -v --tb=short",
"timeout": 60
})
git_status({"cwd": "."})
JavaScript Dependency Install
request_permissions({
"permissions": ["network"],
"reason": "Install npm dependencies"
})
read_file({"path": "package.json"})
exec_command({
"command": "npm install",
"timeout": 300
})
list_dir({"path": "node_modules"})
Patch Application Workflow
search_text({
"query": "def process_payment",
"path": "src",
"regex": False
})
read_file({
"path": "src/payments/processor.py",
"start_line": 45,
"end_line": 75
})
apply_patch({
"patch": """--- a/src/payments/processor.py
+++ b/src/payments/processor.py
@@ -50,6 +50,7 @@
def process_payment(self, amount, method):
+ self.validate_amount(amount)
return self.gateway.charge(amount, method)
""",
"dry_run": True
})
apply_patch({
"patch": """--- a/src/payments/processor.py
+++ b/src/payments/processor.py
@@ -50,6 +50,7 @@
def process_payment(self, amount, method):
+ self.validate_amount(amount)
return self.gateway.charge(amount, method)
"""
})
git_diff({"cwd": ".", "staged": False})
Interactive Command Session
response = exec_command({
"command": "python -i",
"capture_output": True
})
session_id = response["session_id"]
write_stdin({
"session_id": session_id,
"data": "import sys\n"
})
write_stdin({
"session_id": session_id,
"data": "print(sys.version)\n"
})
kill_session({
"session_id": session_id,
"signal": "SIGTERM"
})
Git History Investigation
git_log({
"cwd": ".",
"max_count": 10
})
git_show({
"cwd": ".",
"revision": "a1b2c3d",
"path": "src/config.py"
})
git_blame({
"path": "src/config.py",
"start_line": 25,
"end_line": 30
})
git_diff({
"cwd": ".",
"paths": ["src/config.py"]
})
Environment Variables
CODING_TOOLS_MCP_TRACE=1
CODING_TOOLS_MCP_SHELL_ENV_INHERIT=all
CODING_TOOLS_MCP_SHELL_ENV_INHERIT=none
CODING_TOOLS_MCP_TOOL_PROFILE=read-only
CODING_TOOLS_MCP_AUTH_MODE=bearer
CODING_TOOLS_MCP_BEARER_TOKEN=your-token
CODING_TOOLS_MCP_AUTH_MODE=oauth
CODING_TOOLS_MCP_SERVER_URL=https://your-domain.com
CODING_TOOLS_MCP_OAUTH_CLIENT_ID=client-id
CODING_TOOLS_MCP_OAUTH_CLIENT_SECRET=client-secret
Troubleshooting
Command Permission Denied
coding-tools-mcp --permission-mode trusted --workspace /path/to/repo
Path Outside Workspace Error
read_file({"path": "/etc/passwd"})
read_file({"path": "../../../secrets"})
read_file({"path": "src/config.py"})
read_file({"path": "./data/input.json"})
Command Timeout
exec_command({
"command": "npm run build",
"timeout": 600
})
Environment Variables Missing
CODING_TOOLS_MCP_SHELL_ENV_INHERIT=all \
coding-tools-mcp --permission-mode trusted --workspace /path/to/repo
File Not Found in Search/List
The server excludes common build artifacts and caches by default:
.git, .reference
node_modules, target, dist
venv, virtualenv, .venv
__pycache__, .pytest_cache
.mypy_cache, .ruff_cache
If you need to inspect excluded directories, use read_file directly with the known path.
Image Resize Not Working
python -m pip install coding-tools-mcp[image]
Landlock Warning on Windows/macOS
The exec_command Landlock confinement only works on Linux with kernel 5.13+. On Windows, macOS, or older Linux, you'll see a warning. For untrusted workspaces or commands, use external sandboxing:
- Docker containers
- VMs
- Windows Sandbox
- macOS sandboxd
Security Notes
- Workspace boundary: All file operations are confined to the workspace root
- Path validation: Rejects absolute paths,
.. traversal, symlinks outside workspace
- Command safety: Timeout, output caps, environment filtering, destructive checks
- Not a full sandbox: Use Docker/VM for untrusted code; Landlock only works on modern Linux
- Permission modes: Default safe mode blocks shell expansion and network commands
- Remote MCP: Use bearer token or OAuth for remote access;
noauth is testing-only
See SECURITY.md and docs/security-boundary.md for full security policy.