Skip to main content
Glama
seayniclabs

Mooring

Official
by seayniclabs
README.md
# Mooring — Git & GitHub MCP Server

[![License: MIT](https://img.shields.io/badge/License-MIT-FB7185.svg)](LICENSE)

Mooring lines for your code — Git and GitHub operations for AI tools.

Mooring is an [MCP](https://modelcontextprotocol.io/) server that gives AI assistants structured access to local Git repositories and the GitHub API. Local operations use GitPython (no subprocess calls). GitHub operations use the PyGithub library with token masking and rate limit handling built in.

---

## Tools

### Local Git

| Tool | Description | Key Parameters |
|------|-------------|----------------|
| `repo_status` | Branch, ahead/behind, stash count, staged/unstaged/untracked files | `repo_path` |
| `repo_log` | Commit log with optional filters | `repo_path`, `max_count`, `author`, `since`, `path`, `search` |
| `repo_diff` | Unified diff — working tree, staged, or between refs | `repo_path`, `staged`, `from_ref`, `to_ref` |
| `repo_blame` | Git blame with optional line range | `repo_path`, `file_path`, `start_line`, `end_line` |
| `repo_branches` | All branches with tracking info, last commit, ahead/behind | `repo_path` |
| `repo_stash` | Stash operations: list, push, pop, apply | `repo_path`, `action`, `message` |

### GitHub

| Tool | Description | Key Parameters |
|------|-------------|----------------|
| `gh_pr_list` | List pull requests | `repo`, `state`, `author`, `label` |
| `gh_pr_detail` | PR detail with reviews, comments, and check runs | `repo`, `number` |
| `gh_pr_create` | Create a pull request | `repo`, `title`, `body`, `head`, `base`, `labels`, `reviewers` |
| `gh_issues` | List, create, or update issues | `repo`, `state`, `action`, `title`, `body`, `number` |
| `gh_actions` | List recent GitHub Actions workflow runs | `repo`, `workflow`, `status` |

### Utility

| Tool | Description | Key Parameters |
|------|-------------|----------------|
| `health` | Server version and status check | _(none)_ |

---

## Installation

```bash
# PyPI
pip install mooring-mcp

# Isolated install
pipx install mooring-mcp
```

---

## Usage

Run the server directly:

```bash
mooring
```

### Claude Code

```bash
claude mcp add mooring -- mooring
```

### Claude Desktop

Add to your Claude Desktop configuration (`claude_desktop_config.json`):

```json
{
  "mcpServers": {
    "mooring": {
      "command": "mooring",
      "env": {
        "GITHUB_TOKEN": "your-github-personal-access-token"
      }
    }
  }
}
```

The `GITHUB_TOKEN` environment variable is required for all GitHub tools (`gh_*`). Local Git tools work without it.

---

## Security

- **Path traversal protection** — file paths are resolved and validated against the repository root before any operation
- **Symlink escape detection** — symlinks that resolve outside the repository are rejected
- **Ref validation** — Git refs are checked against a safe character pattern and verified to exist before use
- **Token masking** — error messages are scrubbed for GitHub token patterns (`ghp_*`, `gho_*`, `github_pat_*`) before being returned
- **Rate limit handling** — GitHub 403 responses are caught and surfaced as clear messages instead of raw exceptions

---

## Development

```bash
git clone https://github.com/seayniclabs/mooring.git
cd mooring
python -m venv .venv && source .venv/bin/activate
pip install -e ".[test]"
python -m pytest tests/ -q
```

---

## Using with a Gateway

If you're running multiple MCP servers, route them through a gateway like [`tbxark/mcp-proxy`](https://github.com/tbxark/mcp-proxy) to manage all child processes from a single persistent service. The proxy handles process lifecycle, centralized config, and crash recovery — each server still gets its own SSE endpoint but you manage everything from one config file instead of scattered Claude Code entries.

For a full walkthrough of how this works in practice, see [The Hidden Cost of a Loaded MCP Stack](https://charlieseay.com/blog/mcp-gateway-lazy-loading) on charlieseay.com.

## License

[MIT](LICENSE)

<!-- mcp-name: io.github.seayniclabs/mooring -->

TDQS

B3.4/5.0

Scored across 12 tools

Disambiguation4/5

Clear separation between GitHub API (gh_*) and local git (repo_*) operations. While gh_issues combines list/create/update into one tool whereas PR operations are split into separate tools, the descriptions clearly distinguish their purposes with no overlapping functionality between different tools.

Naming Consistency3/5

Uses consistent prefixes (gh_ and repo_) but mixes naming patterns: gh_issues and gh_actions use nouns while PR tools use verb_noun (gh_pr_create, gh_pr_list). Local git tools follow git command names (mostly nouns) but lack verb consistency with the GitHub action-oriented names.

Tool Count5/5

Twelve tools is well-scoped for a server bridging GitHub API and local git operations. The count covers essential inspection and management tasks without bloat, with each tool earning its place in the set.

Completeness3/5

Strong read-only coverage (status, log, diff, blame, list operations) but notable gaps in write operations: no PR update/merge/close, no local git commit/push/pull/checkout, and limited Actions support (list only). The surface supports inspection workflows well but leaves agents unable to complete full git/PR lifecycle operations.

Maintenance

ActivityInactive
ResponsivenessNo issues