Skip to main content
Glama

Local Dev MCP

简体中文

Run Git, npm, Maven, and other local development tools from an MCP client. The server accepts a program, arguments, and a working directory over STDIO. Common commands have built-in rules. Other commands can use an editable allowlist or go through a local approval request. MCP STDIO transport

Background

This project began when Quick's sandbox prevented the agent from using Maven, npm, and Git installed on the local machine. With a local STDIO connection, Quick can run commands such as mvn test, npm test, and git status in the project directory under the local allowlist and approval rules.

Related MCP server: Agent Workstation

Quick start

You need Python 3.11 or newer, uv, and an MCP client that can launch a local STDIO server. On Windows, the approval window uses Python's Tk support. Install uv

Clone the repository, install the dependencies, and generate the client configuration.

git clone https://github.com/Pillow0-0/local-dev-mcp.git
cd local-dev-mcp
uv sync --locked
uv run --locked python -B main.py config

Example MCP configuration

Paste the generated JSON into your client's local STDIO configuration, or use the Windows example below and replace both paths with your repository's absolute paths. If your client already has other servers, merge just the local-dev-mcp entry into mcpServers.

{
  "mcpServers": {
    "local-dev-mcp": {
      "command": "C:\\Projects\\local-dev-mcp\\.venv\\Scripts\\python.exe",
      "args": ["-E", "-B", "C:\\Projects\\local-dev-mcp\\main.py", "serve"],
      "env": {
        "LOCAL_DEV_MCP_LANGUAGE": "en"
      }
    }
  }
}

For a client with separate fields, copy command, args, and any optional env entries into their respective fields. On macOS and Linux, the example paths would be /path/to/local-dev-mcp/.venv/bin/python and /path/to/local-dev-mcp/main.py. Save and reload the MCP connection.

The server looks up programs on the PATH it inherits from your client. Configure the PATH and any tool-specific environment variables in the MCP client if needed.

Run a command

Call run_command with one program and one array entry per argument. Use an existing absolute directory for cwd.

{
  "command": "mvn",
  "args": ["-B", "test", "-Dtest=UserServiceTest"],
  "cwd": "D:\\code\\backend",
  "timeout_seconds": 300
}

MCP tool

Purpose

run_command

Run an allowed command and return the exit code, stdout, stderr, and timing.

request_permission

Submit a command for review, including sample arguments, a working directory, a reason, and the requested scope.

permission_status

Look up a request and its actual approved scope.

list_allowed_commands

Inspect the built-in rules, current file rules, and active display language.

On Windows, a command still running after about one second opens a live output window. The first line shows the executable path and all its arguments. The window closes three seconds after the command ends, or immediately if you press Enter. Pass live_window: false to keep that window closed for a call. MCP clients that request progress updates also receive output excerpts while the command runs. MCP progress notifications

Commands run non-interactively. The final result retains the last 32 KiB of each output stream and marks truncated streams. The default timeout is 300 seconds. You can set timeout_seconds from 1 to 1800 seconds.

Approve a command

When run_command returns approval_required, the agent can submit the same command and arguments to request_permission. Use requested_scope to specify the breadth of access and reason to explain the purpose.

Scope

What it matches

exact

The full example argument list.

subcommand

The first entry in args. Later arguments can vary.

program

All subcommands and arguments for the same command and resolved executable.

Every approval applies across working directories. In permission_status, scope records the actual decision, any_directory describes directory access, and all_arguments_allowed is true for a program-wide rule.

The Windows dialog lists the executable, example arguments, directory, and reason. The green approval button names the scope. The red Reject button is on the opposite side. Choose Later or close the window to leave a request pending.

Command-line approvals

Run these commands from the repository directory. Replace REQUEST_ID with the ID returned by the tool.

uv run --locked python -B main.py pending
uv run --locked python -B main.py approve REQUEST_ID
uv run --locked python -B main.py approved
uv run --locked python -B main.py revoke REQUEST_ID

Add --scope program or --scope exact to approve to choose the scope explicitly. A plain approve defaults to subcommand where available and exact arguments otherwise. Use reject REQUEST_ID to reject a pending request.

Edit the allowlist

Open allowlist.txt in the state directory and save it as UTF-8. Enter a program name from PATH, optionally followed by its subcommand. Use # for comments. Added and removed rules take effect on the next tool call.

