Skip to main content
Glama
DHCross

Cross Repo Ops MCP

by DHCross

Cross Repo Ops MCP

제어된 로컬 저장소 작업을 위한 저장소 중립적 MCP(Model Context Protocol) 기능 계층입니다.

기능

Cross Repo Ops MCP는 로컬 git 저장소에 대한 제한적이고 정책 기반의 작업을 노출하는 보안 강화 stdio JSON-RPC 서버를 제공합니다:

  • 읽기: 트리 목록, ripgrep 검색, 제한된 파일 읽기, git status/diff

  • 쓰기: create/modify를 지원하는 컨텍스트 검증 패치(쓰기 가능한 저장소만)

  • 작업: 승인된 명명된 작업 실행(허용 목록 전용, 임의 셸 없음)

  • Git: 브랜치 목록/생성/전환, 커밋(명시적 파일만), 푸시(origin만, 푸시 가능한 저장소만)

Related MCP server: void-bridge

아키텍처

Cross Repo Ops MCP는 제어된 로컬 저장소 작업을 위한 저장소 중립적 기능 계층입니다. XcodeIDEapp 프로젝트 옆에 위치하도록 설계되었으며, IDE 대시보드 스캐폴딩 패턴에서 아이디어를 차용했지만, 범용적으로 유지되며 특정 IDE나 프로젝트 구조에 의존하지 않습니다.

Cross Repo Ops MCP = controlled local repository actions (read, patch, git, tasks)

서버는 정책 기반으로 동작합니다: 저장소, 기능, 제외 경로, 승인된 작업이 모두 JSON 구성에 선언됩니다. 핵심에는 프로젝트별 로직이 하드코딩되어 있지 않습니다.

모듈

모듈

역할

policy.py

중앙 집중식 저장소 기능 정책(허용 목록, 쓰기/푸시 가능 플래그, 제외 경로, 작업 허용 목록, 제한, 시간 제한)

guard.py

단일 권위 있는 경로 검증 경계(트래버설, 심볼릭 링크, 절대 경로, 포함 검사)

repo.py

트리 목록, ripgrep 검색, 제한된 파일 읽기, git status/diff

patch.py

create/modify를 지원하는 컨텍스트 검증 패치 적용

git.py

안전 가드가 포함된 브랜치, 커밋, 푸시 작업

tasks.py

명명된 작업 허용 목록 확인 및 실행

server.py

stdio JSON-RPC MCP 서버

errors.py

오류 유형

보안 모델

  • 저장소 허용 목록: 정책에 명시적으로 나열된 저장소만 접근할 수 있습니다.

  • 기능 플래그: writablepushable은 저장소별로 설정되며 기본값은 false입니다.

  • 경로 포함: 모든 경로는 저장소 루트를 기준으로 확인되고 검사됩니다. 트래버설(..), 절대 경로, 심볼릭 링크는 거부됩니다.

  • 민감 파일 제외: .env, *.pem, API 키, 토큰, 자격 증명, 바이너리 파일은 읽기와 쓰기가 차단됩니다.

  • 패치 안전성: old_text는 정확히 일치해야 하며, 여러 일치 항목이 있으면 context로 명확히 구분해야 합니다. create=true는 기존 파일 덮어쓰기를 거부합니다.

  • 작업 허용 목록: 작업은 사용자 입력이 아닌 서버 측 허용 목록에서 이름으로 확인됩니다. 임의의 셸 명령은 허용되지 않습니다.

  • Git 안전성: 대량 스테이징(git add -A)은 거부됩니다. 커밋은 명시적으로 나열된 파일로 제한됩니다. 민감 파일은 커밋할 수 없습니다. 브랜치 이름은 인젝션에 대해 검증됩니다. 푸시는 푸시 가능한 저장소의 origin으로만 제한됩니다.

  • 출력 제한: 모든 작업에는 구성 가능한 출력 상한이 있습니다(읽기 문자 수, 검색 결과, 트리 항목, diff 문자 수, 작업 출력).

설치

# No external dependencies required — Python 3.10+ standard library only.
cd cross-repo-ops
pip install -e .  # optional, for package install

사용법

MCP 서버 실행

python3 -m cross_repo_ops

서버는 stdin/stdout에서 JSON-RPC 2.0 메시지를 수신 대기합니다.

사용자 지정 정책

CROSS_REPO_OPS_CONFIG=/path/to/policy.json python3 -m cross_repo_ops

정책 파일 형식

{
  "repos": {
    "myrepo": {
      "root": "/path/to/repo",
      "writable": true,
      "pushable": false
    }
  },
  "tasks": {
    "myrepo": {
      "build": {
        "command": ["xcodebuild", "-scheme", "MyApp", "build"],
        "cwd": "{root}",
        "timeout": 180
      },
      "test": {
        "command": ["xcodebuild", "test", "-scheme", "MyApp"],
        "cwd": "{root}",
        "timeout": 300
      }
    }
  }
}

MCP 도구

도구

설명

repo_tree

안전 제외 항목이 적용된 파일/디렉터리 목록

repo_search

출력이 제한된 ripgrep 검색

repo_read

민감하지 않은 텍스트 파일의 제한된 부분 읽기

git_status

git status 확인

git_diff

unstaged/staged/commit diff 보기

apply_patch

컨텍스트 검증 패치 적용(쓰기 가능한 저장소만)

run_task

승인된 명명된 작업 실행(허용 목록 전용)

git_branch

브랜치 목록/생성/전환(생성/전환은 쓰기 가능한 저장소만)

git_commit

명시적 파일 스테이징 및 커밋(쓰기 가능한 저장소만)

git_push

origin으로 푸시(푸시 가능한 저장소만)

테스트

python3 -m unittest tests.test_security tests.test_adversarial -v

다음을 포함한 32개의 테스트:

  • 허용 및 차단된 읽기

  • 경로 트래버설, 절대 경로, 심볼릭 링크 이스케이프 거부

  • 민감 파일 읽기/쓰기/커밋 차단

  • 쓰기 가능 저장소와 읽기 전용 저장소의 강제 적용

  • 올바른/오래된 컨텍스트를 사용한 패치

  • 제외된 파일을 대상으로 하는 패치

  • 명명된 작업 허용 목록(성공, 알 수 없는 이름, 셸 인젝션 시도)

  • 작업 시간 제한 및 출력 잘림

  • Git status/diff

  • 브랜치 이름 인젝션 방지 장치

  • 커밋 안전 장치(빈 메시지, 민감 파일, 대량 스테이징, 사전 스테이징된 파일)

  • 푸시 불가 저장소에 대한 푸시 거부

  • 서버의 누락 인자 처리

라이선스

MIT

F
license - not found
B
quality
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    Not graded
    quality
    C
    maintenance
    Enables AI assistants to safely interact with local code repositories through MCP tools for search, context building, and workspace management, while keeping all operations local and human-controlled for patch approval.
    MIT
  • F
    license
    Not graded
    quality
    C
    maintenance
    Exposes a secure, path-confined bridge to a local workspace and git remotes, enabling MCP clients to search, read, write, reset files, and perform git operations.
  • 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

View all related MCP servers

Related MCP Connectors

  • Remote MCP for Android CLI agent build gate, structured receipts, audit logs, and reviewer-ready evi

  • A MCP server built for developers enabling Git based project management with project and personal…

  • Git-native policy layer for AI agents: check_action verdicts against rules approved via PR.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/DHCross/cross-repo-ops'

If you have feedback or need assistance with the MCP directory API, please join our Discord server