Skip to main content
Glama

Local-MCP-Bridge

A security-scoped Model Context Protocol (MCP) bridge for controlled local filesystem access and development task execution.

Purpose

Local-MCP-Bridge is intended to let an MCP-compatible AI client interact with explicitly authorized local development projects without granting unrestricted access to the host machine.

The bridge is designed around two primary capability groups:

  • Filesystem access — list, search, inspect, and read files inside configured project roots.

  • Controlled execution — run approved development commands and scripts with bounded working directories, timeouts, output limits, and audit logging.

The long-term goal is to support workflows such as:

  1. An AI agent modifies code through GitHub or another source-control integration.

  2. The local bridge synchronizes the selected repository.

  3. The bridge starts a benchmark, test suite, build, or other approved development task locally.

  4. The AI agent reads structured results and logs through MCP.

  5. The agent uses those results to decide whether further code changes are required.

Related MCP server: Cloud Harness MCP

Security model

This project treats every MCP client, model-generated tool call, repository file, and command argument as potentially untrusted input.

Core rules:

  • Deny by default. No filesystem root or executable is available unless explicitly configured.

  • No unrestricted shell by default. The bridge should expose narrow capabilities rather than arbitrary cmd.exe, PowerShell, or shell command strings.

  • Project-root confinement. Filesystem operations and process working directories must remain inside canonicalized, explicitly allowed roots.

  • Escape protection. Path traversal, symbolic-link, junction, and reparse-point escape paths must be validated before access.

  • Least privilege. Read, execution, Git, and future write permissions are separate capabilities.

  • Bounded execution. Commands use timeouts, output limits, and resource-aware job handling.

  • Local secrets stay local. Real configuration, tokens, credentials, logs, job state, and machine-specific paths are excluded from Git.

  • Auditable actions. Security-relevant operations should produce local audit records without leaking secrets.

See docs/security-model.md and docs/threat-model.md.

Repository layout

Local-MCP-Bridge/
├── .github/
│   ├── dependabot.yml
│   └── workflows/
│       ├── ci.yml
│       └── security-baseline.yml
├── config/
│   └── config.example.yaml
├── docs/
│   ├── architecture.md
│   ├── security-model.md
│   └── threat-model.md
├── src/
│   └── local_mcp_bridge/
│       ├── __init__.py
│       ├── __main__.py
│       └── server.py
├── tests/
│   └── test_server.py
├── .env.example
├── .gitignore
├── LICENSE
├── pyproject.toml
├── README.md
└── SECURITY.md

Phase 1: minimal MCP server

Phase 1 establishes a real, installable MCP server while deliberately exposing no privileged host capabilities yet.

The server currently exposes exactly one tool:

  • health_check — returns non-sensitive server/version information and confirms that filesystem and execution capabilities are disabled.

The bridge uses the MCP Python SDK v2 and defaults to MCP's stdio transport for local development.

Local setup

From the repository root on Python 3.11 or newer:

python -m venv .venv
.\.venv\Scripts\Activate.ps1
python -m pip install --upgrade pip
python -m pip install -e ".[dev]"

Run the tests and linter:

python -m ruff check .
python -m pytest -q

Start the server over stdio:

python -m local_mcp_bridge

The process will wait for an MCP host on stdin/stdout; that is expected for the stdio transport.

For interactive development with the MCP Inspector:

mcp dev src/local_mcp_bridge/server.py

No project directories, shell access, subprocess execution, Git operations, network credentials, or host metadata are exposed in Phase 1.

Configuration policy

Only example configuration belongs in Git.

Tracked:

.env.example
config/config.example.yaml

Local-only and ignored:

.env
config/config.yaml
config/config.local.yaml
credentials/
secrets/
tokens/
runtime/
jobs/
logs/
output/
artifacts/

Never place real API keys, authentication tokens, tunnel credentials, private certificates, personal absolute paths, or sensitive benchmark output in committed configuration.

Planned development phases

  • Phase 0: Repository and security baseline

  • Phase 1: Minimal MCP server

  • Phase 2: Project registry and allowed roots

  • Phase 3: Safe filesystem tools

  • Phase 4: Path/symlink/junction confinement

  • Phase 5: Controlled process execution

  • Phase 6: Persistent local job manager

  • Phase 7: Git synchronization tools

  • Phase 8: Audit logging and runtime hardening

  • Phase 9: Remote/tunnel integration

  • Phase 10: Lightweight Claude MCP validation

  • Phase 11: Real project integration and autonomous workflow testing

Current status

Phase 1 — minimal MCP server implemented.

Filesystem access and local command execution remain intentionally disabled until their dedicated security layers are implemented and tested.

Contributing

Security properties take precedence over convenience. Changes that broaden filesystem, command, network, or credential access should include explicit threat analysis and tests for denial/escape cases.

License

MIT License. See LICENSE.

Available Tools

1 tool
health_checkA

Return basic server health without exposing host or project information.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

Output Schema

ParametersJSON Schema
NameRequiredDescription
serverYes
statusYes
versionYes
execution_enabledYes
filesystem_enabledYes

TDQS

A4.1/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations are absent, so the description carries the full burden. It discloses a key behavioral trait (does not expose host/project info) and implies a read-only operation, but it does not describe what 'basic server health' includes or any potential failure modes. Adequate for a simple health check but not rich.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, front-loaded sentence with no fluff. It states the primary action and the key constraint efficiently.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has zero parameters, an output schema exists, and there are no siblings, the description fully covers what an agent needs to know. The return format is handled by the output schema, and the boundary on sensitive data is clearly stated.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool takes zero parameters, so the description need not elaborate on parameter meanings. Per the guidance, a baseline of 4 applies when there are no parameters, and there is nothing further to explain.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb ('Return') and a clear resource ('basic server health'), and it adds a boundary ('without exposing host or project information') that clarifies scope. With no siblings, it unambiguously identifies the tool's function.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no explicit guidance on when to use this tool versus alternatives, but since there are no sibling tools, the intended use is self-evident. The mention of not exposing sensitive info implies it is safe for general use, but no direct context is given.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

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

  1. 1 tool updatev0.1.0
    • First observedhealth_check

TDQS

A3.9/5.0

Scored across 1 tool

Disambiguation5/5

Only one tool exists, so there is no possibility of confusion or overlap. It is clearly distinct by default.

Naming Consistency5/5

The single tool name 'health_check' follows a standard snake_case verb_noun pattern, which is consistent and predictable.

Tool Count3/5

The server has only one tool, which is extremely thin for most server purposes. However, if the sole purpose is health monitoring, it could be seen as minimal but functional; generally, this is borderline.

Completeness1/5

A single health check tool provides almost no functional coverage. There are no other operations, and the server's purpose seems to be only to verify liveness, which is severely limited.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • F
    license
    Not graded
    quality
    C
    maintenance
    Secure local development platform that exposes controlled developer capabilities (FS, Git, search, command execution) to AI assistants via MCP with deny-by-default security and audit logging.
    -
  • A
    license
    Not graded
    quality
    B
    maintenance
    Enables AI clients to control local Windows development tools by exposing project files, code search, file editing, test execution, Git operations, and resource viewing through a secure MCP interface with permission controls.
    10
    Apache 2.0
  • A
    license
    A
    quality
    B
    maintenance
    Enables ChatGPT and Codex to safely work with explicitly authorized local project folders through MCP, providing constrained file reading, searching, patch editing, Git inspection, and whitelisted tasks without exposing arbitrary shell, deletion, or deployment capabilities.
    17
    MIT