# Allow git fetch with any following arguments.
git fetch

# Allow all Maven goals and arguments.
mvn

Platform

Default state directory

Windows

%LOCALAPPDATA%\LocalDevMCP

macOS and Linux

$XDG_STATE_HOME/local-dev-mcp or ~/.local/state/local-dev-mcp

The server stores approved requests in permissions.sqlite3. Built-in rules live in policy.py and cover common Git, Maven, Node.js, Python, Go, Rust, and .NET development tasks.

Language and display options

English (en) and Simplified Chinese (zh-CN) are bundled. The server checks the Windows display-language preferences or, on other systems, the message-locale environment. It uses English when no catalog matches.

The optional env block in the MCP configuration example sets LOCAL_DEV_MCP_LANGUAGE to en. Use zh-CN for Simplified Chinese, or omit this setting to follow the system language. Reload the connection after changing it.

Set LOCAL_DEV_MCP_APPROVAL_POPUP=0 for command-line approvals only. To add a translation, copy locales/en.json to a new language-tag file in locales/, such as fr.json. Keep the keys and format placeholders. Missing messages inherit the English version.

Execution model

Commands run with the local account used to start the server. Approved build tools can execute project scripts, Maven plugins, and Git hooks with that account's access. Connect the server to clients and projects that you trust.

Windows batch files accept space-containing arguments. Their filenames and arguments are restricted to characters compatible with safe cmd.exe argument handling. Use a mapped drive when running a batch file from a network share.

Development

Run the catalog checks after editing a translation.

uv run --locked python -B -m unittest discover -s tests

License

MIT License

Available Tools

4 tools
list_allowed_commandsB
Read-only

List bundled rules, the path to the editable allowlist, and the active file rules.

Inputs: no named parameters. Returns: object

permission_statusB
Read-only

Get the actual approved scope. any_directory refers to working directories. all_arguments_allowed means the entire program was approved.

Inputs: request_id (required). Returns: object

request_permissionC
Idempotent

Request local approval. Set requested_scope to ask for an entire program, a subcommand, or exact arguments.

Inputs: cwd (required), args (required), reason (required), command (required), +1 more. Returns: object

run_commandB

Run an allowed local command and report live output, final exit code, stdout, stderr, and timeout status.

Inputs: cwd (required), args (required), command (required), live_window, +1 more. Returns: object

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.4/5.0

    Scored across 4 tools

    Disambiguation4/5

    Each tool has a distinct action: executing commands, checking granted scope, requesting approval, and listing configured rules. The only mild overlap is between permission_status (runtime approved scope) and list_allowed_commands (configured allowlist), which an agent could occasionally confuse, but the descriptions distinguish 'actual approved scope' from 'bundled rules and file rules' clearly enough.

    Naming Consistency4/5

    All names are snake_case and three of four follow a verb_noun pattern (run_command, request_permission, list_allowed_commands). permission_status is a noun_phrase that breaks the verb pattern slightly, but the overall convention is predictable and readable.

    Tool Count5/5

    Four tools is well-scoped for a permission-gated local command runner: execute, request approval, inspect approval, and inspect rules. No tool feels redundant or missing from the core loop.

    Completeness4/5

    The lifecycle of run -> request -> verify -> list is covered, which handles the main agent workflow. Minor gaps exist: no explicit revoke/reset of granted permissions and no direct allowlist editing tool (the path is surfaced instead), but agents can work around these via run_command.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      C
      maintenance
      Enables MCP clients to drive developer workflows through APIs and CLIs, with explicit workspace or trusted-workstation launch modes, bounded command previews, multi-repository rules discovery, and an on-demand skills/recipes entry point. It lets agents review changes, run commands, and load only the smallest relevant rule or skill while reporting evidence and unverified steps.
      19
      1
      Apache 2.0
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables MCP clients to execute commands, edit files, run Git workflows, and perform validated independent reviews in real development environments through Docker-based runtimes with separated developer and auditor permissions.
      MIT
    • A
      license
      D
      quality
      C
      maintenance
      Enables controlled local developer operations including file and process management, shell execution, SSH, WSL, Docker, Git, browser and desktop automation, media processing, and asynchronous jobs through MCP.
      146
      MIT